06.11.2013, 03:29
PHP код:
CMD:presos(playerid, params[])
{
static motivo_preso[17], str[128], pname[21], bool:contem_presos;
contem_presos = false;
SendClientMessage(playerid, COR_PRINCIPAL, "** Todos os presos online:");
for(new ii; ii != MAX_PLAYERS; ii++)
{
if(!PlayerInfo[ii][pLogado]) continue;
if(PlayerInfo[ii][pPresoLS] >= 1 || PlayerInfo[ii][pPresoSF] >= 1 || PlayerInfo[ii][pPresoLV] >= 1 || PlayerInfo[ii][pPresoADM] >= 1)
{
contem_presos = true
GetPlayerName(playerid, pname, 21);
motivo_preso = PlayerInfo[ii][pPresoLS] ? ("DP LS") : PlayerInfo[ii][pPresoSF] ? ("DP SF") : PlayerInfo[ii][pPresoLV] ? ("DP LV") : ("Preso pelo Admin");
format(str, 128, "Preso %s [Preso em: %s] [Tempo restante: %d segundos]", pname, motivo_preso, PlayerInfo[ii][pTempoPreso]);
SendClientMessage(playerid, 0xE3E3E3FF, str);
}
}
if(!contem_presos) SendClientMessage(playerid, 0xD8D8D8FF, "Nгo tem nenhum preso on-line agora!");
return 1;
}
PHP код:
CMD:procurados(playerid, params[])
{
static str[40], pname[21], bool:contem_procurado;
contem_procurado = false;
GetPlayerName(playerid, pname, 21);
printf("[Comando] %s digitou /procurados!", pname);
SendClientMessage(playerid, COR_PRINCIPAL, "** Todos os procurados online:");
for(new ii; ii != MAX_PLAYERS; ii++)
{
if(!PlayerInfo[ii][pLogado] || !PlayerInfo[ii][pProcurado]) continue;
contem_procurado = true;
GetPlayerName(playerid, pname, 21);
format(str, 40, "%s [Nivel %d]", pname, PlayerInfo[i][pProcurado]);
SendClientMessage(playerid, 0xE3E3E3FF, str);
}
if(!contem_procurado) SendClientMessage(playerid, 0xD8D8D8FF, "Nгo tem nenhum procurado on-line agora!");
return 1;
}