02.02.2014, 11:11
Hello , i want to make that if player have 5 Wanted levels to CreatePlayer3DTextLabel for player which says "-Most Wanted-" , i tried to make a timer but this did lag and ms i really stucked :S any ideas?
here is my code
here is my 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; }