Error while compiling
#6

Add this somewhere in your script but remember, NOT UNDER ANY CALLBACKS! Just anywhere. Hope it works.

Advice: Use IsPlayerInRangeOfPoint instead of using this one. It's faster and easier to use.

Код:
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Floatldposx, Floatldposy, Floatldposz;
    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;
}
Reply


Messages In This Thread
Error while compiling - by Dejan12345 - 05.08.2016, 08:43
Re: Error while compiling - by Dejan12345 - 05.08.2016, 08:55
Re: Error while compiling - by ExTaZZ69 - 05.08.2016, 08:58
Re: Error while compiling - by Dejan12345 - 05.08.2016, 09:02
Re: Error while compiling - by Dejan12345 - 05.08.2016, 09:12
Re: Error while compiling - by AjaxM - 05.08.2016, 09:13
Re: Error while compiling - by PrO.GameR - 05.08.2016, 10:49

Forum Jump:


Users browsing this thread: 2 Guest(s)