Raised This Month: $ Target: $400
 0% 

Get name of entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Max!
Member
Join Date: Jun 2009
Old 01-31-2010 , 21:08   Get name of entity
Reply With Quote #1

Is there a way to get the name of an entity?.

I dont mean info_target or func_wall or something, I mean the name you can set in valve hammer. I made a map and I placed the entity func_wall around the map so I know where to place things in my code, but I need to get their name so i can distinguish them.
Max! is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-31-2010 , 21:10   Re: Get name of entity
Reply With Quote #2

These are your string constants:
Code:
enum {     EV_SZ_classname = 0,     EV_SZ_globalname,     EV_SZ_model,     EV_SZ_target,     EV_SZ_targetname,     EV_SZ_netname,     EV_SZ_message,     EV_SZ_noise,     EV_SZ_noise1,     EV_SZ_noise2,     EV_SZ_noise3,     EV_SZ_viewmodel,     EV_SZ_weaponmodel, }

Try each one and see the results.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-01-2010 , 08:29   Re: Get name of entity
Reply With Quote #3

Quote:
Originally Posted by Max! View Post
Is there a way to get the name of an entity?.

I dont mean info_target or func_wall or something, I mean the name you can set in valve hammer. I made a map and I placed the entity func_wall around the map so I know where to place things in my code, but I need to get their name so i can distinguish them.
Usually such entity have an unique model name. ( pev_model or EV_SZ_model )
__________________
Arkshine is offline
Max!
Member
Join Date: Jun 2009
Old 02-04-2010 , 21:53   Re: Get name of entity
Reply With Quote #4

I changed the type of the entity to info_target, so now i just need to get the unique name of it. Im going to go try globalname now, ill let you know the results when im done, but assume they were negative until then ;D

Edit: Just wondering how to get all entitys of a specific type at the plugins init

Last edited by Max!; 02-04-2010 at 22:06.
Max! is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-05-2010 , 05:56   Re: Get name of entity
Reply With Quote #5

There is no unique name for such entity, except if you set in its pev a specific classname or something like.

"specific type" is quite vague.
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

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 07:26.


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