View Single Post
Ace67
Senior Member
Join Date: Sep 2020
Location: France
Old 05-22-2021 , 17:14   Re: Amx Grab dont work with basebuilder
Reply With Quote #6

Quote:
Originally Posted by Supremache View Post
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 cInUsecShove
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
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(pevidpev_button ) & IN_USE && !(pevidpev_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,BodypName[64], tName[64]
    
get_user_aiming(id,Index,Body,200)
    
    if(!
Index || !is_user_alive(Index))
        return 
PLUGIN_HANDLED
    
    get_user_name
(idpName63)
    
get_user_name(IndextName63)
    new 
Float:velocity[3], Float:shover[3], Float:shovee[3]
    
pev(idpev_originshover)
    
pev(Indexpev_originshovee)
    
    for(new 
Count;Count 3;Count++)
    
velocity[Count] = (shovee[Count] - shover[Count]) * get_pcvar_float(cShove)
    
set_pev(Indexpev_velocityvelocity)
    
client_print(idprint_chat,"You have just shoved !g%s!",  tName);
    
client_print(Indexprint_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
Ace67 is online now