Raised This Month: $ Target: $400
 0% 

get_user_aiming, don't affect on ents.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 06-08-2009 , 06:15   get_user_aiming, don't affect on ents.
Reply With Quote #1

PHP Code:
static targetbody;
    new 
Float:dist get_user_aiming(indextargetbody); 
So how to ignore entities with this thing? ,cuz amxx wiki functions writes :
Quote:
this also returns an ent_id (victim) > 0 if you are aiming at an entity which is not a player.
I need only when aiming on players and don't affect on ents.
__________________

Last edited by xbatista; 06-08-2009 at 06:45.
xbatista is offline
Send a message via Skype™ to xbatista
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 06-08-2009 , 07:06   Re: get_user_aiming, don't affect on ents.
Reply With Quote #2

if( is_user_alive( target ) )

Was that hard?
__________________
xPaw is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 06-08-2009 , 07:19   Re: get_user_aiming, don't affect on ents.
Reply With Quote #3

Works strangely :/ that do no effect :/
Maybe there are another way ?
__________________

Last edited by xbatista; 06-08-2009 at 07:21.
xbatista is offline
Send a message via Skype™ to xbatista
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 06-08-2009 , 13:17   Re: get_user_aiming, don't affect on ents.
Reply With Quote #4

PHP Code:
if (! (<= target <= g_iMaxPlayers ) ) // g_iMaxPlayers = get_maxplayers() 
__________________
IneedHelp is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 06-08-2009 , 14:09   Re: get_user_aiming, don't affect on ents.
Reply With Quote #5

Ahhhrr ,sorry guys I just needed to use get_distance ;)
__________________
xbatista is offline
Send a message via Skype™ to xbatista
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 13:48.


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