Can someone please explain how to use Fakemeta to get key values from the FM_KeyValue forward (without using the Engine module). I've tried to use get_kvd, which I probably used incorrectly. But I also noticed in the include it said on FM_KeyValue "-- does't work as of 0.20 RC2", though it seems to work as that part of the code gets run.
I wrote this up really quick so you can see what im asking for (not exactly what I'm doing but close enough):
Code:
new TriggerHurtHealers[200]
new Total
public plugin_init()
{
register_plugin("Find_KVD", "0.0", "this isnt a plugin")
}
public plugin_precache()
{
register_forward(FM_KeyValue, "check_keyvalues", 1)
}
public check_keyvalues(entid)
{
if ( pev_valid(entid) )
{
new classname[32], key[32], value[32]
pev(entid, pev_classname, classname, 31)
// Tried these, but I don't quite understand how to use them, not sure what a kvd_handle is
//get_kvd(0, KV_ClassName, classname, 31) //can get this with pev instead
//get_kvd(0, KV_KeyName, key, 31)
//get_kvd(0, KV_Value, value, 31)
// how would you get the entity's KeyValue name and KeyValue value here using Fakemeta?
if ( equali(classname, "trigger_hurt") )
if ( equali(key, "dmg") )
if ( floatstr(value) <= 0.0 )
TriggerHurtHealers[Total++] = entid
}
}