hallo,
habe es auf 2 verschiedene arten versucht, beide hauen nicht hin.
Kann mir bitte einer helfe eine Anti Spawn Kill protection zu coden.
Das sind meine versuche:
//OnPlayerSpawn
SetPlayerHealth(playerid,9999999);
SendClientMessage(playerid, 0xFF0000AA, "{5DFC0A}You are Spawn-Kill protected for the next {CD3333}10 seconds...");
SetTimerEx("AntiSpawnKill",10000,false,"i",playerid);
forward AntiSpawnKill(playerid);
public AntiSpawnKill(playerid)
{
SetPlayerHealth(playerid,100);
SendClientMessage(playerid, 0xFF0000AA, "{5DFC0A}Anti-Spawnkill protection is over now. {CD3333}Watch out!");
return 1;
}
////////////////////////////////////////////
UND
2.Versuch
//OnPlayerSpawn
SetPlayerHealth(playerid,99999999999);
SendClientMessage(playerid, 0xFF0000AA, "{5DFC0A}You are Spawn-Kill protected for the next {CD3333}10 seconds...");
SetTimerEx("AntiSpawnKill",10000,false,"i",playerid);
DRH[playerid] = SetTimerEx("drughealther",100,true,"i",playerid);
forward AntiSpawnKill(playerid);
public AntiSpawnKill(playerid)
{
SetPlayerHealth(playerid,100);
SendClientMessage(playerid, 0xFF0000AA, "{5DFC0A}Anti-Spawnkill protection is over now. {CD3333}Watch out!");
KillTimer(DRH[playerid]);
return 1;
}
forward drughealther(playerid);
public drughealther(playerid)
{
SetPlayerHealth(playerid, 99999999);
return 1;
}
danke schon mal