Raised This Month: $ Target: $400
 0% 

Solved Camera


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-14-2018 , 10:27   Re: Camera
Reply With Quote #1

This is how I did it in my plugin:
PHP Code:
enum
{
    
VIEW_NONE 0,
    
VIEW_3RDPERSON,
}

new 
g_iPlayerView33 ];

public 
plugin_init( )
{
    
RegisterHamHam_Player_ImpulseCommands"player""@HamPlayerImpulseCommands_Pre");
    
RegisterHamHam_Spawn"player""@HamSpawn_Post");
}

public 
client_connectid )
{
    
g_iPlayerViewid ] = VIEW_NONE;
}


public @
HamSpawn_Postid )
{
    if( 
is_user_aliveid ) )
    {
        
g_iPlayerViewid ] = VIEW_NONE;
    }
    return 
HAM_IGNORED;
}

public @
HamPlayerImpulseCommands_Preid )
{
    if( ! 
is_user_aliveid ) )
    return 
HAM_IGNORED;
    
    if( 
pevidpev_impulse ) == 201 )
    {
        
g_iPlayerViewid ] = g_iPlayerViewid ] == VIEW_3RDPERSON VIEW_NONE VIEW_3RDPERSON;
        
set_viewidg_iPlayerViewid ] );
        
        
set_pevidpev_impulse);
    }
    return 
HAM_IGNORED;

__________________

Last edited by edon1337; 07-14-2018 at 10:28.
edon1337 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 12:38.


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