How do I make a CMD that gives a dialog?
#1

How would I make a command that gives a dialog with options? (like a control panel)

I want it to be like an admin control panel where you can type, "/acp"

Then it gives you the following options,
- Punish > (another dialog with the following) Ban, Prison, Kick

- Teleport > (another dialog with the following) "Teleport player to ...", "Go to ...", "Get player"
Then if you select "Teleport player to ..." It gives you another dialog where you can type the ID of the player and then another dialog which gives you a bunch of options of places to teleport that player to.

- Staff Management > lists all admins (if online> green name | if offline> red name)
Where then you can select "Manage" or "Back"

If you click Manage it gives you options to set his admin level, sub admin rank, ect

If you click back it brings you back to the main ACP dialog
Reply
#2

I think you should learn how to use OnDialogResponse instead of requesting easy scripts. The best method to learn this callback is watching some Weapons Dialog System Filterscripts and how they scripted the full weapon shop system.
Here is one of them: https://sampforum.blast.hk/showthread.php?tid=113777

And i also think that you better make all of these things as a commands instead of making a large scripts of dialogs.
Reply
#3

Thanks, I appreciate it!

I'm trying to make a unique script from complete scratch, I've got a BUNCH of ideas already planned out but I'm extremely new to scripting.

I'd rather not have the simple /ban /prison commands
Reply
#4

Ejected. I'm trying to do that as well. this is how you do it:

Код:
cmd:dialog
{
ShowPlayerDialog(Your dialog)
return 1;
}
But you have to pre-script a dialog at OnDialogResponse.
Reply
#5

Very nice idea. I made a small script simular to your idea, It is used once an admin clicks on a player (TAB then double click on player). This can be helpful for you as this fs uses dialog. Edit it as you want. https://sampforum.blast.hk/showthread.php?tid=271876
Reply
#6

Quote:
Originally Posted by Amel_PAtomAXx
Посмотреть сообщение
Very nice idea. I made a small script simular to your idea, It is used once an admin clicks on a player (TAB then double click on player). This can be helpful for you as this fs uses dialog. Edit it as you want. https://sampforum.blast.hk/showthread.php?tid=271876
Nice work!
Reply


Forum Jump:


Users browsing this thread: