09.03.2011, 03:02
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.
2.
No method worked! I dont know why. Also the seconds one caused lag like hell with 8 players on the server.
Pls help...
regards.
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;
}
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;
}
Pls help...
regards.