Raised This Month: $51 Target: $400
 12% 

Solved Prevent Rotation of Player Model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Distortion
Member
Join Date: Feb 2017
Old 05-27-2017 , 21:05   Prevent Rotation of Player Model
Reply With Quote #1

Is there a way to prevent rotation of player model?

I've tried this,
PHP Code:
SetEntityMoveType(clientMOVETYPE_NONE); 
It is not working as I expected. Player is not moving but rotating. I can see it is rotating in thirdperson mode.


----------SOLVED----------
Check this reply https://forums.alliedmods.net/showth...hp?t=297928#14
__________________

Last edited by Distortion; 05-29-2017 at 17:56. Reason: Solved
Distortion is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 05-28-2017 , 00:03   Re: Prevent Rotation of Player Model
Reply With Quote #2

Teleport client to the angle you want them to stay at every frame:

TeleportEntity(client, NULL_VECTOR, angle, NULL_VECTOR);
hmmmmm is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 05-28-2017 , 06:50   Re: Prevent Rotation of Player Model
Reply With Quote #3

Quote:
Originally Posted by Distortion View Post
It is not working as I expected
Since you are already asking for help, don't you think it would make more sense for us if you just told us what exactly you need.

If you want the player to be able to move using "WASD" and so on... Then you would have to go with locking the angles at function "OnPlayerRunCmd".

Like so:
Spoiler

OR

If you don't want the player to be able to use their buttons AKA move, duck, shoot, and so on, then you could basically be good off by using flags. like so.

PHP Code:
SetEntityFlags(client, (buttons |= FL_FROZEN)); 
__________________

Last edited by xines; 05-28-2017 at 06:55.
xines is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 05-28-2017 , 08:37   Re: Prevent Rotation of Player Model
Reply With Quote #4

Client prediction can make the buttons thing look bad, I'd stick with teleportentity to lock position as well
hmmmmm is offline
Distortion
Member
Join Date: Feb 2017
Old 05-28-2017 , 11:59   Re: Prevent Rotation of Player Model
Reply With Quote #5

TeleportEntity kinda solved my problem.
Actually I want something like spectate camera.
Freeze player position and rotation, let the camera rotate around player. That's exactly what I want.
Is it possible to make it?
__________________
Distortion is offline
Weetabix
Member
Join Date: Feb 2017
Location: United Kingdom
Old 05-28-2017 , 12:24   Re: Prevent Rotation of Player Model
Reply With Quote #6

Like prophunt?
Weetabix is offline
Distortion
Member
Join Date: Feb 2017
Old 05-28-2017 , 14:34   Re: Prevent Rotation of Player Model
Reply With Quote #7

Exactly. But I think prophunt is creating a fake prop and hide player model
__________________
Distortion is offline
Kinsi
Senior Member
Join Date: Apr 2013
Old 05-28-2017 , 16:09   Re: Prevent Rotation of Player Model
Reply With Quote #8

Im not entirely sure how that works, but wasnt there the possibility to make the client have some entity as its camera?

CCSPlayer has a netprop called m_hViewEntity, maybe you can do something with that.

Last edited by Kinsi; 05-28-2017 at 16:11.
Kinsi is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 05-28-2017 , 17:00   Re: Prevent Rotation of Player Model
Reply With Quote #9

Quote:
Originally Posted by Kinsi View Post
Im not entirely sure how that works, but wasnt there the possibility to make the client have some entity as its camera?

CCSPlayer has a netprop called m_hViewEntity, maybe you can do something with that.
This is indeed possible, it is quite easy. You can find it in plugin which uses thrown grenades as view entity (should be somewhere on this forum).
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
Weetabix
Member
Join Date: Feb 2017
Location: United Kingdom
Old 05-28-2017 , 19:02   Re: Prevent Rotation of Player Model
Reply With Quote #10

https://www.google.co.uk/search?q=al...s.net&start=30
Weetabix 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 17:36.


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