Raised This Month: $ Target: $400
 0% 

KeyValue Event Manager


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   Technical/Development        Approver:   Hawk552 (427)
ts2do
Senior Member
Join Date: Mar 2004
Old 08-01-2007 , 21:29   KeyValue Event Manager
Reply With Quote #1

This plugin can serve other plugins by working as an engine to inform plugins of KeyValue changes to an entity. It can highly compress the amount of code for a plugin and can serve multiple plugins. If this plugin needs to be added for another plugin's functionality, this plugin should be added at the end of plugins.ini. To author a plugin under this engine, kve.inc must be saved to ..\amxmodx\scripting\includes\

Code:
// entity_callback(const szValue[], entid, kvdid) // worldspawn_callback(bKeyExists, const szValue[]) native register_keyvalue(szClassName[32], szKeyName[64], szFunction[32]);
Example:
Code:
#include <amxmodx> #include <kve> ... public plugin_precache() {     register_keyvalue("worldspawn", "skyname", "handle_worldspawn_skyname");     register_keyvalue("game_score", "points", "handle_game_score_points"); } public handle_worldspawn_skyname(bKeyExists, const szValue[]) {     ... } public handle_game_score_points(const szValue[], entid, kvdid) {     // Within here, you can change the key or value using fakemeta's set_kvd     ... } ...

Known Issues:
  • Maps stored in a game's GCF do not get their worldspawn keyvalue events triggered. To fix this problem, simply extract all of the BSP files inside the game's GCF to the game's maps folder.

Plugins:
Attached Files
File Type: sma Get Plugin or Get Source (kve.sma - 3928 views - 3.4 KB)
File Type: inc kve.inc (271 Bytes, 1729 views)

Last edited by ts2do; 09-02-2007 at 12:29.
ts2do is offline
Send a message via AIM to ts2do
 



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 09:29.


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