Raised This Month: $ Target: $400
 0% 

Force a spectating player into First Person mode


Post New Thread Reply   
 
Thread Tools Display Modes
kNowo
Senior Member
Join Date: Apr 2011
Location: Malaysia
Old 12-20-2013 , 16:58   Re: Force a spectating player into First Person mode
Reply With Quote #11

Now that it's been 4 years, have we found a way to do this without the view bug?

I've found 4 or 5 threads about this same issue and none of them has solutions.
kNowo is offline
bboygrun
CHOMP
Join Date: May 2010
Location: France
Old 12-21-2013 , 18:31   Re: Force a spectating player into First Person mode
Reply With Quote #12

Something like this i guess :

PHP Code:
#include < amxmodx >
#include < fakemeta >
#include < cstrike_pdatas >

#define OBS_IN_EYE    4

public plugin_init( ) 
{
    
// register your functions
}

/*
public myFunc( )
{
    CPlayer__ForceFirstPerson( PlayerYouWantToForce, PlayerObserved )
}

public myOtherFunc( )
{
    CPlayer__FreeSpec( PlayerYouForced );
}
*/

CPlayer__FreeSpec( const iPlayer )
{
    
set_pdata_floatiPlayerm_flNextSpecButtonTimeget_gametime( ) + 0.2XO_CBASEPLAYER );
}

CPlayer__ForceFirstPerson( const iPlayer, const iPlayerTarget )
{
    
set_peviPlayerpev_iuser1OBS_IN_EYE );
    
    if( 
iPlayerTarget )
    {
        
set_peviPlayerpev_iuser2iPlayerTarget );
    }
    
    
set_pdata_floatiPlayerm_flNextSpecButtonTimeget_gametime( ) + 9999.0 );

Didn't test
__________________
bboygrun is offline
kNowo
Senior Member
Join Date: Apr 2011
Location: Malaysia
Old 12-22-2013 , 04:38   Re: Force a spectating player into First Person mode
Reply With Quote #13

Pretty sure that won't work. Do you mind giving it a try first because I don't have my computer at the moment.
kNowo is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-22-2013 , 05:36   Re: Force a spectating player into First Person mode
Reply With Quote #14

View gonna be messed up with this.

Would need to hook CBasePlayer::Observer_XXXXX functions with orpheu, but since last update, those functions have been split at compile, so there are like 50% of calls you can't hook.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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:38.


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