Raised This Month: $ Target: $400
 0% 

[Solved][CS1.6] How to make player Spin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-20-2012 , 13:44   Re: [CS1.6] How to make player Spin
Reply With Quote #5

Try this
PHP Code:
#define SPIN_SPEED    12.0

#include <amxmodx>
#include <fakemeta>

#define VERSION "0.0.1"
#define PLUGIN "SpinHack"

#define MAX_PLAYERS 32

new g_bSpinHackMAX_PLAYERS 1 char ]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
    
register_clcmd("say /spinme""ClCmd_Spin")
    
register_forward(FM_PlayerPreThink"OnPlayerPreThink")
}

public 
client_putinserverid )
{
    
g_bSpinHack{id} = false
}

public 
OnPlayerPreThinkid )
{
    if( 
g_bSpinHack{id} && is_user_alive(id) )
    {
        static const 
Float:VEC_NULL[3] = {0.0,0.0,0.0}
        static 
Float:v_angle[3]; pev(idpev_v_anglev_angle)
        if( ( 
v_angle[1] += SPIN_SPEED ) > 180.0 )
        {
            
v_angle[1] -= 360.0
        
}
        
set_pev(idpev_v_angleVEC_NULL)
        
set_pev(idpev_anglesv_angle)
        
set_pev(idpev_fixangle1)
    }
}

public 
ClCmd_Spinid )
{
    
g_bSpinHack{id} = !g_bSpinHack{id}

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-20-2012 at 13:45.
ConnorMcLeod is offline
 



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 06:06.


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