Raised This Month: $ Target: $400
 0% 

FM_KeyValue


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Silencer123
Veteran Member
Join Date: Jul 2006
Old 05-03-2007 , 16:30   FM_KeyValue
Reply With Quote #1

I registered the forward FM_KeyValue but it actually never got called.
I want the following function to be called when some KeyValue on an
entity, to be more precisely, a client, has changed.
Code:
public scxpm_set_displayname(id,kv) {     client_print(0,print_chat,"DISPLAYNAME STEP 1/4")     if(get_pcvar_num(cvar_dpname))     {         client_print(0,print_chat,"DISPLAYNAME STEP 2/4")         if(pev_valid(id))         {             client_print(0,print_chat,"DISPLAYNAME STEP 3/4")             new var[128]             get_kvd(kv,KV_KeyName,var,31)             if(equali(var,"displayname"))             {                 client_print(0,print_chat,"DISPLAYNAME STEP 4/4")                 get_kvd(kv,KV_Value,var,31)                 format(var,127,"%s^nLevel: %i^nRank: %s",var,playerlevel[id],rank[id])                 forward_return(FMV_STRING,var)                 return FMRES_SUPERCEDE             }         }     }     return FMRES_IGNORED }
As "DISPLAYNAME STEP 1/4" is never being printed to console I guess this is
never being called. Note that I registered the forward in plugin_init, because
thats where to register cvars too which this function shall know about.
__________________
EAT YOUR VEGGIES
Silencer123 is offline
 



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 06:41.


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