Ok plugin compiles, i now have the ma_instagib command to activate the instagib, problem is cs_set_weapon_ammo. it keeps telling me i have a bad native error or something. here have a look:
Code:
public instagib(id)
{
if ( get_cvar_num("instagib") == 1 )
show_hudmessage(id,"Meta-Addons: Instagib Mode has been activated!")
if(is_user_alive(id))
set_user_health(id,1)
cs_set_user_money(id,1,0)
strip_user_weapons(id)
give_item(id,"weapon_scout")
give_item(id,"weapon_knife")
cs_set_weapon_ammo(id,3);
return PLUGIN_CONTINUE
}
here is the full plugin:
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define PLUGIN "Meta-Addons"
#define VERSION "0.1"
#define AUTHOR "Meta"
// Setting all the cvars and others here.
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("ResetHUD","event_resethud","b")
register_concmd("ma_instagib","instagib",ADMIN_KICK,"Instagib command")
register_cvar("instagib","0");
}
/* Starting the plugins functions */
public event_resethud(id) {
if(is_user_connected(id)) {
show_hudmessage(id,"Meta-Addons: Enabled! Created by Meta");
}
}
// ma_details is set here
public ma_details(id)
{
return PLUGIN_CONTINUE
}
// ma_instagib is set here
public instagib(id)
{
if ( get_cvar_num("instagib") == 1 )
show_hudmessage(id,"Meta-Addons: Instagib Mode has been activated!")
if(is_user_alive(id))
set_user_health(id,1)
cs_set_user_money(id,1,0)
strip_user_weapons(id)
give_item(id,"weapon_scout")
give_item(id,"weapon_knife")
cs_set_weapon_ammo(id,3);
return PLUGIN_CONTINUE
}
__________________