Raised This Month: $ Target: $400
 0% 

Getting Map Entities


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shine771
Senior Member
Join Date: Jun 2007
Old 01-12-2009 , 16:28   Getting Map Entities
Reply With Quote #1

I made a map, with custom entities. Compiled fine. I want to find those entities with amxx and get origin and keyvalues. Seems like i can't find those entities... i tried:

PHP Code:
new ent=-1,n
while((ent=engfunc(EngFunc_FindEntityByString,ent,"classname","my_classname")) != && MAX_FLAGS+1
   
n++
        
log_amx("n=%d",n
n returned 0
I also tried registering FM_Spawn forward in precache and unregistering it on plugin_init.. it logged all entities except mine... I tried with FM_KeyValue.. the same. All except mine. I decompiled the map and still those entities were there. Strange? Any ideas?
shine771 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-12-2009 , 16:34   Re: Getting Map Entities
Reply With Quote #2

Load shptools on your map ( http://forums.space-headed.net/viewtopic.php?t=111 ) , type listent in console and see yours ents.
For keyvalue, hook FM_SetKevalue (with shptools), see listapi, hook_api, and restart the map.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 01-12-2009, 16:37
Arkshine
This message has been deleted by Arkshine. Reason: nvm
shine771
Senior Member
Join Date: Jun 2007
Old 01-13-2009 , 09:09   Re: Getting Map Entities
Reply With Quote #4

Hmm.. doesn't show up. Seems like it's a map problem... :/.
shine771 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-13-2009 , 09:53   Re: Getting Map Entities
Reply With Quote #5

Is it possible to get the map, shine771 ?

[edit] Thanks.

Last edited by Arkshine; 01-13-2009 at 14:50.
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-13-2009 , 14:48   Re: Getting Map Entities
Reply With Quote #6

Weird, indeed. I've tried without success, though there is a way. Using Engine and pfn_keyvalue, it works... Don't know why it doesn't work via fakemeta. :/

Last edited by Arkshine; 01-13-2009 at 14:50.
Arkshine is offline
shine771
Senior Member
Join Date: Jun 2007
Old 01-14-2009 , 16:40   Re: Getting Map Entities
Reply With Quote #7

I'm making a mod.. and i don't want to include engine just because of 1-2 lines... stupid.. :/.
EDIT: about pfn_keyvalue, yea i saw that in soccerjam. Was wondering how the author got it to work...

Last edited by shine771; 01-14-2009 at 16:43.
shine771 is offline
shine771
Senior Member
Join Date: Jun 2007
Old 01-25-2009 , 09:14   Re: Getting Map Entities
Reply With Quote #8

bumpy... i really need this.. :S...
shine771 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 01:43.


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