Quote:
Originally Posted by bcKq
PHP Code:
// option1 new szText[24]; formatex(szText, charsmax(szText), "%s", option1 ? "OPTION1 [ON]" : "OPTION1 [OFF]"); menu_additem(menu, szText); // option2 formatex(szText, charsmax(szText), "%s", option2 ? "OPTION2 [ON]" : "OPTION2 [OFF]"); menu_additem(menu, szText);
|
or simply this
Code:
// above plugin_init()
new bool:option1[ 33 ], bool:option2[ 33 ];
// in menu function
// option1
new szText[24];
formatex(szText, charsmax(szText), "OPTION1 [%s]", option1[ id ] ? "ON" : "OFF");
menu_additem(menu, szText);
// option2
formatex(szText, charsmax(szText), "OPTION2 [%s]", option2[ id ] ? "ON" : "OFF");
menu_additem(menu, szText);
if you didnt index the boolean then there would be only one on/off for anyone using that.. then anyone could turn on/off the option.
this way you can set individual settings on each index.
__________________