25.07.2014, 22:45
Hello , anyone knows a code for Anti Spawn Kill (With Out Timers)? because its make server lag when u have much players
#define FLOAT_INFINITY (Float:0x7F800000)
antispawnkill[MAX_PLAYERS]= 0; //a global variable that you have to put somewhere in the top of your script
//onplayerspawn callback
antispawnkill[playerid] = gettime();
SetPlayerHealth(playerid, FLOAT_INFINITY);
if(gettime() - antispawnkill[playerid] < 10)/*10 stands for 10 seconds*/ return SetPlayerHealth(playerid, 100);
if(gettime() - antispawnkill[playerid] < 10)/*10 stands for 10 seconds*/ return SetPlayerHealth(playerid, 100);
if(gettime() - antispawnkill[playerid] < 10)/*10 stands for 10 seconds*/ return SetPlayerHealth(playerid, 100);