Guten Abend,
ich habe im Script irgendwo ein Klammerfehler. Dann habe ich das Script in den Klammerfehler Detector rein gehauen und dann kam das Ergebniss:
(ganz unten sollte der Klammerfehler sein)
PHP
public OnPlayerPickUpPickup(playerid,pickupid)
{
for(new x = 0; x < MAX_GIFTS; x++)
{
new string[400];
if(GiftUsed[x] == true && pickupid == Gift[x] && Picked[playerid] == 0)
{
switch(random(7))
{
case 0:
{
new rand = (5000 + random(40000));
GivePlayerMoney(playerid, rand);
format(string, sizeof(string), "~r~Herzlichen Glueckwunsch!~n~~w~Gewinn : ~g~$%d", rand);
GameTextForPlayer(playerid, string, 4000, 3);
format(string, sizeof(string), "{FF3C00}Herzlichen Glueckwunsch! {FFFFFF}Du hast als Belohnung Geld bekommenn {FF3C00}$%d!", rand);
SendClientMessage(playerid, COLOR_WHITE, string);
}
case 1:
{
SetPlayerHealth(playerid, 100);
format(string, sizeof(string), "~r~Herzlichen Glueckwunsch!~n~~w~Gewinn : ~y~einen Teddy");
GameTextForPlayer(playerid, string, 4000, 3);
SendClientMessage(playerid, COLOR_WHITE, "Du hast als Belohnung {FF3C00}einen Teddy bekommen! {FFFFFF}Dein {FF3C00}Leben {FFFFFF}ist wieder voll!");
}
case 2:
{
SetPlayerArmour(playerid, 100);
format(string, sizeof(string), "~r~Herzlichen Glueckwunsch!~n~~w~Gewinn : ~y~ Armour");
GameTextForPlayer(playerid, string, 4000, 3);
SendClientMessage(playerid, COLOR_WHITE, "FF3C00}Herzlichen Glueckwunsch! {FFFFFF}Du hast {FF3C00}Armour{FFFFFF} bekommen!");
}
case 3:
{
new rand = (5000 + random(40000));
GivePlayerMoney(playerid, rand);
format(string, sizeof(string), "~r~Herzlichen Glueckwunsch!~n~~w~Gewinn: ~g~$%d", rand);
GameTextForPlayer(playerid, string, 4000, 3);
format(string, sizeof(string), "{FF3C00}Herzlichen Glueckwunsch! {FFFFFF}Du hast als Belohnung Geld bekommen {FF3C00}$%d!", rand);
SendClientMessage(playerid, COLOR_WHITE, string);
}
case 4:
{
new rand = (5000 + random(40000));
GivePlayerMoney(playerid, rand);
format(string, sizeof(string), "~r~Herzlichen Glueckwunsch!~n~~w~Gewinn: ~g~$%d", rand);
GameTextForPlayer(playerid, string, 4000, 3);
format(string, sizeof(string), "{FF3C00}Herzlichen Glueckwunsch! {FFFFFF}Du hast als Belohnung Geld bekommen {FF3C00}$%d!", rand);
SendClientMessage(playerid, COLOR_WHITE, string);
}
case 5:
{
PlayerInfo[playerid][pExp]+=5;
format(string, sizeof(string), "~r~Herzlichen Glueckwunsch!~n~~w~Gewinn : ~y~einen Teddy");
GameTextForPlayer(playerid, string, 4000, 3);
SendClientMessage(playerid, COLOR_WHITE, "Du hast als Belohnung {FF3C00}einen Teddy bekommen! {FFFFFF}Du hast {FF3C00}5 Respektpunkte {FFFFFF}bekommen!");
}
case 6:
{
PlayerInfo[playerid][pLevel]+=1;
format(string, sizeof(string), "~r~Herzlichen Glueckwunsch!~n~~w~Gewinn : ~y~einen Teddy");
GameTextForPlayer(playerid, string, 4000, 3);
SendClientMessage(playerid, COLOR_WHITE, "Du hast als Belohnung {FF3C00}einen Teddy bekommen! {FFFFFF}Du hast {FF3C00}1 Level {FFFFFF}bekommen!");
}
}
new zone[MAX_ZONE_NAME], pname[MAX_PLAYER_NAME];
GetPlayer2DZone(playerid, zone, sizeof(zone));
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "Der Spieler %s hat ein{FF3C00} Geschenk{FFFFFF} im Stadtteil {0069FF}%s{FFFFFF} gefunden !", pname, zone);
SendClientMessageToAll(COLOR_WHITE, string);
DestroyPickup(Gift[x]);
PlayerInfo[playerid][gFound]++;
Picked[playerid] = 1;
}
}
Picked[playerid] = 0;
if(pickupid == healbwnhit)
{
SetPlayerHealth(playerid,100.0);
}
if(pickupid == EssenPickup[5] || pickupid == EssenPickup[1] || pickupid == EssenPickup[2] || pickupid == EssenPickup[3]|| pickupid == EssenPickup[4])
{
GameTextForPlayer(playerid,"~g~/menu",4000,3);
}
if(pickupid == KLEIDUNG_PRO)
{
if(PlayerToPoint(3.0,playerid,199.0634,-128.0607,1003.5152))
{
ShowPlayerDialog(playerid,DIALOG_KLEIDUNG_PRO,DIALOG_STYLE_LIST,"Pro Labs","Orange 12 Preis: 50$\nRockstar Grey Preis: 30$\nBase 5 Preis: 35$","Kaufen","Abbrechen");
}
}
if(pickupid == HEAL_GROVEBASE)
{
SetPlayerHealth(playerid, 100.0);
}
if(pickupid == HealpickupMedic)
{
SetPlayerHealth(playerid, 100.0);
}
if(pickupid == HealpickupLSPD)
{
SetPlayerHealth(playerid, 100.0);
}
if(pickupid == HealpickupOamtls)
{
SetPlayerHealth(playerid, 100.0);
}
if(pickupid == HealpickupFBIBASE)
{
SetPlayerHealth(playerid, 100.0);
}
if(pickupid == HealpickupSFPD)
{
SetPlayerHealth(playerid, 100.0);
}
if(pickupid == KLEIDUNG_ZIP)
{
if(PlayerToPoint(3.0,playerid,181.2543,-91.6659,1002.0234))
{
ShowPlayerDialog(playerid,DIALOG_KLEIDUNG_ZIP,DIALOG_STYLE_LIST,"ZIP","Schwarzer Anzug&Rote Krawatte Preis: 100$\nPfarrer Anzug Preis: 300$\nCobaine-Style Preis: 200$\nSchwarzer Anzug Preis: 100$\nBlaue Jacke Preis: 120$\nBlauer Gestreifter Anzug Preis: 180$","Kaufen","Abbrechen");
}
}
if(pickupid == Stadion)
{
new sstring[128];
format(sstring, sizeof(sstring), "RundenRennen Preis: %d$\nKickstart Preis: %d$\nDerby Preis: %d$\nMotorCross Preis: %d$",SBizzInfo[12][sbEntranceCost],SBizzInfo[12][sbEntranceCost],SBizzInfo[12][sbEntranceCost],SBizzInfo[12][sbEntranceCost]);
ShowPlayerDialog(playerid,DIALOG_STADION,DIALOG_STYLE_LIST,"Los Santos Stadion",sstring,"Betreten","Abbrechen");
}
if(pickupid == dromeexit
|| pickupid == Derbyexit
|| pickupid == DerbyBesucherexit
|| pickupid == Motorcrossexit
|| pickupid == Rundenrennenexit
|| pickupid == Kickstartexit)
{
if(PlayerToPoint(3.0,playerid,-1464.5392,1557.6179,1052.5313)
|| PlayerToPoint(3.0,playerid,-1462.6779,936.9413,1036.6016)
|| PlayerToPoint(3.0,playerid,2726.416748, -1643.612305, 1745.127075)
|| PlayerToPoint(3.0,playerid,-1451.0740,-581.2715,1055.4420)
|| PlayerToPoint(3.0,playerid,2695.5249,-1704.4875,11.8438)
|| PlayerToPoint(3.0,playerid,-1405.6576,-239.1536,1043.3894))
{
SetPlayerPos(playerid,2692.4314,-1699.2272,10.4277); //LS Arena verlassen
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
ResetPlayerWeapons(playerid);
}
}
return 1;
} // <------ hier sollte ein Klammerfehler sein//
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == BOMB)
{
switch(row)//rot,gelb,grün,blau
{
case 0://rot
Alles anzeigen
Bitte um Hilfe.
MfG