30.10.2010, 23:36
Hello I would like a code when you are idle for 5 minutes you get automatically kicked, i need this to prevent abusing.
get the player position, and check it every 5 min to see if its the same.
if so, then kick. |
new Float:X, Float:Y, Float:Z
GetPlayerPos(playerid,X,Y,Z);
new speed = GetPlayerVelocity(playerid,X,Y,Z);
if (speed < 1) return SetTimer("checkidle",5mins,0);
if (speed > 0) return KillTimer("checkidle");
public checkidle(playerid)
{
if (speed < 1) return kick(playerid);
}
Really.. I dont know how to script this, very confusing..
I have an idea in my head.. pawn Код:
pawn Код:
{ |
I dont need if player is paused, thought that would become handy, and i might use it, i mean if player is idle (not paused) and he went for a nap or something he can get lots of money and stuff without even playing.
|