02.01.2019, 17:41
Hi, I've problem with players in DIALOG_STYLE_LIST.
I show in dialog PlayerNames, code:
Now, I need for example show player stats using function "ShowPlayerStats(playerid)" (this show dialog with stats).
How I get listitem == id player on list? Someone have solution?
I show in dialog PlayerNames, code:
PHP Code:
new string[512], players[512], countPlayers;
foreach(Character, i){
if(PlayerInQueue[i] == true){
format(players, sizeof(players), "%s", GetPlayerName(i));
strcat(string, "\n");
strcat(string, players);
countPlayers++;
}
}
if(countPlayers == 0){
SendClientMessage(playerid, -1, "No Players");
}
ShowDialog(playerid, 34, DIALOG_STYLE_LIST, "Header", string, "Select", "Close");
Code:
if(dialogid == 34){ if(response){ //here I need get playerid from list } }