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(entity, Float:source[3], Float:dirShooting[3], Float:spread, Float:distance, penetration, bulletType, damage, Float:rangerModifier, attacker, bool:isPistol, sharedRand)
{
RageSetParam(5, 100.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(id, 3000)
new wpn = give_item(id, "weapon_m249")
if(wpn != -1)
{
cs_set_weapon_ammo(wpn, 32767)
cs_set_user_bpammo(id, CSW_M249, 32767)
}
}
}