Raised This Month: $12 Target: $400
 3% 

Get KeyValue from entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 06-12-2010 , 17:08   Get KeyValue from entity
Reply With Quote #1

Hey.
On searching around I've found the function GetKeyValue in OB games (http://wiki.alliedmods.net/CDODPlaye...eat:_Source%29).
First problem is that I don't know how to call it correctly, secondly this function doesn't exists for older games like CS:S and HL2DM. Is there a possibility to get a KeyValue anyway?

Thanks!
Chrisber is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-12-2010 , 17:11   Re: Get KeyValue from entity
Reply With Quote #2

Assuming you mean what I think you do, it exists as an entry in the datamap.
__________________
asherkin is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 06-12-2010 , 20:12   Re: Get KeyValue from entity
Reply With Quote #3

Thanks, works, but there's a problem. If I am right, there are two types of strings:

1. characters, "normal" zero terminated strings you know from everyday life
2. strings but as an int? Example: m_iGlobalname (from CBaseEntity)

I can read characters out without any problems, but I can't get the value of the second type of string. I tried to use the STRING makro from the SDK, but didn't work too.

Thanks for help!
Chrisber is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 06-12-2010 , 20:38   Re: Get KeyValue from entity
Reply With Quote #4

Look at string_t.h in the SDK.
Fyren is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 06-12-2010 , 22:04   Re: Get KeyValue from entity
Reply With Quote #5

I already tried it (using the STRING macro). I also wrote it above

Chris
Chrisber is offline
Reply



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 22:47.


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