13.08.2018, 11:47
So I made a place for AFK users whenever the system checks if the player is in the same position for 1 minute, everything works except the timers, they don't stop.
Here's the afk system
Timers I want to stop:
Here's the afk system
Код:
if(AFK[i] == 60) { AFK[i] = 0; IsAFK[i] = true; SendClientMessage(i, -1, "{cc99ff}(afk) Don't go afk in public places, go /lounge instead."); SendClientMessage(i, -1, "{cc99ff}(lounge) Type /back once you are back to the game."); KillTimer(dmgtimer); KillTimer(AFKTime[i]); KillTimer(respecttimer); SetPlayerPos(i, -794.806396,497.738037,1376.195312); SetPlayerInterior(i, 1); SetPlayerVirtualWorld(i,10); IsPlayerInLobby[i] = 1; SetPlayerHealth(i, 99999); ResetPlayerWeapons(i); }
Код:
new dmgtimer; new respecttimer; new AFKTime[MAX_PLAYERS]; AFKTime[playerid] = SetTimer("AFKCheck",1000,1); dmgtimer = SetTimerEx("CountPlayerDamage", 900000, 1, "i", playerid); respecttimer = SetTimerEx("CountPlayerRespect", 360000, 1, "i", playerid);