13.07.2010, 11:45
YOu can use other dialogs like :
And you have
then on
When You put
you dont need to put
Because that is mesage
You NEED to put
because that is list and you chose what yyou want
You NEED to put
because you wrote in this like little box
I hope that you understand this my TuT
BTW Sorry For My Bad English xD
Код:
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"AFK","You are now AFK","Thanks","Thanks");
Код:
if (strcmp("/gps", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "GPS System", "PD\nHospital \nBank \nCity Hall", "Chose", "Cancel"); //this dialog will show you when you wrote this command return 1; }
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
Код:
if(dialogid == 1) //this is dialog id { if(response) { new message[200]; if(listitem == 0) { format(message, 200, "Location set on: PD!", 0); //this is text when player select destination SetPlayerCheckpoint(playerid, 1537.0702,-1669.6351,13.3828,7.0); } else if(listitem == 1) { format(message, 200, Location set on: Hospital!", 1); //this is text when player select destination SetPlayerCheckpoint(playerid, 1186.9574,-1322.0541,13.5586,7.0); } else if(listitem == 2) { format(message, 200, "Location set on: Bank!", 1); //this is text when player select destination SetPlayerCheckpoint(playerid, 1460.1549,-1023.6053,23.8331,7.0); } else if(listitem == 2) { format(message, 200, "Location set on: City Hall!", 1); //this is text when player select destination SetPlayerCheckpoint(playerid, 1481.2764,-1742.8722,13.5469,7.0); } } }
Код:
DIALOG_STYLE_MSGBOX
Код:
OnDIalogResponse
Код:
DIALOG_STYLE_LIST
Код:
OnDialogResponse
Код:
DIALOG_STYLE_INPUT
Код:
OnDialogResponse
I hope that you understand this my TuT
BTW Sorry For My Bad English xD