[HLDS][SMA] Anti SGS

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

kukubeni

Banned
Banned
Joined
Dec 27, 2019
Messages
18
Credits
17
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#pragma compress 1
#define PLUGIN "AntiDuck 2.0"
#define VERSION "1.0"
#define AUTHOR "MRX"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_PlayerPreThink,"playerevent")
register_cvar("antisgs_value1","340");
register_cvar("antisgs_value2","295");
}
public playerevent(id)
{
if(!is_user_connected(id))
return FMRES_HANDLED;

static target
static Float:velocity[3]
static Float:speedh
target = pev(id, pev_iuser1) == 4 ? pev(id, pev_iuser2) : id
pev(target, pev_velocity, velocity)
speedh = floatsqroot(floatpower(velocity[0], 2.0) + floatpower(velocity[1], 2.0))


//levegőben van
if(speedh >= 640.0 && !(pev(id, pev_flags) & FL_ONGROUND))
{
static Float:velocity[3]
velocity_by_aim(id, 250, velocity)
set_pev(id, pev_velocity, velocity)
}
//in ground
if(speedh >= 295 && (pev(id, pev_flags) & FL_ONGROUND))
{
static Float:velocity[3]
velocity_by_aim(id, 250, velocity)
set_pev(id, pev_velocity, velocity)
}

//client_print(0,print_center,"Speed:%3.2f",speedh);

return FMRES_HANDLED;
}
 
Back
Top