Raised This Month: $ Target: $400
 0% 

Get all entities' targetname


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DumAs
New Member
Join Date: Mar 2009
Location: Tianjin,China
Old 03-19-2009 , 23:55   Get all entities' targetname
Reply With Quote #1

I'm new here , and new with AMXX
I wanna code a "auto healing" script for kz maps with HPB,and with targetname to recognize the HPB, such as healingdoor,goddoor,etc.
I've already approach some,like EngFunc_FindEntityByString, but it needs a particular targetname. If I want to get all entities' targetname, and store them in a vector, then ...?
Help me ,plz. Many thx!

Last edited by DumAs; 03-20-2009 at 00:01.
DumAs is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 03-20-2009 , 00:57   Re: Get all entities' targetname
Reply With Quote #2

Use pev_targetname.
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
DumAs
New Member
Join Date: Mar 2009
Location: Tianjin,China
Old 03-20-2009 , 03:22   Re: Get all entities' targetname
Reply With Quote #3

@Dores,thx
how about get total entity numbers?
DumAs is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 03-20-2009 , 03:28   Re: Get all entities' targetname
Reply With Quote #4

entity_count();
Returns the number of entities in the world.

fakemeta_util also have fm_entity_count();
__________________
xPaw is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-20-2009 , 05:37   Re: Get all entities' targetname
Reply With Quote #5

global_get( glb_maxClients ) will return the number max of entities. ( max = 900 + 15 * ( max_slot - 1 ) )

engfunc( EngFunc_NumberOfEntities ) will return the number of used entities.
Arkshine is offline
DumAs
New Member
Join Date: Mar 2009
Location: Tianjin,China
Old 03-20-2009 , 10:35   Re: Get all entities' targetname
Reply With Quote #6

Finally, I use EV_FL_dmg instead, it's much easier and more accurate.
Thx all your help, guys!!!!
DumAs 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:49.


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