26.08.2016, 18:09
Try this:
PHP код:
CMD:wfdebt(playerid, params[])
{
if(gTeam[playerid] == 2 || IsACop(playerid)|| PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pMember] == 7)
{
new string[128], x;
foreach(Player, i)
{
if(GetPlayerCash(i) < 0)
{
format(string, sizeof(string), "%s\n%s: \t %d$", string,GetPlayerNameEx(i),GetPlayerCash(i));
x++;
}
}
if(x != 0)
{
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_MSGBOX, "Current Players Wanted in Debt:", string, "Okay", "");
}
else
{
if(GetPlayerCash(playerid) > 1)
{
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_MSGBOX, "Current Players Wanted in Debt:", string, "Okay", "");
format(string, sizeof(string), "%s\nNo one is in debt!", string);
x++;
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, " You're not a Cop / Debt Collectors or Government");
}
return 1;
}

