25.07.2014, 23:43
Why don't you try using gettime or gettickcount ?
Edit:
An example:
Edit:
An example:
pawn Код:
#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);