Respond to another Dialog. -
BleverCastard - 07.01.2012
Hello,
I created a Dialog for /weapons.
But Instead I wanna use /locker and it opens a Dialog showing "Weapons" "Clothing" But I dunno how that would work.
I'm not sure how to make it bring up another dialog.
Thanks.
Re: Respond to another Dialog. -
BlackWolf120 - 07.01.2012
you have to define the DialogID's.
pawn Код:
define Weapon_Dialog 1
define Other_Dialog 2
//etc.
//then use the switch/case system to call the certain dialogs under OnPlayerDialogResponse.
Re: Respond to another Dialog. -
BleverCastard - 07.01.2012
So when im doing OnDialogResponse, How do I make it open Dialog 2?
EDIT: Dialog 1 opens "Weapons" "Clothing" Dialog 2 opens "Weapons"
Re: Respond to another Dialog. -
BlackWolf120 - 07.01.2012
i cant tell u...
Show me your code please.
Re: Respond to another Dialog. -
BleverCastard - 07.01.2012
I havent made it.
Also, I made a dialog (/buygun) for a Weapon store, my friend bought a Deagle and it banned him for hacking, help?
Re: Respond to another Dialog. -
BlackWolf120 - 07.01.2012
that is caused by ur anti cheat FS.
You have loaded it but didnt adjust ur script to the anti cheat script (i suppose it uses serverside weapons[vars])
You have problems without even have tried smth.?
If you implement a cmd that opens a certain dialog and the same dialog is opened when u enter another command then you propably entered the same dialog to open twice?
Sorry cant do much for u without no code...
Re: Respond to another Dialog. -
BleverCastard - 07.01.2012
I dont have a Anti-hack FS Lol. Infact I dont have NO FS.
And Dont matter forget the Dialog thing. I need help on that hack thing.
Re: Respond to another Dialog. -
BleverCastard - 07.01.2012
Ok, I made a command /weapons and it opens a dialog. Well, I want to make a dialog "/locker" and I want to use the "/weapons" Dialog. So I wanna make a dialog pop up when you type /locker and it says "Weapons" "Clothing". When you click on "Weapons" I want the /weapons dialog to respond.. Hope that clears it
Re: Respond to another Dialog. -
BlackWolf120 - 07.01.2012
if ur friend is banned by buying an Eagle you must have a kinda anti cheat code on the server.
about dialogs:
pawn Код:
#define Dialog1 1
#define Dialog2 2
//etc.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case Dialog1:
{
if(response)
{
switch(listitem)
{
case 0://When he clicks on first item
{
//open then 2nd dialog.
}
case 1://When he clicks on second item
{
//open the next dialog.
}
}
}
}
case Dialog2:
{
//stuff for the next dialog...
}
}
return 1;
}
Re: Respond to another Dialog. -
BleverCastard - 07.01.2012
Can I use for example:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case Dialog1:
{
if(response)
{
switch(listitem)
{
case 0://When he clicks on first item
{
// Can I use here: "ShowPlayerdialog(playerid, "/weapon dialog id here" ----------);
}
case 1://When he clicks on second item
{
//open the next dialog.
}
}
}
}
case "/weapon dialog id here":
{
// Stuff here.
}
}
return 1;
}