Thread: [Solved] Entity real name
View Single Post
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-14-2019 , 10:35   Re: Entity real name
Reply With Quote #7

i have been fighting with these names from VHE for 2man kz maps, and how i remember it was a little confusing, like target in .sma was name in VHE or something like that, try these things:
Code:
1)
entity_get_string( ent, EV_SZ_target, target, charsmax( target ) )
entity_get_string( ent, EV_SZ_targetname, target2, charsmax( target2 ) )

and i had this also:

2)
new targetent = FM_NULLENT;

//this below was done in plugin_init, cant remember if it must be there, but just to let you know:
while(( targetent = engfunc(EngFunc_FindEntityByString, targetent, "name", target ) != 0))
{
//your code
}
i dont have time to test it again, but i think second one is more accurate, you can test it
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 11-14-2019 at 10:38.
JocAnis is offline