Heyyyyy,
Ich hab ein paar errors bei /startbonus
Errors/Warnings:
GTA SERVER\gamemodes\AAA.pwn(19441) : error 017: undefined symbol "PlayerMoney"
GTA SERVER\gamemodes\AAA.pwn(19441) : warning 215: expression has no effect
GTA SERVER\gamemodes\AAA.pwn(19441) : error 001: expected token: ";", but found "]"
GTA SERVER\gamemodes\AAA.pwn(19441) : error 029: invalid expression, assumed zero
GTA SERVER\gamemodes\AAA.pwn(19441) : fatal error 107: too many error messages on one line
Command:
if(strcmp(cmd, "/startbonus", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1 PlayerInfo[playerid][pSupporter] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /startbonus [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pLevel] != 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " Dieser Spieler ist kein Anfänger mehr!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Du hast Spieler %s den Startbonus gegeben (Level: 2, Geld: +$50.000). *",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Administrator %s hat dir einen Startbonus gegeben. (Level: 2, Geld: +$50.000).",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerMoney[giveplayerid] = PlayerMoney[giveplayerid] += 50000;
PlayerInfo[giveplayerid][pLevel] = 2;
PlayerInfo[giveplayerid][gPupgrade] += 2;
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du bist nicht berechtigt, diesen Befehl zu benutzen !");
return 1;
}
}
return 1;
}