Raised This Month: $ Target: $400
 0% 

set model depending on client cvar


Post New Thread Reply   
 
Thread Tools Display Modes
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
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-29-2006 , 16:51  
Reply With Quote #2

Find somebody to convert it to the right hand.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Reply


Thread Tools
Display Modes

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