Posts: 158
Threads: 50
Joined: Jul 2016
Reputation:
0
Hello, I want to make a command to display a dialog (DIALOG_STYLE_LIST), it lists all the created houses in the server, the houses system is based on MySQL database, anyway, I know how to list the houses, but my question is that if someone chooses a house, I want to display him a dialog: Remove House, Edit House Price. So how to know which house did he choose?
Posts: 1,266
Threads: 6
Joined: Oct 2014
Quote:
Originally Posted by SickAttack
Exactly.
|
Actually it will be "listitem Bai"
I've just tested this, didn't know about it lol, Thanks for info SickAttack. : o
Posts: 1,266
Threads: 6
Joined: Oct 2014
Quote:
Originally Posted by SickAttack
No, it's just "Bai".
pawn Code:
public OnPlayerConnect(playerid) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Server Rules", "a\nb\nc", "Yes", "No"); return 1; }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { printf("%s", inputtext); return 1; }

|
oh, yea you're correct lol I forgot I put listitem word in the print function lol.
Posts: 4,759
Threads: 33
Joined: Dec 2013
Reputation:
0
You could do that, or you could put the house ID first and get it directly. Or you could do the second option I described above. It's up to you, really.