Raised This Month: $ Target: $400
 0% 

find ent by model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kurai-Domi
Member
Join Date: Sep 2004
Old 09-16-2004 , 12:20   find ent by model
Reply With Quote #1

i want to find an entity,but i only know the modelname not the classname, how can i do this?
Kurai-Domi is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 09-18-2004 , 06:22  
Reply With Quote #2

How come you don't know the classname?
Johnny got his gun is offline
Ingram
Veteran Member
Join Date: May 2004
Old 09-18-2004 , 11:56  
Reply With Quote #3

well if hes looking for an actual model its probably env_model, cycler, or a player
Ingram is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 09-18-2004 , 16:30  
Reply With Quote #4

Eh well if you don't know the model then you can go through each ent in the game and get and compare the model names, then whichever one matches your model, that's the ent you were looking for.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Ingram
Veteran Member
Join Date: May 2004
Old 09-18-2004 , 20:22  
Reply With Quote #5

i think u'd be better off running through every ent, and checking it than running this command like 50 times
Ingram is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 09-18-2004 , 21:24  
Reply With Quote #6

Did I not just say that? -.-
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 09-19-2004 , 06:56  
Reply With Quote #7

Yep something like

Code:
new const MAXENTS = get_global_int(GL_maxEntities) for(new ent = 1; ent < MAXENTS; ent++) {     if (!is_valid_ent(ent))         continue     // check model here }
Johnny got his gun 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 17:18.


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