This method forces game engine to think that in our hands there is no weapons. So we can completely rewrite the code of the main CS weapons. Why this way? Bcz
client side forces the animation replace 2 and not only. So we should completely resend everything from the server side to avoid bugs.
The way it's done is not very perfect, but it works in unique way, cz u can modify everything u want in simple way (not only view body switch, but damage, attack speed, recoil, rate and other).
There is three examples are attached, some people are saying the code is unreadable, but it's my style.
So, everything another part just was easy to complete. I' ve made 3 examples: knife, glock18, ak47.
You can put them together and test. While testing, use cl_lw 1 or 0 to see how it works.
I' ve seen once a person who made view body switch by another way, but it was buggy while using cl_lw 0. So...
Type in console switch_sex and set to 0 to view male hands. 1 is female.
Using this examples you can completely replace default CS weapon system and play with any bodygroup you want.
Updated: added shells, Glock18 Burst mode, removed some useless code again.
Updated: fix shoot event for other weapons, fix left-right hand auto switch
Viewmodel bodygroup switch example
- Archive-Poster
- Posts: 1267
- Gender:

Viewmodel bodygroup switch example
- Attachments
-
- models.zip
- (1.12 MiB) Downloaded 4 times
-
- weapon_ak47.sma.zip
- (1.81 KiB) Downloaded 3 times
-
- weapon_glock18.sma.zip
- (2.2 KiB) Downloaded 4 times
-
- weapon_knife.sma.zip
- (1.19 KiB) Downloaded 2 times
Who is online
Users browsing this forum: No registered users and 0 guests