create object from x+3.0 y+3.0 z+3.0 of the player
#2

pawn Код:
.....

new Float:x, Float:y, Floatz;
GetPlayerPos(playerid, x, y, z);
GetXYInFrontOfPlayer(playerid, x, y, 3.0);
z+= 3.0;


....

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));
}
Reply


Messages In This Thread
create object from x+3.0 y+3.0 z+3.0 of the player - by HitterHitman - 15.01.2014, 12:29
Re: create object from x+3.0 y+3.0 z+3.0 of the player - by Pottus - 15.01.2014, 12:54
Re: create object from x+3.0 y+3.0 z+3.0 of the player - by HitterHitman - 15.01.2014, 12:57

Forum Jump:


Users browsing this thread: 1 Guest(s)