AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Bypass cvar value of some plugin with mine own (https://forums.alliedmods.net/showthread.php?t=11941)

LynX 04-01-2005 13:09

Bypass cvar value of some plugin with mine own
 
Well, I have some problems. I'm trying to block a cvar value made by another plugin.
To modify it, I placed mine plugin above that plugin in plugins.ini , and made it like this:

Code:
#include <amxmodx> #include <fakemeta> public plugin_init() {     register_plugin("breaker","final :P","LynX")     register_cvar("powerLimit","9999999999")     return PLUGIN_CONTINUE } new powerLimit[33] public powerLimitChange() {     if ( get_cvar_value("powerLimit" = 666666666 ) )     {         powerLimit[id] = get_pdata_int(id, 460 )         set_pdata_int( id, 460, powerLimit[id] < 9999999999 )         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED }

I know this gives errors, but I want to know how I can restrict setting value, of let's say health
over 50 via cvar. I want that mine catched cvar of other plugin modifies cvar value, and so if
max value for health made by that plugin is 100, I want to catch it and change it that limit is 200.
So, basically I want to change value of another plugin from 100000000 to 9999999999 . How can I set maximum value
of something, like offset 460 . Help plz!
thanks

Lord of Destruction 04-01-2005 13:34

:twisted: :twisted: :twisted:

BtW >> I think I have the right to post such an stupid answer

LynX 04-01-2005 15:28

Its not for EVM LoD.
Its for another addon.


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

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