Dialog doesn't respond -
dahley5 - 06.06.2013
Hi all, I have made a little vehicle selection menu in my server. (learning the basics)
However when I use my dialog in-game it doesn't respond to any of the selections. Here's my codes:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/v", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Voertuig kiezen", "Turismo\nBMX", "Spawnen", "Annuleren");
return 1;
}
return 0;
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 2:
{
switch(listitem)
{
case 0:
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
CreateVehicle(451,x-3.0,y,z,0.0,1,1,-1);
}
case 1:
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreateVehicle(481,X-3.0,Y,Z,0.0,1,1,-1);
}
}
}
}
return 1;
}
return 0;
}
Re: Dialog doesn't respond -
SilverKiller - 06.06.2013
Look, did you use DialogID 2 in any other dialog?
Like in a FS,
Did you use ShowPlayerDialog(playerid, 2, bla bla); ?
P.S:
I can help you so fast with TeamViewer...
So please PM me your ID and Password of TeamViewer if you have it, if you don't have it please download it..
Re: Dialog doesn't respond -
dahley5 - 06.06.2013
uhm no I have 1 other dialog with id 1 so that's not a problem
do i put showplayerdialog in OnDialogResponse?
Re: Dialog doesn't respond -
SilverKiller - 06.06.2013
Quote:
Originally Posted by dahley5
uhm no I have 1 other dialog with id 1 so that's not a problem
do i put showplayerdialog in OnDialogResponse?
|
No,
By the way, do you mean you have 1 other dialog in your FS / Gm?
Please check all the FilterScripts who uses Dialogs in your server and check their DialogID..
P.S
Please just download TeamViewer if you don't have it.