This should go to suggestions. Anyhow, here it is, pretty simple.
Code:
#include <amxmodx>
#include <engine>
new PLUGIN_NAME[] = "Custom Dualies"
new PLUGIN_AUTHOR[] = "Cheap_Suit"
new PLUGIN_VERSION[] = "1.0"
new VIEW_MODEL[] = "models/v_<model>.mdl"
//new PLAYER_MODEL[] = "models/p_<model>.mdl"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
}
public plugin_precache()
{
precache_model(VIEW_MODEL)
//precache_model(PLAYER_MODEL)
}
public Event_CurWeapon(id)
{
new Weapon_ID = read_data(2)
// if weapon is not elite then skip
if(Weapon_ID != CSW_ELITE) {
return PLUGIN_CONTINUE
}
// sets player's v model
entity_set_string(id, EV_SZ_viewmodel, VIEW_MODEL)
// sets player's p model
//entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODEL)
return PLUGIN_CONTINUE
}
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.