Public feed #598655

Anonymous

public text v1 · immutable
Raw Edit
·published 2007-07-01 14:52 UTC
rendered paste body
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
        if (gdebug >= 3){printf("DEBUG ProxDetectorS()");}
        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;
}