Anti Spawn Kill - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Anti Spawn Kill (
/showthread.php?tid=237150)
Anti Spawn Kill -
BlackWolf120 - 09.03.2011
hi,
first, i searched here on the board but i didnt find sth. i didnt find sth. new.
I tried to do an anti spawn kill protection with 2 different methods.
1.
pawn Код:
//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;
}
2.
pawn Код:
//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;
}
No method worked! I dont know why. Also the seconds one caused lag like hell with 8 players on the server.
Pls help...
regards.
Re: Anti Spawn Kill -
BlackWolf120 - 09.03.2011
hi,
thx for ur answer.
But would this really make a difference?
Ill try it out but i dont think this one will work
but thank u for ur code