Thread: Module: Rage
View Single Post
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 01-25-2014 , 05:40   Re: Module: Rage
Reply With Quote #176

Ok, i can set penetration with firebullet3 hook, but how can i set knockback for victim? i see no knockback param on it.

I mean knockback to send victim go backward.

PHP Code:
#include <amxmodx>
#include <rage>
#include <hamsandwich>
#include <fun>
#include <cstrike>

public plugin_init()
{
    
register_plugin("firebullet hook""0.0.1""arkshine")
    new 
RageFunc:handleFunc RageGetFunction("CBaseEntity::FireBullets3")
    
RageCreateHook(handleFunc"OnFireBullets3_Pre"RageHookPre)
    
    
RegisterHam(Ham_Spawn"player""OnSpawned"1)
}

public 
OnFireBullets3_Pre(entityFloat:source[3], Float:dirShooting[3], Float:spreadFloat:distancepenetrationbulletTypedamageFloat:rangerModifierattackerbool:isPistolsharedRand)
{
    
RageSetParam(5100.0)  //short range, close combat
    //RageSetParam(6, penetration*=10) //high penetration, player stunt for awhile haha
    //RageSetParam(4, 0.0) //nospread, i see no different
}

public 
OnSpawned(id)
{
    if(
is_user_alive(id))
    {
        
set_user_health(id3000)
        new 
wpn give_item(id"weapon_m249")
        if(
wpn != -1)
        {
            
cs_set_weapon_ammo(wpn32767)
            
cs_set_user_bpammo(idCSW_M24932767)
        }
    }


Last edited by yokomo; 01-25-2014 at 05:41.
yokomo is offline