05.11.2013, 22:50
Eu fiz esses comandos aqui o objetivo dele й tu dar /procurados aparece quem sгo os procurados da policia e o /presos pra sabe quem sгo os presos
pawn Код:
CMD:presos(playerid, params[])
{
SendClientMessage(playerid, COR_PRINCIPAL, "** Todos os presos online:");
new admtext[64];
new count=0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pPresoLS] >= 1) { admtext = "DP LS"; }
if(PlayerInfo[i][pPresoSF] >= 1) { admtext = "DP SF"; }
if(PlayerInfo[i][pPresoLV] >= 1) { admtext = "DP LV"; }
if(PlayerInfo[i][pPresoADM] >= 1) { admtext = "Preso pelo Admin"; }
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLogado] == 1)
{
if(PlayerInfo[i][pPresoLS] >= 1 || PlayerInfo[i][pPresoSF] >= 1 || PlayerInfo[i][pPresoLV] >= 1 || PlayerInfo[i][pPresoADM] >= 1)
{
new str[256];
new pname[24];
GetPlayerName(i, pname, 24);
format(str, 256, "Preso %s [Preso em: %s] [Tempo restante: %d segundos] [Abatido: %s", pname, admtext, PlayerInfo[i][pTempoPreso]);
SendClientMessage(playerid, 0xE3E3E3FF, str);
count++;
}
}
}
}
if(count == 0)
{
SendClientMessage(playerid, 0xD8D8D8FF, "Nгo tem nenhum preso on-line agora!");
}
return 1;
}
pawn Код:
CMD:procurados(playerid, params[])
{
new zstring[128];
new sendername[120];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(zstring, sizeof(zstring), "[Comando] %s digitou /procurados!", sendername);
print(zstring);
SendClientMessage(playerid, COR_PRINCIPAL, "** Todos os procurados online:");
new count=0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Logado[playerid] >= 1)
{
if(PlayerInfo[i][pProcurado] >= 1)
{
new str[256];
new pname[24];
GetPlayerName(i, pname, 24);
format(str, 256, "%s [Nivel %d] ", pname, PlayerInfo[i][pProcurado]);
SendClientMessage(playerid, 0xE3E3E3FF, str);
count++;
}
}
}
}
if(count == 0)
{
SendClientMessage(playerid, 0xD8D8D8FF, "Nгo tem nenhum procurado on-line agora!");
}
return 1;
}