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

Solved Prevent Rotation of Player Model


Post New Thread Reply   
 
Thread Tools Display Modes
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 05-29-2017 , 15:45   Re: Prevent Rotation of Player Model
Reply With Quote #11

g_Freeze = FindSendPropInfo("CBasePlayer", "m_fFlags");
SetEntData(client, g_Freeze, FL_CLIENT | FL_ATCONTROLS, 4, true);
__________________

Last edited by zipcore; 05-29-2017 at 15:52.
zipcore is offline
Agent Wesker
Senior Member
Join Date: Apr 2012
Old 05-29-2017 , 15:58   Re: Prevent Rotation of Player Model
Reply With Quote #12

Quote:
Originally Posted by zipcore View Post
g_Freeze = FindSendPropInfo("CBasePlayer", "m_fFlags");
SetEntData(client, g_Freeze, FL_CLIENT | FL_ATCONTROLS, 4, true);
This won't prevent you from aiming (aka rotating) it will just remove the ability to walk (and duck?) also will still have physics enabled.

FL_ATCONTROLS - Deny movement, allow aiming, allow physics
FL_ONTRAIN - Deny movement, deny aiming, allow physics
FL_FROZEN - Deny movement, allow aiming, deny physics

Last edited by Agent Wesker; 05-29-2017 at 16:06.
Agent Wesker is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 05-29-2017 , 16:31   Re: Prevent Rotation of Player Model
Reply With Quote #13

Right sorry forgot to change the flag...
__________________
zipcore is offline
Distortion
Member
Join Date: Feb 2017
Old 05-29-2017 , 17:37   Re: Prevent Rotation of Player Model
Reply With Quote #14

Yay! We did it. Thank you for your help :*

Create a new entity(point_viewcontrol), enable it and attach to player.

https://forums.alliedmods.net/showpo...10&postcount=4

PHP Code:
public SetClientCameraStatic(client)
{
    
SetEntProp(clientProp_Send"m_iObserverMode"1);
    
//SetEntProp(client, Prop_Send, "m_iObserverMode", 0);

    /* Create the Camera Entity */
    
new entCamera CreateEntityByName("point_viewcontrol");

    
decl String:sWatcher[64];
    
Format(sWatchersizeof(sWatcher), "target%i"client);

    
/* Sets the clients Targetname to their Index */
    
DispatchKeyValue(client"targetname"sWatcher);

    if(
IsValidEntity(entCamera))
    {
        
//Name of the Camera Entity
        
DispatchKeyValue(entCamera"targetname""playercam");
        
//DispatchKeyValue(entCamera, "target", sWatcher);
        //Amount of time to stay active
        
DispatchKeyValue(entCamera"wait""3600");
        
DispatchSpawn(entCamera);

        
TeleportEntity(entCamerag_fPosg_fAngNULL_VECTOR);

        
//SetVariantString(sWatcher);
        //AcceptEntityInput(entCamera, "SetParent", client, entCamera, 0);

        
SetVariantString(sWatcher);
        
AcceptEntityInput(entCamera"Enable"cliententCamera0);


        
/* Stores the Camera index to the client */
        
ClientCamera[client] = entCamera;
    }


__________________

Last edited by Distortion; 05-29-2017 at 17:38. Reason: Code
Distortion 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 06:57.


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