Hallo Leute ,
Ich wollte diesen Drivein Filterscript umscripten jedoch ist mir aufgefallen das allein schon die Grundlage i-wie nicht funkt .. Immer wenn ich das Filterscript rein mache ist es nicht drin legt aber alle Befehle flach. Wenn ich denim Gamemod einfüge kommt da Klammerfehler ich bin voll verzweifel:
// BSN FILTERSCRIPT BY AMOK
#include <a_samp>
#define KaufMenu 2
new Essen[7];
public OnFilterScriptInit()
{
print("\n *********************\n * BSN SCRIPT *");
print(" * By AmoK *\n *********************");
printf(" * Copyright 09 *\n *********************");
print(" * -- LOADED *\n *********************\n");
Create3DTextLabel("BSN Drive-In\nTippe /menu",0xFF0000FF,1182.9932,-905.2079,43.2849,13.0,0);
CreatePickup(1274, 23, 1182.9932,-905.2079,43.2849);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/BSNDrivein", true) == 0)
{
if(PlayerToPoint(2.0, playerid, 1182.9932, -905.2079, 43.2849))
{
ShowPlayerDialog(playerid, KaufMenu, DIALOG_STYLE_LIST, "BSN: Drive In Menü", "Cheesburger\nHamburger\nChickenburger\nPommes\nBigMac\nCola\nLimo", "Kaufen", "Abbrechen");
}
else
{
SendClientMessage(playerid, 0x00CED388, "Du bist nicht am BSN Drive-In");
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == KaufMenu)
{
if(response)
{
if(listitem == 0) //Cheesburger
{
SendClientMessage(playerid, 0x0099FFFF, "Cheesburger Bestellt.");
SendClientMessage(playerid, 0xCCCCCCFF, "Begib dich zu dem roten Checkpoint um dein Essen zu holen");
SetPlayerCheckpoint(playerid, 1203.3329,-922.8336,42.9839, 5.0);
Essen[playerid] = 1;
}
if(listitem == 1) //nHamburger
{
SendClientMessage(playerid, 0x0099FFFF, "Hamburger Bestellt.");
SendClientMessage(playerid, 0xCCCCCCFF, "Begib dich zu dem roten Checkpoint um dein Essen zu holen");
SetPlayerCheckpoint(playerid, 1203.3329,-922.8336,42.9839, 5.0);
Essen[playerid] = 2;
}
if(listitem == 2) //Chickenburger
{
SendClientMessage(playerid, 0x0099FFFF, "Chickenburger Bestellt.");
SendClientMessage(playerid, 0xCCCCCCFF, "Begib dich zu dem roten Checkpoint um dein Essen zu holen");
SetPlayerCheckpoint(playerid, 1203.3329,-922.8336,42.9839, 5.0);
Essen[playerid] = 3;
}
if(listitem == 3) //Pommes
{
SendClientMessage(playerid, 0x0099FFFF, "Pommes Bestellt.");
SendClientMessage(playerid, 0xCCCCCCFF, "Begib dich zu dem roten Checkpoint um dein Essen zu holen");
SetPlayerCheckpoint(playerid, 1203.3329,-922.8336,42.9839, 5.0);
Essen[playerid] = 4;
}
if(listitem == 4) //BigMac
{
SendClientMessage(playerid, 0x0099FFFF, "BigMac Bestellt.");
SendClientMessage(playerid, 0xCCCCCCFF, "Begib dich zu dem roten Checkpoint um dein Essen zu holen");
SetPlayerCheckpoint(playerid, 1203.3329,-922.8336,42.9839, 5.0);
Essen[playerid] = 5;
}
if(listitem == 5) //Cola
{
SendClientMessage(playerid, 0x0099FFFF, "Cola Bestellt.");
SendClientMessage(playerid, 0xCCCCCCFF, "Begib dich zu dem roten Checkpoint um dein Essen zu holen");
SetPlayerCheckpoint(playerid, 1203.3329,-922.8336,42.9839, 5.0);
Essen[playerid] = 6;
}
if(listitem == 6) //Limo
{
SendClientMessage(playerid, 0x0099FFFF, "Limo Bestellt.");
SendClientMessage(playerid, 0xCCCCCCFF, "Begib dich zu dem roten Checkpoint um dein Essen zu holen");
SetPlayerCheckpoint(playerid, 1203.3329,-922.8336,42.9839, 5.0);
Essen[playerid] = 7;
}
}
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(Essen[playerid] == 1)
{
SendClientMessage(playerid, 0x0099FFFF, "Du hast einen Cheesburger gekauft. Kosten: 100$");
SendClientMessage(playerid, 0xCCCCCCFF, "Guten Apetit =)");
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -100);
Essen[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(Essen[playerid] == 2)
{
SendClientMessage(playerid, 0x0099FFFF, "Du hast einen Hamburger gekauft. Kosten: 100$");
SendClientMessage(playerid, 0xCCCCCCFF, "Guten Apetit =)");
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -100);
Essen[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(Essen[playerid] == 3)
{
SendClientMessage(playerid, 0x0099FFFF, "Du hast einen Chickenburger gekauft. Kosten: 130$");
SendClientMessage(playerid, 0xCCCCCCFF, "Guten Apetit =)");
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -130);
Essen[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(Essen[playerid] == 4)
{
SendClientMessage(playerid, 0x0099FFFF, "Du hast eine Portion Pommes gekauft. Kosten: 140$");
SendClientMessage(playerid, 0xCCCCCCFF, "Guten Apetit =)");
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -140);
Essen[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(Essen[playerid] == 5)
{
SendClientMessage(playerid, 0x0099FFFF, "Du hast einen BigMac gekauft. Kosten: 230$");
SendClientMessage(playerid, 0xCCCCCCFF, "Guten Apetit =)");
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -230);
Essen[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(Essen[playerid] == 6)
{
SendClientMessage(playerid, 0x0099FFFF, "Du hast eine Cola gekauft. Kosten: 80$");
SendClientMessage(playerid, 0xCCCCCCFF, "Guten Apetit =)");
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -80);
Essen[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(Essen[playerid] == 7)
{
SendClientMessage(playerid, 0x0099FFFF, "Du hast eine Limo gekauft. Kosten: 80$");
SendClientMessage(playerid, 0xCCCCCCFF, "Guten Apetit =)");
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -80);
Essen[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
public OnFilterScriptExit()
{
return 1;
}