OnDialogResponse button2 isn't working - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnDialogResponse button2 isn't working (
/showthread.php?tid=270100)
OnDialogResponse button2 isn't working -
Shockey HD - 19.07.2011
Код:
if(response == 0)
{
ShowPlayerDialog(playerid,13,DIALOG_STYLE_LIST,"{FF002B}ShockAdmin Cars","Taxi\nWashington\nBobcat\nMr Whoopee\nBF Injection\nHunter\nPremier\nEnforcer\nSecuricar\nBanshee\nPredator\nBus\nRhino\nBarracks\nHotknife\nArticle Trailer\nPrevion\nCoach\nCabbie\nStallion\nRumpo\nRomero\nPacker\nMonster\nAdmiral\nSquallo\nSeasparrow\n","Select","Next>");
return 1;
}
That code dosnt Open the dialog. Why?
Re: OnDialogResponse button2 isn't working -
DRIFT_HUNTER - 19.07.2011
Try remove \n at the end, and remove >
Also i noticed that you calling that dialog from another dialog if player click
second button so maybe thats a mistake
Re: OnDialogResponse button2 isn't working -
Shockey HD - 19.07.2011
Quote:
Originally Posted by DRIFT_HUNTER
Try remove \n at the end, and remove >
Also i noticed that you calling that dialog from another dialog if player click second button so maybe thats a mistake
|
Im making a CarSpawner from dialog listing all the cars in dialogs. Maximum Cars take up the dialog. \n at the end has to be there. "next>" thats just a test label for the button. And i want it so you click Next another dialog opens...
Re: OnDialogResponse button2 isn't working -
DRIFT_HUNTER - 19.07.2011
Quote:
Originally Posted by Shockey HD
Im making a CarSpawner from dialog listing all the cars in dialogs. Maximum Cars take up the dialog. \n at the end has to be there. "next>" thats just a test label for the button. And i want it so you click Next another dialog opens...
|
I know what is what and what are you making but there are the things called BUGS
Re: OnDialogResponse button2 isn't working - Emmet_ - 19.07.2011
pawn Код:
if(response)
{
ShowPlayerDialog(playerid,13,DIALOG_STYLE_LIST,"{FF002B}ShockAdmin Cars","Taxi\nWashington\nBobcat\nMr Whoopee\nBF Injection\nHunter\nPremier\nEnforcer\nSecuricar\nBanshee\nPredator\nBus\nRhino\nBarracks\nHotknife\nArticle Trailer\nPrevion\nCoach\nCabbie\nStallion\nRumpo\nRomero\nPacker\nMonster\nAdmiral\nSquallo\nSeasparrow\n","Select","Next>");
return 1;
}
It's because you're doing if(response == 0) (called when the player presses 'No') instead of if(response), so when the player presses the 'yes' button, they won't be shown the dialog because that code is called when the player presses the 'no' button!
Re: OnDialogResponse button2 isn't working -
Shockey HD - 19.07.2011
Quote:
Originally Posted by 69Playa
pawn Код:
if(response) { ShowPlayerDialog(playerid,13,DIALOG_STYLE_LIST,"{FF002B}ShockAdmin Cars","Taxi\nWashington\nBobcat\nMr Whoopee\nBF Injection\nHunter\nPremier\nEnforcer\nSecuricar\nBanshee\nPredator\nBus\nRhino\nBarracks\nHotknife\nArticle Trailer\nPrevion\nCoach\nCabbie\nStallion\nRumpo\nRomero\nPacker\nMonster\nAdmiral\nSquallo\nSeasparrow\n","Select","Next>"); return 1; }
It's because you're doing if(response == 0) (called when the player presses 'No') instead of if(response), so when the player presses the 'yes' button, they won't be shown the dialog because that code is called when the player presses the 'no' button!
|
Now when i click the Select button, it spawns my car but then it opens the second dialog. I want the button on the right to open the next dialog
Re: OnDialogResponse button2 isn't working -
=WoR=Varth - 19.07.2011
pawn Код:
if(response)
{
ShowPlayerDialog(playerid,13,DIALOG_STYLE_LIST,"{FF002B}ShockAdmin Cars","Taxi\nWashington\nBobcat\nMr Whoopee\nBF Injection\nHunter\nPremier\nEnforcer\nSecuricar\nBanshee\nPredator\nBus\nRhino\nBarracks\nHotknife\nArticle Trailer\nPrevion\nCoach\nCabbie\nStallion\nRumpo\nRomero\nPacker\nMonster\nAdmiral\nSquallo\nSeasparrow\n","Select","Next>");
return 1;
}
else //Show the next dialog