Raised This Month: $ Target: $400
 0% 

How do you get an ents key values in Fakemeta's FM_KeyValue?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 05-25-2006 , 19:35   How do you get an ents key values in Fakemeta's FM_KeyValue?
Reply With Quote #1

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     } }
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:33.


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