18.02.2014, 12:19
Hello ,im wondering how to attach to player most wanted if he have 6 stars , i tried also at onplayerupdate its make lag because keep seting the text exceds iv this code;
Код:
if(strcmp(cmdtext, "/mostwanted", true) == 0) { new count = 1, name[24]; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) GetPlayerWantedLevel(i); if(GetPlayerWantedLevel(i) >= 5) { GetPlayerName(i, name, sizeof(name)); format(string, sizeof(string), "%s%s (%d) - Wanted Level: %d\n", string, name,i,GetPlayerWantedLevel(i)); count ++; } } if(count != 1) { ShowPlayerDialog(playerid, 26, DIALOG_STYLE_MSGBOX, "Most Wanted Players Online", string, "OK", ""); } else ShowPlayerDialog(playerid, 26, DIALOG_STYLE_MSGBOX, "Most Wanted Players Online", "No online wanted players.", "OK", ""); return 1; }