SA-MP Forums Archive
HELP---Command when select in the menu - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HELP---Command when select in the menu (/showthread.php?tid=118078)



HELP---Command when select in the menu - Shinoda90 - 03.01.2010

Hello,
At first I created a menu.
When you select a menu item in the menu, then he should run a command.
For example:
I choose the first menu option (rules). Then he should run the command /rules.

How can I write that?

if(GetPlayerMenu(playerid) == helpmain)
{
switch(row)
{
case 0:
{
rules();
TogglePlayerControllable(playerid, 1);
HideMenuForPlayer(helpmain,playerid);
}
..................................
public rules();
{
Here he should run the command /rules
}

Thanks.


Re: HELP---Command when select in the menu - Shinoda90 - 03.01.2010

Yes, that was not the answer I had hoped for, but you give me a good idea.
Thank you.