25.11.2012, 15:56
pawn Код:
if(strcmp(cmd, "/wanted", true) == 0)
{
new string2[128];
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pDBanned] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "** Voce foi banido do servico policial!");
return 1;
}
if(PlayerInfo[playerid][pDuty] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "** Voce nao esta em serviзo!");
return 1;
}
if(IsACop(playerid) || IsAFreecop(playerid))
{
new x;
SendClientMessage(playerid, COLOR_GREEN, "Current Wanted Suspects:");
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(WantedLevel[i] > 1)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string2, sizeof(string2), " %s: %d" ,giveplayer,WantedLevel[i]);
x++;
if(x > 3)
{
SendClientMessage(playerid, COLOR_YELLOW, string);
x = 0;
format(string2, sizeof(string2), " %s: %d" ,giveplayer,WantedLevel[i]);
}
else
{
format(string2, sizeof(string2), "%s, ", string);
}
}
}
}
if(x <= 3 && x > 0)
{
string[strlen(string2)-2] = '.';
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Voce nao e Cop / FBI / National Guard !");
}
}//not connected
return 1;
}
(25/11/2012)[14:55:59] Sonik_Paintballer [CMD] -> /wanted.
nao aparece o nick dos procurado e aparece essa hora