Raised This Month: $ Target: $400
 0% 

Looking at?..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DahVid
Senior Member
Join Date: Jun 2005
Old 08-24-2005 , 17:56   Looking at?..
Reply With Quote #1

Well, I'm making a plugin but I can't really get a grasp on it.

I'm trying to figure out how to find the closest player who's looking at you, and you are looking at him..

Also, how do I get an entity for a player. My friend suggest that I use is_visible. Sounds logical (If theres not a better way) but I don't use engine much.

I was thinking its like..
new player=find_ent_by_class(-1,"Player")
DahVid is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-24-2005 , 18:52  
Reply With Quote #2

yea i think the ent thing is right...yoou could take a look at physic or w/e that name is from super hero mod...she does the exact samething(finds the closet player)...
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Velocity36
Senior Member
Join Date: Jul 2005
Old 08-24-2005 , 20:04  
Reply With Quote #3

Code:
{     new id = parm[0]     new targetid, body         {         get_user_aiming(id, targetid, body)         if (targetid)         } }

Maybe?
__________________
[img]http://img81.**************/img81/593/velocityferrari7mx.jpg[/img]
Velocity36 is offline
DahVid
Senior Member
Join Date: Jun 2005
Old 08-24-2005 , 20:07  
Reply With Quote #4

I mean generally looking at -- that's positively aiming at..
DahVid is offline
Velocity36
Senior Member
Join Date: Jul 2005
Old 08-24-2005 , 20:08  
Reply With Quote #5

Yea..
__________________
[img]http://img81.**************/img81/593/velocityferrari7mx.jpg[/img]
Velocity36 is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 08-24-2005 , 20:13  
Reply With Quote #6

Yes, what this peep with pistol said.
get_user_aiming is what you need.
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
DahVid
Senior Member
Join Date: Jun 2005
Old 08-24-2005 , 20:44  
Reply With Quote #7

How would I tell if they were both looking at eachotheR? it's confusing the hell out of me.

Would I use a variable that checks all players? If so then how do i find the id of the original dude looking at the dude. I was going to do

if(equali(originalid,targetoflooker)) {

but i don't think it'll work or something. *sigh*
DahVid is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-24-2005 , 21:00  
Reply With Quote #8

Code:
{     new id = parm[0]     new targetid, body, targetid_other, body_other     new palyers[32]     new num[32]         {         get_user_aiming(id, targetid, body)         get_players(players, num, "a")         for( new i = 0; i<num; i++){              get_user_aiming(i ,targetid_other, body_other)              get_user_userid(i)              get_user_userid(id)        if(target_id == get_user_userid(i) && targetid_other == get_user_userid(i) ){           //bla bla bla.....            }           } }


something like that...not sure if this will work though...
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
DahVid
Senior Member
Join Date: Jun 2005
Old 08-24-2005 , 21:05  
Reply With Quote #9

I don't understand that code at all. I'm hoping it doesn't work because it looks very decapritated.
DahVid is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-24-2005 , 21:06  
Reply With Quote #10

well i coudnt really indent or anything cuz i amde it through the post :/
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Reply


Thread Tools
Display Modes

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:18.


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