11.03.2011, 07:10
I need this code to make a wanted list in textdraw, autoupdating for my server but i'm not sure this is possible. When a cop type /wanted, will appear wanted list in textdraw end disappear when type again /wanted. Can make someone this code?
Код:
if(strcmp(cmd, "/wanted", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || IsACop(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(string, sizeof(string), "%s%s: %d", string,giveplayer,WantedLevel[i]); x++; if(x > 3) { SendClientMessage(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] = '.'; SendClientMessage(playerid, COLOR_YELLOW, string); } } else { SendClientMessage(playerid, COLOR_GREY, " You're not a Cop / FBI / National Guard !"); } }//not connected return 1; }