AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Get all entities' targetname (https://forums.alliedmods.net/showthread.php?t=88058)

DumAs 03-19-2009 23:55

Get all entities' targetname
 
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!

Dores 03-20-2009 00:57

Re: Get all entities' targetname
 
Use pev_targetname.

DumAs 03-20-2009 03:22

Re: Get all entities' targetname
 
@Dores,thx
how about get total entity numbers?

xPaw 03-20-2009 03:28

Re: Get all entities' targetname
 
entity_count();
Returns the number of entities in the world.

fakemeta_util also have fm_entity_count();

Arkshine 03-20-2009 05:37

Re: Get all entities' targetname
 
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.

DumAs 03-20-2009 10:35

Re: Get all entities' targetname
 
Finally, I use EV_FL_dmg instead, it's much easier and more accurate.
Thx all your help, guys!!!!:)


All times are GMT -4. The time now is 08:49.

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