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

[ H3LP ] Camera Player Model / Weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 07-10-2019 , 13:44   [ H3LP ] Camera Player Model / Weapons
Reply With Quote #1

Hello there. If I change player view entity using SetClientViewEntity the player model is invisible. This was easely fixed bysetting m_iObserverMode to 1. However, when doing so, the footsteps are gone, and I can no longer select any weapon from the hud. Any ideas about a possible fix? Thanks !
DarthMan is offline
Dr.Doctor
AlliedModders Donor
Join Date: Feb 2017
Location: Hong Kong
Old 07-17-2019 , 10:06   Re: [ H3LP ] Camera Player Model / Weapons
Reply With Quote #2

There is a possible fix.

PHP Code:
SetClientViewEntity(cliententity);

SetVariantInt(1);
AcceptEntityInput(client"SetForcedTauntCam"); 
__________________
Dr.Doctor is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 07-21-2019 , 04:58   Re: [ H3LP ] Camera Player Model / Weapons
Reply With Quote #3

Quote:
Originally Posted by Dr.Doctor View Post
There is a possible fix.

PHP Code:
SetClientViewEntity(cliententity);

SetVariantInt(1);
AcceptEntityInput(client"SetForcedTauntCam"); 
Isn't SetForcedTauntCam only for TF2? I need something that works with all source engine mods.
DarthMan is offline
Dr.Doctor
AlliedModders Donor
Join Date: Feb 2017
Location: Hong Kong
Old 07-21-2019 , 06:01   Re: [ H3LP ] Camera Player Model / Weapons
Reply With Quote #4

Well, the solution is SetClientViewEntity then set third-person view on the client.

Since SetClientViewEntity will cause the client ViewModel invisible, setting third-person view on the client makes ViewModel visible again.

It works on tf2 by this method. See: https://github.com/tf2-sandbox-studi...urityCamera.sp

I had also tried changing the m_iObserverMode, it works but not the best.

Maybe you can try setting the client third-person view after SetClientViewEntity on other source game.
__________________
Dr.Doctor is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 07-21-2019 , 06:17   Re: [ H3LP ] Camera Player Model / Weapons
Reply With Quote #5

Quote:
Originally Posted by Dr.Doctor View Post
Well, the solution is SetClientViewEntity then set third-person view on the client.

Since SetClientViewEntity will cause the client ViewModel invisible, setting third-person view on the client makes ViewModel visible again.

It works on tf2 by this method. See: https://github.com/tf2-sandbox-studi...urityCamera.sp

I had also tried changing the m_iObserverMode, it works but not the best.

Maybe you can try setting the client third-person view after SetClientViewEntity on other source game.
So you mean, the only way is enabling cheats and doing thirdperson?
Using m_iObserverMode it would not allow me to switch weapons as the game thinks that the player is in spectator mode.

Last edited by DarthMan; 07-21-2019 at 06:17.
DarthMan is offline
Dr.Doctor
AlliedModders Donor
Join Date: Feb 2017
Location: Hong Kong
Old 07-21-2019 , 07:03   Re: [ H3LP ] Camera Player Model / Weapons
Reply With Quote #6

Idk what sources game you are currently using.
Enabling cheats on third-person is not a must I think

If CSGO,
PHP Code:
public void OnPluginStart()
{
    
SetConVarInt(FindConVar("sv_allow_thirdperson"), 1);

PHP Code:
SetClientViewEntity(cliententity);

ClientCommand(client"thirdperson"); 
__________________
Dr.Doctor is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 07-21-2019 , 07:12   Re: [ H3LP ] Camera Player Model / Weapons
Reply With Quote #7

Quote:
Originally Posted by Dr.Doctor View Post
Idk what sources game you are currently using.
Enabling cheats on third-person is not a must I think

If CSGO,
PHP Code:
public void OnPluginStart()
{
    
SetConVarInt(FindConVar("sv_allow_thirdperson"), 1);

PHP Code:
SetClientViewEntity(cliententity);

ClientCommand(client"thirdperson"); 
It is, as this command requires cheats to be enabled. if I enable cheats on specific client, then he can use all stuff like noclip, god, camera, fullbright command etc. Which is not what I want.
DarthMan is offline
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 07-21-2019 , 17:34   Re: [ H3LP ] Camera Player Model / Weapons
Reply With Quote #8

Remove cheat flag from thirdperson command.
CliptonHeist 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 13:24.


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