09.05.2012, 20:04
pawn Код:
if(strcmp(cmd, "/trabalhar", true) == 0)
{
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode trabalhar na cadeia!");
return true;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(admtrampando[playerid] > 0)
{
admtrampando[playerid] = 0;
if(PlayerInfo[playerid][pAdmin] >= 1340)
{
SetTimerEx("Administrador", 100, true, "i", playerid);
}
else
{
GetPlayerName(playerid,sendername,sizeof(sendername));
SendClientMessageToAll(COLOR_AZULBB, "|_______________ Administraзгo _______________|");
format(string, 128, "{00BFFF}Admin: %s estб Jogando, Veja mais em {E0EEE0}/admins",sendername, playerid);
SendClientMessageToAll(0xFFFBF8AA, string);
KillTimer(TempoAdministrador);
SetPlayerToTeamColor(playerid);
ResetPlayerWeaponsEx(playerid);
SetPlayerHealth(playerid,100);
getdate(year, month, day);
gettime(hour,minute,second);
format(gstring, sizeof(gstring), "%s esta jogando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
AdminLog(gstring);
}
}
else
{
admtrampando[playerid] = 1;
if(PlayerInfo[playerid][pAdmin] >= 1340)
{
SetTimerEx("Administrador", 100, true, "i", playerid);
return false;
}
else
{
GetPlayerName(playerid,sendername,sizeof(sendername));
SendClientMessageToAll(COLOR_AZULBB, "|_______________ Administraзгo _______________|");
format(string, 128, "{00BFFF}Admin: %s estб Trabalhando, veja mais em {E0EEE0}/admins",sendername, playerid);
SendClientMessageToAll(0xFFFBF8AA, string);
SetPlayerToTeamColor(playerid);
TempoAdministrador = SetTimerEx("Administrador", 100, true, "i", playerid);
getdate(year, month, day);
gettime(hour,minute,second);
format(gstring, sizeof(gstring), "%s esta trabalhando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
AdminLog(gstring);
}
}
}
return true;
}