Quote:
Originally Posted by zirualas
Plz help me, don't lougt 
|
Typing amx_plugins will only show a certain amount of plugins. Type amx_plugins 11, if you don't see it there, type amx_plugins 21. Keep going up by ten like:
amx_plugins 11
amx_plugins 21
amx_plugins 31
Until you get to a page with no plugins listed. If you don't see your plugin, or you DO see it and it says "BAD LOAD" tell me.
PHP Code:
#include <amxmodx>
#include <fun>
public plugin_init()
{
register_clcmd( "say /vipmenu", "VIPMenu" );
register_clcmd( "say_team /vipmenu", "VIPMenu" );
}
public VIPMenu( id )
{
new vip_menu = menu_create( "\rVip meniu:", "menu_handler" );
menu_additem( vip_menu, "\wMaza gravitacija", "1", 0 );
menu_additem( vip_menu, "\wGive USP", "2", 0 );
menu_setprop( vip_menu, MPROP_EXIT, MEXIT_ALL );
menu_display( id, vip_menu, 0 );
}
public menu_handler( id, menu, item )
{
if( item == MENU_EXIT )
{
menu_destroy( menu );
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo( menu, item, access, data,5, iName, 63, callback );
new key = str_to_num( data );
switch( key )
{
case 1:
{
if( is_user_alive( id ) )
{
set_user_health( id, 150 ); //Sets health of id to 150
set_user_armor( id, 200 ); //Sets armor of id to 200
}
}
case 2:
{
if( is_user_alive( id ) )
{
give_item( id, "weapon_usp" ); //Gives id a USP
give_item( id, "ammo_45acp" ); //Gives id USP ammo
}
}
}
menu_destroy( menu );
return PLUGIN_HANDLED;
}
Tested this code in my server. Worked fine.
__________________