help with pickups[SOLVED]
#10

pawn Код:
if(PlayerToPoint(3.0,playerid,x,y,z)) return SendClientMessage(playerid, COLOR_GREEN, "Jump out and dive!");
Put the coords of your pickup where it says x,y,z

pawn Код:
public 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);
        //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
pawn Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
Reply


Messages In This Thread
help with pickups[SOLVED] - by Lorenc_ - 25.01.2010, 00:44
Re: help with pickups - by Lorenc_ - 25.01.2010, 01:44
Re: help with pickups - by pierhs - 25.01.2010, 04:42
Re: help with pickups - by Lorenc_ - 25.01.2010, 05:06
Re: help with pickups - by CuervO - 25.01.2010, 06:45
Re: help with pickups - by Lorenc_ - 26.01.2010, 09:25
Re: help with pickups - by Calgon - 26.01.2010, 09:49
Re: help with pickups - by PRANK - 26.01.2010, 11:17
Re: help with pickups - by Lorenc_ - 26.01.2010, 22:39
Re: help with pickups - by kmzr - 26.01.2010, 23:06

Forum Jump:


Users browsing this thread: 2 Guest(s)