hello all...can someone combine these plugin and make an admin cmd for it
PHP Code:
#include <amxmodx>
public plugin_init() {
register_plugin("Knife Only Mod", "0.1", "Amxx Community")
register_event("CurWeapon", "event_knife_off", "be", "1=0", "2=29")
register_cvar("amx_knives_only", "1")
}
public event_knife_off(id) {
if (!get_cvar_num("amx_knives_only"))
return
engclient_cmd(id, "weapon_knife")
client_print(id, print_center, "Knife only mode is on. You can't swith your weapons!")
}
and this plugin
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <csx>
#include <fun>
const g_GrenadeNum = 5;
public plugin_init() {
register_plugin("HE Only mode", "0.1", "Amxx Community")
register_event("CurWeapon", "event_he_off", "be", "1=0", "2=4")
register_cvar("amx_he_only", "1")
}
public event_he_off(id) {
if (!get_cvar_num("amx_he_only"))
return
engclient_cmd(id, "weapon_hegrenade")
client_print(id, print_center, "HE only mode is on. You can't swith your weapons!")
}
public grenade_throw( id , greindex , wId )
{
if ( wId == CSW_HEGRENADE )
cs_set_user_bpammo( id , CSW_HEGRENADE , g_GrenadeNum + 1 );
}
all i want is:
when i (admin) say /arena
the menu will appear like this
Arena mode:
1. Knife only mode
2. HE only mode
if admin choose 1. Knife only mode
so all the players must use knife only
if admin choose 2. HE only mode
so all the players must use HE only
when admin say /arenaoff
so arena mode will be off and all players can play for the normal mode...
can someone help me?