OnDialogResponse - 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: OnDialogResponse (
/showthread.php?tid=501761)
OnDialogResponse -
Ananisiki - 20.03.2014
pawn Код:
if(dialogid == DIALOG_NWEAPONS)
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 9 , 1);
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 22, 3000);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 23, 3000);
}
if(listitem == 3)
{
GivePlayerWeapon(playerid, 24 , 3000);
}
if(listitem == 4)
{
GivePlayerWeapon(playerid, 25 , 3000);
}
if(listitem == 5)
{
GivePlayerWeapon(playerid, 26 , 3000);
}
if(listitem == 6)
{
GivePlayerWeapon(playerid, 27 , 3000);
}
if(listitem == 7)
{
GivePlayerWeapon(playerid, 28, 3000);
}
if(listitem == 8)
{
GivePlayerWeapon(playerid, 29 , 3000);
}
if(listitem == 9)
{
GivePlayerWeapon(playerid, 30, 3000);
}
if(listitem == 10)
{
GivePlayerWeapon(playerid, 31, 3000);
}
if(listitem == 11)
{
GivePlayerWeapon(playerid, 32 , 3000);
}
if(listitem == 12)
{
GivePlayerWeapon(playerid, 33 , 3000);
}
if(listitem == 13)
{
GivePlayerWeapon(playerid, 34 , 3000);
}
}
}
When i try to give the first opinion (chainsaw) it gives me a golf club instead, and if i try to pick #2 it gives me a nightstick, if i try the other numbers it doesn't give me..
Re: OnDialogResponse -
]Rafaellos[ - 20.03.2014
Show us the ShowPlayerDialog.
Re: OnDialogResponse -
azzerking - 20.03.2014
Could you show us your ShowPlayerDialog?
and your whole code for OnDialogResponse.
Re: OnDialogResponse -
Ananisiki - 03.04.2014
Bump
AW: OnDialogResponse -
Macronix - 03.04.2014
Mmh, can you show me your command or function where you put ShowPlayerDialog like the others said?
Also put it like this:
pawn Код:
if(dialogid == DIALOG_NWEAPONS)
{
if(response)
{
switch(listitem)
{
case 0: GivePlayerWeapon(playerid, 9 , 1);
case 1: GivePlayerWeapon....
//and so on...
}
}
}
Re: OnDialogResponse -
EiresJason - 03.04.2014
Show us where you use the dialog.
It should be something like:
pawn Код:
ShowPlayerDialog(playerid, DIALOG_NWEAPONS, DIALOG_STYLE_LISTITEM, "Weapons", "Brass Knuckles\nNightstick..(and then the rest)", "Select", "Cancel");
Re: OnDialogResponse -
Ananisiki - 03.04.2014
EDIT: Thanks.....