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
__________________