AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Freeze weapon view model on the screen (CS1.6) (https://forums.alliedmods.net/showthread.php?t=209634)

God Of Gaming 02-27-2013 20:40

Freeze weapon view model on the screen (CS1.6)
 
The guns drawn on screen don't stay stationary, they move around when you walk or look around. I want to make them stay stationary no matter what you do. And I want to make it server-side. Is that possible and how? I have a small idea on how I might be able to do it, but it feels complex and not necessarily possible, so I want to hear what the veterans have to say before I have to revert to that idea.

The reason is that I'm thinking of giving a try to make a look-down-sights mod, and I can do the models and animations needed for that, but if the game moves them around when I move, the sights will not always stay on target.

I did a search here and found only a few old threads, with almost no replies and no hints of how to do it at all. Except one tread linked to a youtube video with download link for a plugin that seems to achieve just that, but it doesn't have a .sma so I can't modify it for my purpose.

P.S. I'm new here, nice to meet you all :3

ConnorMcLeod 02-28-2013 00:42

Re: Freeze weapon view model on the screen (CS1.6)
 
Only possible clientside setting cl_bob to 0.

avril-lavigne 02-28-2013 04:21

Re: Freeze weapon view model on the screen (CS1.6)
 
yes

and pev_punchangle in norecoil plugins

God Of Gaming 02-28-2013 09:59

Re: Freeze weapon view model on the screen (CS1.6)
 
I see, that won't do. So, here's my idea on how I might be able to do it:
1.) Make the weapon viewmodels invisible, replace them with blank models, or whatever, get them out of the way;
2.) Spawn them as entities in front of the player, make them follow him, and make them only visible to him. Though, they should follow the camera, not the player, so that they stay on screen when you look around and up and down.
3.) Make their animations play with the actions performed, and spawn ejected empty shells (if they stop working)

I think if this can be done, it will fix the problem and make them seem stationary on screen. I think I have the grasp on how to make 2.), but I'm not sure how to do 1.) and 3.). I'll be thankful for any help.


All times are GMT -4. The time now is 21:39.

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