Raised This Month: $32 Target: $400
 8% 

set v_model based on w_model picked up


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fcastro16
Member
Join Date: Mar 2009
Old 06-01-2017 , 12:10   set v_model based on w_model picked up
Reply With Quote #1

Hello,

I'm making a csgo skins plugin and I'm trying to set a player the corresponding v_model based on the w_model picked up off the ground. What would be the best way to do this taking into consideration I have about 5 different models per weapon.

I've seen the touch event, but I feel that won't be good for performance because it gets called every time the player steps on the weapon. Another option is weappickup, but i don't think I can get the w_model here.

Any ideas?
I just need a way to get the w_model a player is about to pickup so i can loop between the different skins I have and set the correct v_model.

Thank you.

Last edited by fcastro16; 06-01-2017 at 12:12.
fcastro16 is offline
DeMNiX
Veteran Member
Join Date: Nov 2011
Location: Russia
Old 06-01-2017 , 12:27   Re: set v_model based on w_model picked up
Reply With Quote #2

try to set id of skin on something like pev_iuser1-4
when entity spawns set id of the skin: set_pev(ent_weapon, pev_iuser, SKIN_ID )
On deploy check pev_iuser and set v_ model that u need
__________________
My channel with test codes
https://www.youtube.com/user/demnix03

Zombie Riot [Scenario & bots-zombie 11.11.2023]
https://youtu.be/8ZZan-aq2sc
DeMNiX is offline
fcastro16
Member
Join Date: Mar 2009
Old 06-01-2017 , 12:35   Re: set v_model based on w_model picked up
Reply With Quote #3

Quote:
Originally Posted by DeMNiX View Post
try to set id of skin on something like pev_iuser1-4
when entity spawns set id of the skin: set_pev(ent_weapon, pev_iuser, SKIN_ID )
On deploy check pev_iuser and set v_ model that u need
Interesting, I'll look into that. Thank you.

Edit: never mind, I got it by manipulation EV_SZ_ values from the weapon_ entity

Last edited by fcastro16; 06-02-2017 at 22:31.
fcastro16 is offline
Reply



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 08:23.


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