|
Senior Member
Join Date: Sep 2020
Location: France
|
05-22-2021
, 17:14
Re: Amx Grab dont work with basebuilder
|
#6
|
Quote:
Originally Posted by Supremache
I will try..
Why don't use shove plugin like other bb servers ?
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
#define Shove ADMIN_KICK
new cInUse, cShove
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
register_clcmd("say /shove", "ShovePlayer")
cShove = register_cvar("bb_shove_force", "7")
cInUse = register_cvar("bb_shove_allow_inuse", "1")
}
public fw_PlayerPreThink(id)
{
if(get_user_flags(id) & Shove)
{
if(!get_pcvar_num(cInUse))
return FMRES_HANDLED
if(pev( id, pev_button ) & IN_USE && !(pev( id, pev_oldbuttons ) & IN_USE ) & !is_user_bot(id))
ShovePlayer(id)
}
return FMRES_HANDLED
}
public ShovePlayer(id)
{
if(!is_user_alive(id))
return PLUGIN_HANDLED
new Index,Body, pName[64], tName[64]
get_user_aiming(id,Index,Body,200)
if(!Index || !is_user_alive(Index))
return PLUGIN_HANDLED
get_user_name(id, pName, 63)
get_user_name(Index, tName, 63)
new Float:velocity[3], Float:shover[3], Float:shovee[3]
pev(id, pev_origin, shover)
pev(Index, pev_origin, shovee)
for(new Count;Count < 3;Count++)
velocity[Count] = (shovee[Count] - shover[Count]) * get_pcvar_float(cShove)
set_pev(Index, pev_velocity, velocity)
client_print(id, print_chat,"You have just shoved !g%s!", tName);
client_print(Index, print_chat, "You have just been shoved by !g%s!", pName);
return PLUGIN_HANDLED
}
|
Because im using the version 5.4, i don't want to add the natives of the sma 5.4.
__________________
CS:CZ > CS 1.6
|
|
|
|