04.01.2013, 13:52
pawn Код:
if(strcmp(cmdtext, "/trabalhar", true) == 0)
{
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode trabalhar na cadeia!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(admtrampando[playerid] > 0)
{
admtrampando[playerid] = 0;
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, 128, "Admin: %s ID(%d) estб Jogando.",sendername, playerid);
SendClientMessageToAll(COLOR_DBLUE, string);
KillTimer(TempoAdministrador);
SetPlayerToTeamColor(playerid);
ResetPlayerWeaponsEx(playerid);
SetPlayerHealth(playerid,100);
SetPlayerSkin(playerid,skinadm[playerid]);
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;
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, 128, "Admin: %s ID(%d) estб Atendendo.",sendername, playerid);
SendClientMessageToAll(COLOR_DBLUE, string);
SetPlayerColor(playerid, 0xDDFF58AA);
TempoAdministrador = SetTimerEx("Administrador", 100, true, "i", playerid);
skinadm[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid,217);
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 1;
}