10.03.2015, 02:14
Hi guys, I have this code:
And I need this feature does not apply if:
As would be? I'm new to pawn, apologize. regards
Код:
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; } }
Код:
if ( pData[ playerid ][ P_LEVEL ] >= _:P_LEVEL_MOD || IsPlayerAdmin( playerid ) )