I see what you guys are doing, but wouldn't be easier to use curweapon event instead of registering too many stuff?
Edit* just a thought
PHP Code:
public class_models(plr) {
static id = get_pdata_cbase( plr, 41, 4 )
if( is_user_alive(id) ) {
static weapon=get_user_weapon(id,_,_)
switch(weapon) {
case CSW_KNIFE:
{
if(player_class[id] != Ninja) {
entity_set_string(id, EV_SZ_viewmodel, KNIFE_VIEW)
entity_set_string(id, EV_SZ_weaponmodel, KNIFE_PLAYER)
}
}
case CSW_C4:
{
entity_set_string(id, EV_SZ_viewmodel, C4_VIEW)
entity_set_string(id, EV_SZ_weaponmodel, C4_PLAYER)
}
case CSW_HEGRENADE:
{
entity_set_string(id, EV_SZ_viewmodel, HE_VIEW)
entity_set_string(id, EV_SZ_weaponmodel, HE_PLAYER)
}
case CSW_FLASHBANG:
{
entity_set_string(id, EV_SZ_viewmodel, FL_VIEW)
entity_set_string(id, EV_SZ_weaponmodel, FL_PLAYER)
}
case CSW_SMOKEGRENADE:
{
entity_set_string(id, EV_SZ_viewmodel, SE_VIEW)
entity_set_string(id, EV_SZ_weaponmodel, SE_PLAYER)
}
}
}
}