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

[CS:GO] Down the player's view


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zack771
Senior Member
Join Date: Apr 2012
Old 02-05-2015 , 04:41   [CS:GO] Down the player's view
Reply With Quote #1

Hi,

I would like to know if it was possible to down the player's view in sourcemod for CS:GO (to make the player think he is squatting for example) ?

Thanks by advance.
__________________
"Embrace your dreams, and whatever happend protect your honor"
Zack Fair
Zack771 is offline
Krushy
Member
Join Date: Jul 2014
Old 02-05-2015 , 09:55   Re: [CS:GO] Down the player's view
Reply With Quote #2

Yes, you need to use TeleportEntity function.
Krushy is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-05-2015 , 11:06   Re: [CS:GO] Down the player's view
Reply With Quote #3

Even with that it would be teleporting the player downward.
Mitchell is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 02-05-2015 , 13:45   Re: [CS:GO] Down the player's view
Reply With Quote #4

Quote:
Originally Posted by Mitchell View Post
Even with that it would be teleporting the player downward.
You can set the angle from there, correct me if I am wrong and I am pretty sure there is an other way to set a player angle without teleporting him.
Mathias. is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-05-2015 , 14:22   Re: [CS:GO] Down the player's view
Reply With Quote #5

Quote:
Originally Posted by Black-Rabbit View Post
You can set the angle from there, correct me if I am wrong and I am pretty sure there is an other way to set a player angle without teleporting him.
Yeah, so? that's not what he was wanting..
Mitchell is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 02-05-2015 , 15:30   Re: [CS:GO] Down the player's view
Reply With Quote #6

What about forcing the duck command in playerruncmd?
__________________
Neuro Toxin is offline
Zack771
Senior Member
Join Date: Apr 2012
Old 02-06-2015 , 05:33   Re: [CS:GO] Down the player's view
Reply With Quote #7

Quote:
Originally Posted by Krushy View Post
Yes, you need to use TeleportEntity function.
No 'cause that will teleport the entire player, not only the view.

Quote:
Originally Posted by Mitchell View Post
Quote:
Originally Posted by Black-Rabbit View Post
You can set the angle from there, correct me if I am wrong and I am pretty sure there is an other way to set a player angle without teleporting him.
Yeah, so? that's not what he was wanting..
Changing the angle will not change the vertical-axis position of the view ?

Quote:
Originally Posted by Neuro Toxin View Post
What about forcing the duck command in playerruncmd?
But it will slow down the player and he will be show as ducked in other's people view.

What i would like to do is really to change the vertical-axis position of the view of the player, like that he will have the same view position as the head of a skin that i'm gonna make.
__________________
"Embrace your dreams, and whatever happend protect your honor"
Zack Fair
Zack771 is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 02-06-2015 , 08:55   Re: [CS:GO] Down the player's view
Reply With Quote #8

There is a view offset prop. If that doesn't work and not seeing the weapon is a acceptable trade-off (which maybe might be fixable, idk), parent an entity to the hip of the player and set it as the player's view entity.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
Zack771
Senior Member
Join Date: Apr 2012
Old 02-07-2015 , 12:15   Re: [CS:GO] Down the player's view
Reply With Quote #9

Found that on smlib :
Gonna try that.
__________________
"Embrace your dreams, and whatever happend protect your honor"
Zack Fair
Zack771 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-07-2015 , 12:17   Re: [CS:GO] Down the player's view
Reply With Quote #10

Quote:
Code:
/**
 * Gets the client's view offset.
 * This is the position relative to the client itself.
 * 
 * @param client		Client Index.
 * @param vec			Vector Buffer.
 * @noreturn
 */
stock Client_GetViewOffset(client, Float:vec[3])
{
	GetEntPropVector(client, Prop_Data, "m_vecViewOffset", vec);
}

/**
 * Sets the client's view offset.
 * This is the position relative to the client itself.
 * 
 * @param client		Client Index.
 * @param vec			Vector buffer.
 * @noreturn
 */
stock Client_SetViewOffset(client, Float:vec[3])
{
	SetEntPropVector(client, Prop_Data, "m_vecViewOffset", vec);
}
Mitchell 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 07:48.


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