09.03.2010, 18:32
How would i show a list of all online players - Showing there name and ID,
Using DIALOG_STYLE_LIST
Using DIALOG_STYLE_LIST
new
tmp[ 50 ],
iString[ 512 ];
for(new c; c < MAX_PLAYERS; c++)
{
if(!IsPlayerConnected(c)) continue;
format(tmp,sizeof(tmp),"%s (ID: %d)\n",PlayerName(c), c);
strcat(iString,tmp);
}
ShowPlayerDialog( .. );
Originally Posted by Joe Torran C
I could do that without using strcat
|
Originally Posted by Joe Torran C
Anyway,
I have managed to get a list of players, But when a player clicks one: Example ID 0 So that would be case 0: i guess, How would i get it to do stuff for that player? Like how would i get the id of the player he picked or would it just be id 0? |
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case (YOUR_DIALOG_ID): { SendClientmessage(listitem, 0xFFFFFFFF, "bye dbag!"); ban(listitem); return 1; } } return 0; }