hi,
i want to replace the default deagle model with a custom one, but the problem is that this mdl is "cl_righthand" sensitive
that means that i have to set different models depending on the clients cvar "cl_righthand"
first i tried get_user_info() but it didn't work
recently i read that i should use query_client_cvar() instead, but it seems like i can't handle this function
thats what i have so far:
Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
public plugin_init()
{
register_plugin("custom weaponskins","0.1","demot");
register_event("CurWeapon","gun","be","1=1");
}
public gun(id)
{
new clip, ammo
new weap = get_user_weapon(id,clip,ammo)
if(is_user_alive(id)) {
if(weap == CSW_DEAGLE) {
entity_set_string(id, EV_SZ_viewmodel, "models/weaponsc/left/v_deagle.mdl") // i know that's not the right way to set mdls
entity_set_string(id, EV_SZ_model, "models/weaponsc/w_deagle.mdl") } // but entity_set_model() didn't work, dunno why
}
}
public plugin_precache()
{
precache_model("models/weaponsc/left/v_deagle.mdl");
precache_model("models/weaponsc/right/v_deagle.mdl");
precache_model("models/weaponsc/w_deagle.mdl");
}
can somebody plz help me to add the query of the client's value of the cvar "cl_righthand"?
btw. /me is noob