Creating a command list in dialog -
FreAkeD - 04.01.2014
Hi all,
This is a question that I've been wondering ages for.
The problem is I want to create a command list in a dialog. Problem is I use zcmd, and I don't know how to create a dialog with it. Any help is appreciated, I'm new to this
Re: Creating a command list in dialog -
K9IsGodly - 04.01.2014
For me, I learn better by visualizing someone else's code and then going off of that. So here's an example that might help you in some way. I use ZCMD as well, and it's not as hard as you'd think it is. To make a dialog in ZCMD, simply setup your command, whatever you want that to be. Then do something like this, for me it's a /spawncar command. Just use the ShowPlayerDialog function, and then whatever you want the dialog id to be, type of dialog, and in those parentheses is where you'd write whatever you want in your dialog. Since you're making a stats command, I don't know what type of dialog you'd use. But hopefully this gave you some idea for making a dialog. This is the best I could come up with, because I'm pretty new to scripting pawn as well.
Код:
CMD:spawncar(playerid, params[])
{
ShowPlayerDialog(playerid,12,DIALOG_STYLE_LIST,"Cars:","Infernus\nElegy\nTurismo\n","Select","Cancel");
return 1;
}
Re: Creating a command list in dialog -
FreAkeD - 04.01.2014
Quote:
Originally Posted by K9IsGodly
For me, I learn better by visualizing someone else's code and then going off of that. So here's an example that might help you in some way. I use ZCMD as well, and it's not as hard as you'd think it is. To make a dialog in ZCMD, simply setup your command, whatever you want that to be. Then do something like this, for me it's a /spawncar command. Just use the ShowPlayerDialog function, and then whatever you want the dialog id to be, type of dialog, and in those parentheses is where you'd write whatever you want in your dialog. Since you're making a stats command, I don't know what type of dialog you'd use. But hopefully this gave you some idea for making a dialog. This is the best I could come up with, because I'm pretty new to scripting pawn as well.
Код:
CMD:spawncar(playerid, params[])
{
ShowPlayerDialog(playerid,12,DIALOG_STYLE_LIST,"Cars:","Infernus\nElegy\nTurismo\n","Select","Cancel");
return 1;
}
|
Thanks for that, I'll try it out
Re: Creating a command list in dialog -
K9IsGodly - 04.01.2014
Quote:
Originally Posted by FreAkeD
Thanks for that, I'll try it out 
|
I wouldn't use DIALOG_STYLE_LIST if you plan to make a stats command.
Re: Creating a command list in dialog -
FreAkeD - 04.01.2014
Quote:
Originally Posted by K9IsGodly
I wouldn't use DIALOG_STYLE_LIST if you plan to make a stats command.
|
I need the one made for a list in a dialog..
Re: Creating a command list in dialog -
K9IsGodly - 04.01.2014
Well you could do DIALOG_STYLE_LIST, but you are limited to the amount of things you can put in that list.
Re: Creating a command list in dialog -
FreAkeD - 04.01.2014
Quote:
Originally Posted by K9IsGodly
Well you could do DIALOG_STYLE_LIST, but you are limited to the amount of things you can put in that list.
|
Righto, thanks for the help
Re: Creating a command list in dialog -
K9IsGodly - 04.01.2014
Quote:
Originally Posted by FreAkeD
Righto, thanks for the help
|
Yeah no problem, glad I could help someone with my very limited knowledge of pawn scripting.