Help with command.
#8

pawn Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);

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);
       
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
Reply


Messages In This Thread
Help with command. - by cepiokas - 02.10.2009, 13:58
Re: Help with command. - by ded - 02.10.2009, 14:11
Re: Help with command. - by cepiokas - 02.10.2009, 14:22
Re: Help with command. - by Peter_Corneile - 02.10.2009, 14:24
Re: Help with command. - by ded - 02.10.2009, 14:25
Re: Help with command. - by Peter_Corneile - 02.10.2009, 14:26
Re: Help with command. - by cepiokas - 02.10.2009, 14:37
Re: Help with command. - by Peter_Corneile - 02.10.2009, 14:42
Re: Help with command. - by cepiokas - 02.10.2009, 14:44
Re: Help with command. - by Peter_Corneile - 02.10.2009, 14:51

Forum Jump:


Users browsing this thread: 1 Guest(s)