|
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
|
03-08-2010
, 23:49
Re: Help with Setting HP,AP,Gravity,etc..
|
#4
|
PHP Code:
// ...
public plugin_init() { register_plugin( "a", "1.0", "Wrecked" ) register_clcmd( "say /class", "yourfunc" ) }
public yourfunc( id ) { new menu = menu_create( "Choose Your Class:", "menu_handler" )
menu_additem( menu, "Option 1", "1", 0 ) menu_additem( menu, "Option 2", "2", 0 )
menu_setprop( menu, MPROP_EXIT, MEXIT_ALL ) // adds exit option
menu_display( id, menu, 0 ) // 3rd param is page to start on, rest self expl
return PLUGIN_CONTINUE; }
public menu_handler( id, menu, item ) // see AMXX Menu tut, not going to explain all { if( item == MENU_EXIT ) { menu_destroy( menu ) return PLUGIN_HANDLED; } new data[6] new name[64] new access new callback menu_item_getinfo( menu, item, access, data, 5, name, 63, callback ) new choice = str_to_num( data ) switch( choice ) { case 1: // Chose option 1 { // Set effects } case 2: // opt 2 { // effects } } menu_destroy( menu ) return PLUGIN_HANDLED; }
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
|
|
|
|