Player to point?
#2

pawn Код:
forward PlayerToPoint(Float:radi, playerid, Float:xx, Float:yy, Float:zz);
public PlayerToPoint(Float:radi, playerid, Float:xx, Float:yy, Float:zz)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        tempposx = (oldposx -xx);
        tempposy = (oldposy -yy);
        tempposz = (oldposz -zz);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
simples...
Reply


Messages In This Thread
Player to point? - by _COTTA_ - 09.03.2010, 15:35
Re: Player to point? - by SlashPT - 09.03.2010, 15:59
Re: Player to point? - by _COTTA_ - 09.03.2010, 16:10
Re: Player to point? - by _COTTA_ - 09.03.2010, 16:13
Re: Player to point? - by SlashPT - 09.03.2010, 16:26
Re: Player to point? - by _COTTA_ - 10.03.2010, 13:11

Forum Jump:


Users browsing this thread: 1 Guest(s)