Raised This Month: $ Target: $400
 0% 

set model depending on client cvar


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
demot
New Member
Join Date: Mar 2006
Location: germany
Old 03-29-2006 , 14:45   set model depending on client cvar
Reply With Quote #1

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
demot is offline
Send a message via ICQ to demot Send a message via MSN to demot
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode