Raised This Month: $ Target: $400
 0% 

How to determine whether the player is looking for an entity?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bibu
Veteran Member
Join Date: Sep 2010
Old 06-18-2011 , 16:14   Re: How to determine whether the player is looking for an entity?
Reply With Quote #1

PHP Code:
stock bool:is_aiming_at_player(id)
{
    new 
targettempclassname[32]
    
    
get_user_aiming(idtargettemp)
    
    
pev(targetpev_classnameclassname31)
    
    if(
equal(classname"player")) 
        return 
true
       
    
return false

This would be to check if a player is aiming at another player. For all the other entities I would use an array where all the solid entities are in there.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu 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 23:25.


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