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

Get unused entity properties for custom values


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hh2
AlliedModders Donor
Join Date: Sep 2010
Old 05-25-2015 , 14:41   Get unused entity properties for custom values
Reply With Quote #1

I create my entity like this:
Code:
new ent = CreateEntityByName("prop_physics_override");
I want to save my custom variable to created entity to use it in future.
How can i find all unused values to property (i mean values like m_nBody for SetEntProp) for this ent?

Here is example (i want to know what xxx i can use to store my data):
Code:
SetEntProp(ent, Prop_Data, "xxx", 1);
GetEntProp(ent, Prop_Data, "xxx");
I tried some values from "sm_dump_datamaps", but they not worked always.
Thanks for any help.
hh2 is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 05-25-2015 , 14:45   Re: Get unused entity properties for custom values
Reply With Quote #2

Why not just store information in variables?
Miu is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 05-25-2015 , 14:47   Re: Get unused entity properties for custom values
Reply With Quote #3

The only such value I know is HammerId:
PHP Code:
SetEntProp(entProp_Data"m_iHammerID"666);
new 
id GetEntProp(entProp_Data"m_iHammerID"); 
You can use it for any entity. Just make a data array and use HammerID to store a pointer to the data

Last edited by kadet.89; 05-25-2015 at 14:50.
kadet.89 is offline
Send a message via Skype™ to kadet.89
hh2
AlliedModders Donor
Join Date: Sep 2010
Old 05-25-2015 , 14:56   Re: Get unused entity properties for custom values
Reply With Quote #4

Quote:
Originally Posted by Miu View Post
Why not just store information in variables?
Is not the better way to store it in entity (i mean optimization for using less memory)?
Imo using this property method is better than create variable like this:
Code:
new variable[2048];
hh2 is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 05-25-2015 , 15:08   Re: Get unused entity properties for custom values
Reply With Quote #5

Quote:
Originally Posted by hh2 View Post
Is not the better way to store it in entity (i mean optimization for using less memory)?
Imo using this property method is better than create variable like this:
Code:
new variable[2048];
You don't need a variable for every entity if you're only adding information to your own, created entities.

If you create a maximum of say, 10 entities, you can simply have:

PHP Code:
new ent[10];
new 
info[10]; 
such that info[i] contains ent[i]'s information.

Last edited by Miu; 05-25-2015 at 15:13.
Miu 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 08:56.


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