Help with AFK
#1

I'm making and auto-afk checker

I used Redgies and modified it..

Код:
forward CheckAFK();
public CheckAFK()
{
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
	  if(PPos[i][1] == 0)
	  {
	    GetPlayerPos(i,PPos[i][0],PPos[i][1],PPos[i][2]);
	    return 1;
		}
		new Float:x,Float:y,Float:z;
		GetPlayerPos(i,x,y,z);
		if(x == PPos[i][0] && y == PPos[i][1] && z == PPos[i][2])
		{
		  AFKMins[i]++;
		  if(AFKMins[i] >= AFKTime)
		  {
		    if(AFK[i] == 0)
		    {
		    		AFK[i] = 1;
					TogglePlayerControllable(i,0);
					SetPlayerColor(i,COLOR_GREY);
					oldworld[i] = GetPlayerVirtualWorld(i);
					SetPlayerVirtualWorld(i,10);
					new string[256];
					format(string,sizeof(string),"[ ! ] %s is now in AFK mode!",GetName(i));
					SendClientMessageToAll(COLOR_GREY,string);
				}
			}
		}
	}
	return 1;
}
i enter or leave some place and it doesn't work

Any ideas?

NOTE: /back sets AFKMins to 0 and AFK to 0..
Reply


Messages In This Thread
Help with AFK - by coole210 - 23.05.2010, 02:19
Re: Help with AFK - by Bayler - 23.05.2010, 02:32
Re: Help with AFK - by coole210 - 23.05.2010, 03:33
Re: Help with AFK - by coole210 - 23.05.2010, 23:55
Re: Help with AFK - by coole210 - 24.05.2010, 16:19
Re: Help with AFK - by coole210 - 26.05.2010, 22:21
Re: Help with AFK - by Jefff - 27.05.2010, 01:09
Re: Help with AFK - by coole210 - 27.05.2010, 02:03

Forum Jump:


Users browsing this thread: 1 Guest(s)