Problem with object CAT_SAFE_ROB id 1829
#2

pawn Код:
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));
}
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
GetXYInFrontOfPlayer(playerid, x, y, 2.0);
// CreateObject(1829, x, y, z, ...); // <== Do this yourself.
Hope I helped! Enjoy.
Reply


Messages In This Thread
Problem with object CAT_SAFE_ROB id 1829 - by UserName31 - 09.08.2013, 21:05
Re: Problem with object CAT_SAFE_ROB id 1829 - by BullseyeHawk - 09.08.2013, 21:36
Re: Problem with object CAT_SAFE_ROB id 1829 - by UserName31 - 11.08.2013, 01:21

Forum Jump:


Users browsing this thread: 1 Guest(s)