View Single Post
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-05-2012 , 22:48   Re: [ANY] Thirdperson
Reply With Quote #9

Quote:
Originally Posted by Peace-Maker View Post
This stock works fine for CS:S. Don't know about other games though.
PHP Code:
stock SetThirdPersonView(clientbool:third)
{
    if(
third)
    {
        
SetEntPropEnt(clientProp_Send"m_hObserverTarget"0); 
        
SetEntProp(clientProp_Send"m_iObserverMode"1);
        
SetEntProp(clientProp_Send"m_bDrawViewmodel"0);
        
SetEntProp(clientProp_Send"m_iFOV"120);
    }
    else
    {
        
SetEntPropEnt(clientProp_Send"m_hObserverTarget", -1);
        
SetEntProp(clientProp_Send"m_iObserverMode"0);
        
SetEntProp(clientProp_Send"m_bDrawViewmodel"1);
        
SetEntProp(clientProp_Send"m_iFOV"90);
    }

Alright, I'll add that in for CS:S first chance I get, and completely rewrite it if it works in other games. I mainly wrote this for TF2, and I haven't found a way to do it in TF2 yet without sv_cheats.
__________________
Dr. McKay is offline