IsPlayerInRangeOfPoint alternative
#3

pawn Код:
stock IsPlayerInRangeOf2DPoint( playerid, Float:range, Float:px, Float:py )
{
    new Float:lfPos[ 3 ];
    GetPlayerPos( playerid, lfPos[ 0 ], lfPos[ 1 ], lfPos[ 2 ] );
    return ( VectorSize( px - lfPos[ 0 ], py - lfPos[ 1 ], 0.0 ) < range );
}
I hope it works.
Reply


Messages In This Thread
IsPlayerInRangeOfPoint alternative - by NeroX98 - 24.07.2014, 23:04
Re: IsPlayerInRangeOfPoint alternative - by David (Sabljak) - 24.07.2014, 23:10
Re: IsPlayerInRangeOfPoint alternative - by IstuntmanI - 24.07.2014, 23:13
Re: IsPlayerInRangeOfPoint alternative - by d3ll - 24.07.2014, 23:24
Re: IsPlayerInRangeOfPoint alternative - by NeroX98 - 24.07.2014, 23:30

Forum Jump:


Users browsing this thread: 1 Guest(s)