public OnPlayerEnterCheckpoint(playerid)
{
new trinkgeld = random(85); // Betrag für das Trinkgeld, lässt sich beliebig ändern! ( Zufalls Betrag )
new string[256];
if(Checkpoint[playerid] == 1)
{
SendClientMessage(playerid, ROT, "Muell aufgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, GRÜN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -89.2432,-1189.7782,2.3241, 5.0);
Checkpoint[playerid] = 2;
}
else
if(Checkpoint[playerid] == 2)
{
SendClientMessage(playerid, ROT, "Muell aufgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, GRÜN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -63.3734,-1588.5732,3.1782, 5.0);
Checkpoint[playerid] = 3;
}
else
if(Checkpoint[playerid] == 3)
{
SendClientMessage(playerid, ROT, "Muell aufgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, GRÜN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 220.8943,-1393.5308,52.1264, 5.0);
Checkpoint[playerid] = 4;
}
else
if(Checkpoint[playerid] == 4)
{
...
}
}
return 1;
}
Erros
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\RolePlayScript.pwn(269) : error 017: undefined symbol "Checkpoint"
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\RolePlayScript.pwn(269) : warning 215: expression has no effect
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\RolePlayScript.pwn(269) : error 001: expected token: ";", but found "]"
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\RolePlayScript.pwn(269) : error 029: invalid expression, assumed zero
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\RolePlayScript.pwn(269) : fatal error 107: too many error messages on one line
Danke im Vorraus
Das habe ich von Goldkiller ~Klick Me~