Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <fakemeta>
- #include <xs>
- const ButtonBits = ( IN_DUCK );
- new anti_strafes, vlc_1, vlc_2, vlc_3;
- public plugin_init()
- {
- anti_strafes = register_cvar( "str_sp", "0.120" );
- vlc_1 = register_cvar( "sp_str_1", "200.0" );
- vlc_2 = register_cvar( "sp_str_2", "200.0" );
- vlc_3 = register_cvar( "sp_str_3", "200.0" );
- register_forward( FM_CmdStart , "fw_FMCmdStart" );
- }
- public fw_FMCmdStart( id , handle , seed )
- {
- if ( get_uc( handle , UC_Buttons ) & ButtonBits )
- {
- static Float:Velocity[3]
- pev(id, pev_velocity, Velocity)
- if (Velocity[0] > get_pcvar_float(vlc_1) || Velocity[1] > get_pcvar_float(vlc_2) || Velocity[2] > get_pcvar_float(vlc_3))
- {
- xs_vec_mul_scalar( Velocity, get_pcvar_float(anti_strafes), Velocity)
- set_pev(id, pev_velocity, Velocity)
- }
- }
- return FMRES_IGNORED
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement