[Ajuda] Criar objeto com comando!
#6

Utilize esta stock (Peguei da wiki, nгo tem crйditos lб)

pawn Код:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
    new Float:a;
    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    if (GetPlayerVehicleID(playerid))
    {
        GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}
Entгo para usa-la e assim: (Exemplo com SetPlayerPos)

pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
GetXYInFrontOfPlayer(playerid,x,y,5.0);
SetPlayerPos(playerid, x, y, z);
Reply


Messages In This Thread
Criar objeto com comando! - by SkullFire - 04.05.2013, 15:26
Re: Criar objeto com comando! - by .FuneraL. - 04.05.2013, 16:19
Re: Criar objeto com comando! - by SkullFire - 04.05.2013, 16:27
Re: Criar objeto com comando! - by SkullFire - 04.05.2013, 17:00
Re: Criar objeto com comando! - by Schocc - 04.05.2013, 17:14
Re: Criar objeto com comando! - by arakuta - 04.05.2013, 17:29
Re: Criar objeto com comando! - by SkullFire - 04.05.2013, 17:43
Re: Criar objeto com comando! - by SkullFire - 05.05.2013, 13:58
Re: Criar objeto com comando! - by VivendoVirtual - 05.05.2013, 14:18
Re: Criar objeto com comando! - by SkullFire - 05.05.2013, 14:41

Forum Jump:


Users browsing this thread: 9 Guest(s)