25.08.2016, 14:11
I've done it but need it in a dialog, anyone able to help?
Код:
CMD:wfdebt(playerid, params[]) { if(gTeam[playerid] == 2 || IsACop(playerid)|| PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] >= 6) { new string[128], x; SendClientMessageEx(playerid, COLOR_GREEN, "Current Wanted in Debt:"); foreach(Player, i) { if(GetPlayerCash(i) < 0) { format(string, sizeof(string), "%s%s: %d", string,GetPlayerNameEx(i),GetPlayerCash(i)); x++; if(x > 3) { SendClientMessageEx(playerid, COLOR_YELLOW, string); x = 0; format(string, sizeof(string), " "); } else { format(string, sizeof(string), "%s, ", string); } } } if(x <= 3 && x > 0) { string[strlen(string)-2] = '.'; SendClientMessageEx(playerid, COLOR_YELLOW, string); } } else { SendClientMessageEx(playerid, COLOR_GREY, " You're not a Cop / Debt Collectors or Government"); } return 1; }