SA-MP Forums Archive
Question - 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)
+--- Thread: Question (/showthread.php?tid=622239)



Question - StrikerZ - 20.11.2016

Is there any way to update a menu item. Ex -
PHP код:
AddMenuItem(test1"Yes"); 
. Changing Yes to No


Re: Question - StrikerZ - 20.11.2016

Anyone?


Re: Question - IceBilizard - 20.11.2016

Yes take this as example
I have tested this way and working for me.
PHP код:
new MenuString[50]; //At top of script
new Menu:Test;
CMD:menutext(playeridparams[])
{
    
DestroyMenu(Test);
    if(
sscanf(params"s[128]"MenuString)) return SendClientMessage(playeridCOLOR_RED"/menutext [text]");
    
Test CreateMenu("TestMenu"150.0160.0205.00.0);
    
SetMenuColumnHeader(Test0"Options:");
    
AddMenuItem(Test0MenuString);
    return 
1;