SA-MP Forums Archive
Dialogs Click problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialogs Click problem (/showthread.php?tid=369184)



Dialogs Click problem - Jermi - 16.08.2012

Excuse me, I added a New dialogs and it was working, iswear but Now when i click on the dialog in game, Nothing Happen like before, Did i do anything wrong?


Re: Dialogs Click problem - oliver12 - 16.08.2012

You mean, u click on a dialog button, dialog disappears and nothing else? Or what?


Re: Dialogs Click problem - Jermi - 16.08.2012

Yes, but it was working, When i click on the dialog, it gives me the gun as i set it but now it is not, Did i do anything wrong


Re: Dialogs Click problem - oliver12 - 16.08.2012

Give the code what you wrote under OnPlayerDialogResponse


Re: Dialogs Click problem - [KHK]Khalid - 16.08.2012

So, what have you done right before it stopped working?


Re: Dialogs Click problem - Jermi - 16.08.2012

Please help me


Re: Dialogs Click problem - Jermi - 16.08.2012

Quote:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 88
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 31, 1000);
GivePlayerWeapon(playerid, 24, 1000);
GivePlayerWeapon(playerid, 29, 1000);
SendClientMessage(playerid, red, "THANKS FOR DONATION");
}
if(listitem == 1)
{
SetPlayerSkin(playerid, 165);
}
if(listitem == 2)
{
SetPlayerColor(playerid,COLOR_PURPLE);
}
if(listitem == 3)
{
SendClientMessage(playerid, red, "Error: We will add the toys soon");
}
}
return 1;
}
return 0;
}

Here
But the problem isn't on the code, it is on the script or something, i told you, IT - WAS - WORKING WITH ME BEFORE but now not, i think i did something and it disabled the Dialogs? xD


Re: Dialogs Click problem - oliver12 - 16.08.2012

The reason is:You have wrote return 0; at the end of the script. Write there return 1;


Re: Dialogs Click problem - Jermi - 16.08.2012

oliver, you are very sure?


Re: Dialogs Click problem - [KHK]Khalid - 16.08.2012

Quote:
Originally Posted by oliver12
Посмотреть сообщение
The reason is:You have wrote return 0; at the end of the script. Write there return 1;
Actually, it has to return 0, otherwise the other dialogs in other scripts won't be accessed.

Jermi, may you tell what have you done before this problem come up?