Dialog help - 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: Dialog help (
/showthread.php?tid=412947)
Dialog help -
Noles2197 - 03.02.2013
I made it to where when they pick 'Patrol', it will show this message box dialog telling them the items they get when they go on patrol. Problem is that when they press 'Select' for a positive response, they don't get any of the items.
Can someone help me?
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==12)
{
if(response)
switch(listitem)
{
case 0:
{
SetPlayerColor(playerid,-1);
SetPlayerArmour(playerid,0);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid,pInfo[playerid][Skin]);
}
case 1:
{
ShowPlayerDialog(playerid,13,0,"{0094FF}Patrol","Glock 9mm, nightstick, pepper spray, and body armor","Select","Cancel");
if(!response)
if(response)
{
SetPlayerColor(playerid,COLOR_BLUE);
GivePlayerWeapon(playerid,22,51);
GivePlayerWeapon(playerid,3,0);
GivePlayerWeapon(playerid,41,365);
SetPlayerArmour(playerid,100);
SetPlayerSkin(playerid,281);
}
}
}
return 1;
}
}
Re: Dialog help -
Windrush - 03.02.2013
change the dialog id
Re: Dialog help -
Fergy - 03.02.2013
You need to make new... Some like that:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==12)
{
if(response)
switch(listitem)
{
case 0:
{
SetPlayerColor(playerid,-1);
SetPlayerArmour(playerid,0);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid,pInfo[playerid][Skin]);
}
case 1:
{
ShowPlayerDialog(playerid,13,0,"{0094FF}Patrol","Glock 9mm, nightstick, pepper spray, and body armor","Select","Cancel");
}
}
return 1;
}
if(dialogid==13)
{
if(response == 1){
SetPlayerColor(playerid,COLOR_BLUE);
GivePlayerWeapon(playerid,22,51);
GivePlayerWeapon(playerid,3,0);
GivePlayerWeapon(playerid,41,365);
SetPlayerArmour(playerid,100);
SetPlayerSkin(playerid,281);
}
return 1;
}
}
Re: Dialog help -
]Rafaellos[ - 03.02.2013
Try to put all dialogs in 1 filterscript or gamemode, that helped me alot with this problem.