IsPlayerLookAt Function
#5

pawn Код:
public IsPlayerLookAt(playerid, Float:range, Float:x, Float:y, Float:z, Float:max_al, Float:max_ar)
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i, range, x, y, z))
        {
            // max_al = max angle left
            // max_ar = max angle right
            // max_al && max_ar coordinates at the top
            new Float:angle;
            GetPlayerFacing(i, angle);
            if(angle > max_al && angle < max_ar) return 1;
            else return 0;
        }
        else return 0;
    }
    return 0;
}
Check this ^
Try it, might give good results
Reply


Messages In This Thread
IsPlayerLookAt Function - by Voldemort - 23.08.2010, 14:30
Re: IsPlayerLookAt Function - by boelie - 23.08.2010, 14:52
Re: IsPlayerLookAt Function - by Voldemort - 23.08.2010, 14:57
Re: IsPlayerLookAt Function - by boelie - 23.08.2010, 15:01
Re: IsPlayerLookAt Function - by Claude - 23.08.2010, 15:06
Re: IsPlayerLookAt Function - by Voldemort - 23.08.2010, 15:18
Re: IsPlayerLookAt Function - by Nero_3D - 23.08.2010, 16:32
Re: IsPlayerLookAt Function - by Voldemort - 23.08.2010, 18:43
Re: IsPlayerLookAt Function - by Nero_3D - 23.08.2010, 19:49

Forum Jump:


Users browsing this thread: 2 Guest(s)