15.11.2013, 12:18
I would make it something like this, try to modify it to your needs:
Код:
// top of the script new TeleportTime[MAX_PLAYERS]; // on gamemodeinit SetTimer("OneSecTimer",1000,true); // under onplayerconnect TeleportTime[playerid] = -1; // under your command TeleportTime[playerid] = 10; public OneSecTimer() { foreach(Player, i) { if(TeleportTime[i] > 0 && TeleportTime[i] != -1) TeleportTime[i] --; else if(TeleportTime[i] == 0) // place here a stock or something for teleporting } } // and onplayertakedamage if(TeleportTime[playerid] > 0) TeleportTime[playerid] = 0;