Custom IsPlayerInRangeOfPoint
#1

Hello.
I've founded in some script this function:

pawn Код:
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        tempposx = (oldposx -x);
        tempposy = (oldposy -y);
        tempposz = (oldposz -z);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
It seems that it's the same as IsPlayerInRangeOfPoint.
So, is there any point of using this custom function, or it's really stupid? (I think it is.)

Sorry for my English.
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: 3 Guest(s)