|
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
|
05-26-2014
, 09:49
Re: Module: Rage
|
#194
|
Quote:
Originally Posted by Arkshine
It's just an example. You can use Rage inside a module or a plugin.
|
Thanks for explanation, i though that module is require haha.
Ok i've managed to hook the FireBullets function, but i don't know which param do bullet penetration. I want make shotgun can shoot through wall.
I've tried to change many params but the result also the same.
FireBullets Hook
PHP Code:
#include <amxmodx> #include <rage>
new cvr_shot, cvr_trace, cvr_damage, cvr_bullettype public plugin_init() { register_plugin("FireBullets,FireBullets3", "0.0.1", "Rage") RageCreateHook(RageGetFunction("CBaseEntity::FireBullets3"), "OnFireBullets3_Pre", RageHookPre) RageCreateHook(RageGetFunction("CBaseEntity::FireBullets"), "OnFireBullets_Pre", RageHookPre) cvr_shot = register_cvar("fb_shot","9") cvr_trace = register_cvar("fb_trace","2") cvr_damage = register_cvar("fb_damage","1") cvr_bullettype = register_cvar("fb_bullettype","12") }
public OnFireBullets3_Pre(entity, Float:source[3], Float:dirShooting[3], Float:spread, Float:distance, penetration, bulletType, damage, Float:rangerModifier, attacker, bool:isPistol, sharedRand) { //future use }
//thiscall_Vector__CBaseEntity_Int_Vector_Vector_Vector_Float_Int_Int_Int_Entvars public OnFireBullets_Pre(entity, shots, Float:source[3], Float:dirShooting[3], Float:spread[3], Float:distance, bulletType, tracefreq, damage, attacker) { RageSetParam(2, get_pcvar_num(cvr_shot)) RageSetParam(7, get_pcvar_num(cvr_bullettype)) RageSetParam(8, get_pcvar_num(cvr_trace)) RageSetParam(9, get_pcvar_num(cvr_damage)) }
Change damage too 200 is damn funny .
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
|
|
|
|