I developed a little script for you using Dialogs:
Add this on top of your script to define the dialog:
pawn Код:
#define help 1 // change the 1 to the next number of your last dialog...
Here's the actual cmd that will lead to the dialogs.
pawn Код:
CMD:help(playerid,params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Help", "1. Help Me\r\n2. Account\r\n3. Server\r\n4. Admins", "Select", "Exit");
return 1;
}
Now here's the dialogs, don't forget to read the comments.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == help)
{
if(response)
{
if(listitem == 0) // This is if the player selects "help me"
{
SendClientMessage(playerid, COLORHERE, "Enter Your Commands Here"); // If You Have Many Commands I Suggest Having Another SendClientMessage Line For Them. Replace "COLORHERE" with a color implemented in your script.
SendClientMessage(playerid, COLORHERE, "Enter Some Info Here"); // If You Have A Lot Of Info Also Use Another SendClientMessage Line For It. Replace "COLORHERE" with a color implemented in your script.
return 1;
}
else if(listitem == 1) // This is if the player selects "Account"
{
//Put A Code Here. Maybe You Can Make It Show There Stats
}
else if(listitem == 2) // This is if the player selects "server"
{
// Maybe You Can Put Info About Your Server Using SendClientMessage.
}
else if(listitem == 3) // This is if the player selects "admins"
{
// Maybe You Can Put A Code That Shows All The Admins That Are Online
}
}
}
return 0;
}
Hopefully this has helped you.