View Single Post
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 01-05-2012 , 17:00   Re: [ANY] Thirdperson
Reply With Quote #8

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);
    }

__________________
Peace-Maker is offline