Help whit this code
#1

Hi guys, I have this code:

Код:
public AFK(playerid)
{
    GetPlayerPos(playerid, Posiciones[playerid][0], Posiciones[playerid][1], Posiciones[playerid][2]);
	if(Posiciones[playerid][0] == Posiciones[playerid][3] && Posiciones[playerid][1] == Posiciones[playerid][4] && Posiciones[playerid][2] == Posiciones[playerid][5])
    {
     	if(EstaAFK[playerid] == 0)
        	{
			new pName[MAX_PLAYER_NAME],string[120];
			GetPlayerName(playerid, pName, sizeof(pName));
			format(string, sizeof(string), ">> Admin kick d %s for the reason: max time afk", pName );
			SendClientMessageToAll(COLOR_ORANGE, string);
			format(string, sizeof(string), "you are kicked for afk." );
			SendClientMessage( playerid, COLOR_RED, string);
			printf( "( %s ) (ID:%d) kicked afk", pName, playerid );
			SetTimerEx("KickPlayer",500,false,"i",playerid );
			return 1;
		 	}
	 	else

	 {
		    Posiciones[playerid][3] = Posiciones[playerid][0];
			Posiciones[playerid][4] = Posiciones[playerid][1];
			Posiciones[playerid][5] = Posiciones[playerid][2];
		    KillTimer(TAFK[playerid]);
		    TAFK[playerid] = SetTimerEx("AFK", TIEMPO, 1, "i", playerid);
	    	return 1;
		}
	}
	else
	{
	    Posiciones[playerid][3] = Posiciones[playerid][0];
		Posiciones[playerid][4] = Posiciones[playerid][1];
		Posiciones[playerid][5] = Posiciones[playerid][2];
	    KillTimer(TAFK[playerid]);
	    TAFK[playerid] = SetTimerEx("AFK", TIEMPO, 1, "i", playerid);
	    return 1;
	}
}
And I need this feature does not apply if:

Код:
	if ( pData[ playerid ][ P_LEVEL ] >= _:P_LEVEL_MOD || IsPlayerAdmin( playerid ) )
As would be? I'm new to pawn, apologize. regards
Reply


Messages In This Thread
Help whit this code - by Guss - 10.03.2015, 02:14
Re: Help whit this code - by Jefff - 10.03.2015, 02:29
Respuesta: Re: Help whit this code - by Guss - 10.03.2015, 03:34

Forum Jump:


Users browsing this thread: 1 Guest(s)