need help with pickups please
#9

use my code, and add this function to your script

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;
}
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
Reply


Messages In This Thread
need help with pickups please - by Guns_N_Roses - 22.02.2009, 09:19
Re: need help with pickups please - by [RP]Rav - 22.02.2009, 09:23
Re: need help with pickups please - by JaYmE - 22.02.2009, 09:25
Re: need help with pickups please - by Guns_N_Roses - 22.02.2009, 18:24
Re: need help with pickups please - by KnooL - 22.02.2009, 19:29
Re: need help with pickups please - by Guns_N_Roses - 22.02.2009, 22:14
Re: need help with pickups please - by Coicatak - 23.02.2009, 08:02
Re: need help with pickups please - by Guns_N_Roses - 23.02.2009, 08:59
Re: need help with pickups please - by [RP]Rav - 23.02.2009, 09:03
Re: need help with pickups please - by Guns_N_Roses - 23.02.2009, 09:09

Forum Jump:


Users browsing this thread: 1 Guest(s)