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

A list of all an entity's properties?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HarbingTarbl
Junior Member
Join Date: Nov 2009
Old 12-02-2009 , 11:59   A list of all an entity's properties?
Reply With Quote #1

Is there a way to find a list of all of an entities properties? I am trying to use the GetEntPropString() command to get an entities model but I have no idea what flags/options to set, or even where to find a list of valid arguments.
HarbingTarbl is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-02-2009 , 19:24   Re: A list of all an entity's properties?
Reply With Quote #2

sure

Code:
01:23:33 find sm_dump
01:23:33 "sm_dumpentites"
         "sm_dump_netprops_xml"
          - Dumps the networkable property table as an XML file
         "sm_dump_netprops"
          - Dumps the networkable property table as a text file
         "sm_dump_classes"
          - Dumps the class list as a text file
         "sm_dump_datamaps"
          - Dumps the data map list as a text file
         "sm_dump_teprops"
          - Dumps tempentity props to a file
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 12-02-2009 , 19:46   Re: A list of all an entity's properties?
Reply With Quote #3

The model name is a dataprop:

Code:
new String:strModel[150];
GetEntPropString(iEntity, Prop_Data, "m_ModelName", strModel, sizeof(strModel));
pheadxdll is offline
HarbingTarbl
Junior Member
Join Date: Nov 2009
Old 12-02-2009 , 22:10   Re: A list of all an entity's properties?
Reply With Quote #4

Ah that worked, thanks.
HarbingTarbl is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-20-2018 , 08:41   Re: A list of all an entity's properties?
Reply With Quote #5

Hi, all! This thread is old, anyway...
Quote:
Originally Posted by berni
find sm_dump
Console show this command is unknown (for L4d1).

1) However there is "ent_dump". Don't know where it dump to. So, where can I find dump?

2) How to get list of properties for some entity, like
"info_particle_system" has "effect_name" property,
"hegrenade_projectile" has:
- m_hThrower
- m_clrRender
- m_flDamage
... e.t.c.
I read this page, but I don't see properties there.

3) How to check programmatically is some entity (specified by index) supports some property (specified by name)?,
before using it in like SetEntPropFloat or DispatchKeyValue functions.

Much thanks for the answers.

Last edited by Dragokas; 03-20-2018 at 08:46.
Dragokas is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 03-20-2018 , 09:57   Re: A list of all an entity's properties?
Reply With Quote #6

Quote:
Originally Posted by Dragokas View Post
[...]
Quote:
Originally Posted by berni View Post
Code:
"sm_dump_netprops_xml"
"sm_dump_netprops"
"sm_dump_classes"
"sm_dump_datamaps"
"sm_dump_teprops"
cravenge is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-20-2018 , 10:09   Re: A list of all an entity's properties?
Reply With Quote #7

Thanks. Looks like I'm lazy.

Ok, still, I entered sm_dump_netprops_xml in RCON and it returns hint to specify <file>, so I entered:
Code:
sm_dump_netprops_xml props.xml
and I can't find props.xml file on my server. What folder should I search in?

And question 3) is remained.
I found example of properties enumeration, but that is C++ code.

Last edited by Dragokas; 03-20-2018 at 10:10.
Dragokas is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 03-21-2018 , 06:20   Re: A list of all an entity's properties?
Reply With Quote #8

Quote:
Originally Posted by Dragokas View Post
[...]
You find can find it in your game's folder. (Ex: [L4D2] <game dir>/left4dead2/)
cravenge is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-21-2018 , 12:01   Re: A list of all an entity's properties?
Reply With Quote #9

cravenge, I think I do something compelety wrong.

So, this command needs to be executed in game console, not RCON?

If I'm executing it in game console, I get:
Code:
] sm_dump_netprops_xml netprops_xml.txt
Unknown command: sm_dump_netprops_xml

] sm dump_netprops_xml netprops_xml.txt
SourceMod 1.7.3-dev+5280, by AlliedModders LLC
To see running plugins, type "sm plugins"
To see credits, type "sm credits"
Visit http://www.sourcemod.net/
And no new file in game dir-s.
The same happens for any command from the list you quoted.

Is there any other way, or source file where I can get a ready list ?

Is it possible to get the base entity name of the gived entity id to ensure this entity contains some property name?

Last edited by Dragokas; 03-21-2018 at 12:01.
Dragokas is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-21-2018 , 12:07   Re: A list of all an entity's properties?
Reply With Quote #10

Quote:
Originally Posted by Dragokas View Post
SourceMod 1.7.3-dev+5280, by AlliedModders LLC
You should really update to the stable build..
Mitchell 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 20:41.


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