Raised This Month: $51 Target: $400
 12% 

Finding Ents by EntID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kryptonyte
Senior Member
Join Date: Aug 2004
Location: South Carrolinaa
Old 07-26-2005 , 21:35   Finding Ents by EntID
Reply With Quote #1

Hey I was just working on a script and noticed that there is no function for finding ents by their EntID. This is something for the mecklenburg_final map and the doors are labeled with the same targetname but different EntID's. I searched for the function already and couldn't find one that might work. If anyone has any ideas please help.
__________________

Kaboom Clan Site
Visit Kaboom Counter-Strike 1.6 Server: 24.88.56.188:27015
Visit Kaboom DOD Server: 24.88.56.188:2030
kryptonyte is offline
Send a message via ICQ to kryptonyte Send a message via AIM to kryptonyte Send a message via MSN to kryptonyte Send a message via Yahoo to kryptonyte
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 07-26-2005 , 21:40  
Reply With Quote #2

What?

Entities in AMXx scripting are the numbers of the entity IDs, so if you already know the ID to search for then you already have the entity handle.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
kryptonyte
Senior Member
Join Date: Aug 2004
Location: South Carrolinaa
Old 07-26-2005 , 21:42  
Reply With Quote #3

Yeah just realized how stupid taht question was after i thought about it...

I got another question... I'm trying to use the force_use function like this

Code:
force_use(id,49)
where id is the players id and 49 is the EntID...but it won't seem to work.
__________________

Kaboom Clan Site
Visit Kaboom Counter-Strike 1.6 Server: 24.88.56.188:27015
Visit Kaboom DOD Server: 24.88.56.188:2030
kryptonyte is offline
Send a message via ICQ to kryptonyte Send a message via AIM to kryptonyte Send a message via MSN to kryptonyte Send a message via Yahoo to kryptonyte
kryptonyte
Senior Member
Join Date: Aug 2004
Location: South Carrolinaa
Old 07-27-2005 , 00:10  
Reply With Quote #4

bump
__________________

Kaboom Clan Site
Visit Kaboom Counter-Strike 1.6 Server: 24.88.56.188:27015
Visit Kaboom DOD Server: 24.88.56.188:2030
kryptonyte is offline
Send a message via ICQ to kryptonyte Send a message via AIM to kryptonyte Send a message via MSN to kryptonyte Send a message via Yahoo to kryptonyte
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 07-27-2005 , 00:15  
Reply With Quote #5

a) What entity is 49?

b) How can you be sure that 49 is an entity?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
kryptonyte
Senior Member
Join Date: Aug 2004
Location: South Carrolinaa
Old 07-27-2005 , 00:18  
Reply With Quote #6

Well entity 49 is a rotating door and i know it is real because ive checked it in game.


Classname: func_door_rotating
Target:
Targetname: ricksofficedoors
Health: 2000.000000
EntID: 49
Angles: 0.000000 0.00000
__________________

Kaboom Clan Site
Visit Kaboom Counter-Strike 1.6 Server: 24.88.56.188:27015
Visit Kaboom DOD Server: 24.88.56.188:2030
kryptonyte is offline
Send a message via ICQ to kryptonyte Send a message via AIM to kryptonyte Send a message via MSN to kryptonyte Send a message via Yahoo to kryptonyte
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 07-27-2005 , 00:37  
Reply With Quote #7

because u need to touch it not use
Freecode is offline
kryptonyte
Senior Member
Join Date: Aug 2004
Location: South Carrolinaa
Old 07-27-2005 , 00:52  
Reply With Quote #8

I'm using the same function on other rotating doors just using find_ent_by_tname but for these doors it wont work since three doors use the same tname.
__________________

Kaboom Clan Site
Visit Kaboom Counter-Strike 1.6 Server: 24.88.56.188:27015
Visit Kaboom DOD Server: 24.88.56.188:2030
kryptonyte is offline
Send a message via ICQ to kryptonyte Send a message via AIM to kryptonyte Send a message via MSN to kryptonyte Send a message via Yahoo to kryptonyte
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 07-27-2005 , 00:53  
Reply With Quote #9

a) Entity indexes, besides players, aren't static, they can change due to certain conditions (maxplayers changing is one).

b) Try what Freecode said, instead of forcing a use force a player to touch it.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 07-27-2005 , 01:24  
Reply With Quote #10

You could check it for name and position, you'll probably have to hard code the pos into the plugin, but if its for a specific map it should be fine.
__________________
twistedeuphoria 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 14:48.


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