21.09.2013, 04:15
e so 'jogar' com a variavel
pawn Код:
if(strcmp(cmdtext, "/afk", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
MSGPLAYER(playerid, COLOR_GREY,"{DDA0DD}B{FF0000}P{FFFF00}N{FFFFFF} Vocк nгo tem autorizaзгo para usar este comando.");
return 1;
}
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 8 && PlayerInfo[playerid][pAdmin] != 9 && PlayerInfo[playerid][pAdmin] != 10)
{
MSGPLAYER(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
if(away[playerid] == 0)
{
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, 128, "O Admin: {FF69B4}%s {FFFFFF}ID[%d] Estб Ausente/AFK e nгo recebera nenhum atendimento!",sendername, playerid);
SendClientMessageToAll(COLOR_WHITE, string);
SendClientMessage(playerid,COLOR_LIGHTRED," Vocк estб AFK agora!");
away[playerid] = 1;
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
}
if(away[playerid] == 1)
{
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, 128, "O Admin: {FF69B4}%s {FFFFFF}ID[%d] Estб de volta!",sendername, playerid);
SendClientMessageToAll(COLOR_WHITE, string);
away[playerid] = 0;
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
}
return true;
}