Raised This Month: $51 Target: $400
 12% 

Execute a plugin command from a menu.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
duce1nik
New Member
Join Date: Jul 2020
Old 07-04-2020 , 03:46   Execute a plugin command from a menu.
Reply With Quote #1

Hello,

How do I call a plugin command from a menu?

Below is example of what I have but it not working.


public Menu_Callback(Menu menu, MenuAction action, int param1, int param2){
switch (action)
{
case MenuAction_Select:
{
char item[32];
menu.GetItem(param2, item, sizeof(item));
if (StrEqual (item,"option1")){

ServerCommand("sm_strike");

}
else if(StrEqual(item, "option2")){
// Something else.
}
}
case MenuAction_End:
{
delete menu;
}
}
}
duce1nik is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode