[Ajuda] Com comandos
#2

https://sampwiki.blast.hk/wiki/IsPlayerInAnyVehicle
pawn Код:
stock 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 true;
        }
    }
    return 0;
}

//EXEMPLO:
if(PlayerToPoint(3.0, playerid, X, Y, Z))
{
//SUA FUNЗГO
}
Reply


Messages In This Thread
[OFF][Ajuda] Com comandos - by MatheusgabrielDS - 17.04.2012, 19:11
Re: [Ajuda] Com comandos - by CidadeNovaRP - 17.04.2012, 19:15
Re: [Ajuda] Com comandos - by zbt - 17.04.2012, 19:50
Re: [Ajuda] Com comandos - by CidadeNovaRP - 17.04.2012, 19:51
Re: [Ajuda] Com comandos - by MatheusgabrielDS - 17.04.2012, 20:15
Re: [Ajuda] Com comandos - by CidadeNovaRP - 17.04.2012, 20:28
Re: [Ajuda] Com comandos - by MatheusgabrielDS - 17.04.2012, 21:26
Re: [Ajuda] Com comandos - by CidadeNovaRP - 18.04.2012, 15:52

Forum Jump:


Users browsing this thread: 2 Guest(s)