i want to modify weapon penetration with rage
i've download this 2 files (should i download the other ??) :
rage_beta3_BIN.zip
plugin-firebullets3-example.zip
i've install it.
then i check amx_modules & amx_plugins
both module & plugin running well
firebullet example seems change weapon maxdistance shot on this
RageSetParam( 5, 500.0 ); // max distance
but it not works, i still can shoot enemy more than 500 unit.
please help
i want to change weapon penetration too.
thanks.
PHP Code:
#include <amxmodx>
#include <rage>
#include <fakemeta>
public plugin_init()
{
new RageFunc:handleFunc = RageGetFunction( "CBaseEntity::FireBullets3" );
RageCreateHook( handleFunc, "OnFireBullets3_Pre", RageHookPre );
RageCreateHook( handleFunc, "OnFireBullets3_Post", RageHookPost );
}
public OnFireBullets3_Pre( entity, Float:source[3], Float:dirShooting[3], Float:spread, Float:distance, penetration, bulletType, damage, Float:rangerModifier, attacker, bool:isPistol, sharedRand )
{
log_amx( "%d, %f %f %f, %f %f %f, %f, %f, %d, %d, %d, %f, %d, %d, %d", entity, source[0], source[1], source[2], dirShooting[0], dirShooting[1], dirShooting[2], spread, distance, penetration, bulletType, damage, rangerModifier, attacker, isPistol, sharedRand );
RageSetParam( 5, 500.0 ); // max distance
}
public OnFireBullets3_Post( entity, Float:source[3], Float:dirShooting[3], Float:spread, Float:distance, penetration, bulletType, damage, Float:rangerModifier, attacker, bool:isPistol, sharedRand )
{
new Float:origReturn[3];
RageGetReturn( origReturn );
log_amx( "origReturn = %f %f %f", origReturn[0], origReturn[1], origReturn[2] );
}