//command
if (strcmp(cmdtext, "/kill", true) ==0)
{
SetPlayerHealth(playerid,0.0);
kill[playerid] = 1;
return 1;
}
//Death
public OnPlayerDeath(playerid, killerid, reason)
{
if (kill[playerid] == 1)
{
TogglePlayerSpectating(playerid, 0);
}
else
{
new string[48];
TogglePlayerSpectating(playerid, true);
PlayerSpectatePlayer(playerid, killerid);
new Float:health;
new name[MAX_PLAYER_NAME];
GetPlayerName(killerid, name, sizeof(name));
GetPlayerHealth(killerid, health);
format(string, sizeof(string), "Spectating:~n~%s",name);
GameTextForPlayer(playerid, string, 7000, 3);
SetTimerEx("STOPSPECCINGNOW", 10000 , 0, "d", playerid);
}
return 1;
}
Hier kriege ich folgende Errors:
PHP
(95) : error 010: invalid function or declaration
(99) : error 010: invalid function or declaration
(105) : error 017: undefined symbol "kill"
(105) : warning 215: expression has no effect
(105) : error 001: expected token: ";", but found "]"
(105) : error 029: invalid expression, assumed zero
(105) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
Alles anzeigen
Weiss irgendwie nicht wie es weitergehen soll.