i trying to make it but. cant go more.the viewmodel need equal to what he have gun.i did this with copy-paste but cant go more
Code:
#include <amxmodx>
#include <fakemeta>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
new AK47[] = "models/uwc/v_AK47.mdl"
new M4A1[] = "models/uwc/v_M4A1.mdl"
new AUG[] = "models/uwc/v_AUG.mdl"
cs_get_user_model(id, model, charsmax(model))
cs_get_weapon_info(weapon_id, CsWeaponInfo:type)
cs_get_weapon_id(index)
public plugin_init()
{
register_plugin("Silah",VERSION,"Artorias");
register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
register_forward(FM_SetModel, "fw_SetModel")
RegisterHam(Ham_Spawn, "player", "Spawn", 1)
}
public plugin_precache()
{
precache_model(AK47)
precache_model(M4A1)
precache_model(AUG)
}
public Spawn(id)
if (equal(model, "urban))
{
public fw_SetModel
{
set_pev(id, pev_viewmodel2, VIEW_MODEL)
return PLUGIN_CONTINUE
}
}
return HAM_IGNORED
}