Custom IsPlayerInRangeOfPoint
#2

pawn Код:
PlayerToPoint(Float:radius, playerid, Float:X, Float:Y, Float:Z)
{
    new Float:oldpos[3], Float:temppos[3];
    GetPlayerPos(playerid, oldpos[0], oldpos[1], oldpos[2]);
    temppos[0] = (oldpos[0] -X);
    temppos[1] = (oldpos[1] -Y);
    temppos[2] = (oldpos[2] -Z);
    if(((temppos[0] < radius) && (temppos[0] > -radius)) && ((temppos[1] < radius) && (temppos[1] > -radius)) && ((temppos[2] < radius) && (temppos[2] > -radius)))
    {
        return true;
    }
    return false;
//=============
if(PlayerToPoint(10.0, playerid, x,y,z))
Or...
pawn Код:
if(IsPlayerInRangeOfPoint(playerid , range, x,y,z))
Reply


Messages In This Thread
Custom IsPlayerInRangeOfPoint - by Anuris - 11.11.2014, 15:44
Re: Custom IsPlayerInRangeOfPoint - by M0HAMMAD - 11.11.2014, 16:01
Re: Custom IsPlayerInRangeOfPoint - by Vince - 11.11.2014, 16:22
Re: Custom IsPlayerInRangeOfPoint - by Anuris - 11.11.2014, 16:30
Re: Custom IsPlayerInRangeOfPoint - by Vince - 11.11.2014, 16:31
Re: Custom IsPlayerInRangeOfPoint - by Anuris - 11.11.2014, 16:34
Re: Custom IsPlayerInRangeOfPoint - by Xdrime - 26.05.2016, 09:50

Forum Jump:


Users browsing this thread: 1 Guest(s)