AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [RAGE] Help to modify some parameters (https://forums.alliedmods.net/showthread.php?t=233786)

m4m3ts 01-20-2014 08:09

[RAGE] Help to modify some parameters
 
i decide to modify weapon penetration power with rage,

from meTaLiCroSS advice
https://forums.alliedmods.net/showthread.php?t=233756

i got this example script from rage module thread.
it seems to change weapon max distance, on this:

RageSetParam( 5, 500.0 ); // max distance

but it not work, i still can shoot enemy more than 500 unit

when i change param to penetration, like this.

RageSetParam( 6, 50.0 ); // i think this is for penetration

its not work too.

please help.
this is the example script i got from rage thread.

PHP Code:

#include <amxmodx>
#include <rage>
#include <fakemeta>

public plugin_init()
{
    new 
RageFunc:handleFunc RageGetFunction"CBaseEntity::FireBullets3" );
    
    
RageCreateHookhandleFunc"OnFireBullets3_Pre"RageHookPre );
    
RageCreateHookhandleFunc"OnFireBullets3_Post"RageHookPost );
}

public 
OnFireBullets3_PreentityFloat:source[3], Float:dirShooting[3], Float:spreadFloat:distancepenetrationbulletTypedamageFloat:rangerModifierattackerbool:isPistolsharedRand )
{
    
log_amx"%d, %f %f %f, %f %f %f, %f, %f, %d, %d, %d, %f, %d, %d, %d"entitysource[0], source[1], source[2], dirShooting[0], dirShooting[1], dirShooting[2], spreaddistancepenetrationbulletTypedamagerangerModifierattackerisPistolsharedRand );
    
    
RageSetParam5500.0 );  // max distance


public 
OnFireBullets3_PostentityFloat:source[3], Float:dirShooting[3], Float:spreadFloat:distancepenetrationbulletTypedamageFloat:rangerModifierattackerbool:isPistolsharedRand )
{
    new 
Float:origReturn[3];
    
RageGetReturnorigReturn );
    
    
log_amx"origReturn = %f %f %f"origReturn[0], origReturn[1], origReturn[2] );


Note:
Rage module is running well


All times are GMT -4. The time now is 10:11.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.