AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get_user_aiming, don't affect on ents. (https://forums.alliedmods.net/showthread.php?t=94211)

xbatista 06-08-2009 06:15

get_user_aiming, don't affect on ents.
 
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.

xPaw 06-08-2009 07:06

Re: get_user_aiming, don't affect on ents.
 
if( is_user_alive( target ) )

Was that hard? :P

xbatista 06-08-2009 07:19

Re: get_user_aiming, don't affect on ents.
 
Works strangely :/ that do no effect :/
Maybe there are another way ? :mrgreen:

IneedHelp 06-08-2009 13:17

Re: get_user_aiming, don't affect on ents.
 
PHP Code:

if (! (<= target <= g_iMaxPlayers ) ) // g_iMaxPlayers = get_maxplayers() 


xbatista 06-08-2009 14:09

Re: get_user_aiming, don't affect on ents.
 
Ahhhrr ,sorry guys I just needed to use get_distance ;) :oops:


All times are GMT -4. The time now is 13:48.

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