23.02.2009, 09:03
use my code, and add this function to your script
as far as I know, pickup IDs are still bugged when you're using a lot of them and therefore aren't reliable, unless you place huge quantities of pickups really close together this works like a charm
pawn Код:
stock PlayerToPoint(playerid, Float:radi, Float:x, Float:y, Float:z)
{
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;
}