AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Getting key/value in mid map (https://forums.alliedmods.net/showthread.php?t=55910)

hlstriker 06-01-2007 20:16

Getting key/value in mid map
 
Is it possible to get an entities key/value data in the middle of a map?

From what I see it looks like it is only possible to get the key/value data from entities when the map first loads and assigns the data.

regalis 06-01-2007 21:33

Re: Getting key/value in mid map
 
Maybe something like this:
Code:

new value = engfunc(EngFunc_InfoKeyValue, engfunc(EngFunc_GetInfoKeyBuffer, EntityID), "Key");
client_print(0, print_chat, "Value: %d", value);

Tried it but doesn't work as expected..maybe you can make it working ;)

greetz regalis

VEN 06-03-2007 11:35

Re: Getting key/value in mid map
 
What you've wrote is for client keyvalues.

Ham_Keyvalue should be called even mid map, hook it. See Ham Sandwich module from modules section.

hlstriker 06-03-2007 13:57

Re: Getting key/value in mid map
 
Quote:

Originally Posted by VEN (Post 485221)
Ham_Keyvalue should be called even mid map, hook it. See Ham Sandwich module from modules section.

Is this the module you are talking about?
http://forums.alliedmods.net/showthread.php?t=51824

It looks like it only has the 2 natives...
hs_takedamage(idVictim,idInflictor,idAttacker , Float:damage, type);
hs_use(id,idActivator,idCaller, use_type, Float:use_value);

How do I hook Ham_Keyvalue (is it even in that module?)

I've been looking around and saw other hooks for this. How can I find out what all the hooks are?

VEN 06-03-2007 14:57

Re: Getting key/value in mid map
 
See last page for latest binary.

hlstriker 06-03-2007 15:51

Re: Getting key/value in mid map
 
Thanks VEN, this is a little beyond me though.

Code:

        /**
        * Description:                Typically this is similar to an engine keyvalue call.
        *                                        Use the kvd natives from fakemeta to handle the kvd_handle passed.
        *                                        NOTE: Do not pass handle 0 to this! Use get_kvd_handle(0) from fakemeta instead!
        * Forward params:        function(this, kvd_handle);
        * Return type:                None.
        * Execute params:        ExecuteHam(Ham_Keyvalue, this, kvd_handle);
        */
        Ham_Keyvalue,

What exactly is the kvd_handle?

VEN 06-04-2007 00:24

Re: Getting key/value in mid map
 
It's kvdid from your post: http://forums.alliedmods.net/showthr...189#post423189


All times are GMT -4. The time now is 10:30.

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