Raised This Month: $32 Target: $400
 8% 

Engine Entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Prunned^BrickWalker
Member
Join Date: Mar 2005
Location: US, Mid West, Wisconsin
Old 01-22-2006 , 17:15   Engine Entity
Reply With Quote #1

IS there a ent name for enemy?
__________________

Don't fuck with the, BrickWalker .
Prunned^BrickWalker is offline
Send a message via AIM to Prunned^BrickWalker Send a message via MSN to Prunned^BrickWalker
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 01-22-2006 , 17:55  
Reply With Quote #2

Moved from "Support/Help" forum.
Brad is offline
Kraugh
Senior Member
Join Date: Jan 2006
Location: barrington, ri
Old 01-22-2006 , 17:56  
Reply With Quote #3

player?
__________________
"You can not restrain a fool from speaking, but nothing obliges you to listen."
Kraugh is offline
Send a message via AIM to Kraugh
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-22-2006 , 18:13  
Reply With Quote #4

If I understand what you're trying to do,

Code:
new classname[32]; entity_get_string(id,EV_SZ_classname,31); if(equali(classname,"player")) { // do something

A slight extrapolation of Kraugh's comment.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Prunned^BrickWalker
Member
Join Date: Mar 2005
Location: US, Mid West, Wisconsin
Old 01-22-2006 , 18:24  
Reply With Quote #5

Yes, but that will search for any player, is there a way to search for only enemys?
__________________

Don't fuck with the, BrickWalker .
Prunned^BrickWalker is offline
Send a message via AIM to Prunned^BrickWalker Send a message via MSN to Prunned^BrickWalker
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-22-2006 , 18:28  
Reply With Quote #6

What is an "enemy" in this case?

what you could do is scan through all players in the server, and then check if their team is not the same as the user's team, then do whatever it is you're trying to do.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Wolle
Member
Join Date: Jun 2005
Location: Berlin / Germany
Old 01-22-2006 , 18:34  
Reply With Quote #7

Why do you want to search for enemies and what do you want to do with them once you found them?
Wolle is offline
Send a message via AIM to Wolle
Prunned^BrickWalker
Member
Join Date: Mar 2005
Location: US, Mid West, Wisconsin
Old 01-22-2006 , 18:36  
Reply With Quote #8

Well the plugin "Hacking tools" checks for players, but half the time it aims on your own team, so i was wondering if there was a check for the other team.
__________________

Don't fuck with the, BrickWalker .
Prunned^BrickWalker is offline
Send a message via AIM to Prunned^BrickWalker Send a message via MSN to Prunned^BrickWalker
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-22-2006 , 18:41  
Reply With Quote #9

I don't know what the target's ID is, but you can try something like this:

Code:
if(get_user_team(id) == get_user_team(target)) {        return PLUGIN_HANDLED; }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 04:03.


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