GetVehicleModelInfo
#2

Код:
new 
    Float: x, Float: y, Float: z,
    Float: a, Float: vX, Float: vY, Float: vZ,
    vehicleid = GetPlayerVehicleID(playerid),

    Float: fDistance = 1.0;

GetVehiclePos(vehicleid, x, y, z);
GetVehicleZAngle(vehicleid, a);
a += 90;

GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_PETROLCAP, vX, vY, vZ);

x += (fDistance * floatsin(a, degrees));
y += (fDistance * floatcos(a, degrees));

SetPlayerCheckpoint(playerid, x + vX, y + vY, z + vZ, 3.0);
CreatePickup(1318, 23, x + vX, y + vY, z + vZ, -1);
Change distance to change how much you want the pickup and checkpoint to be in front of the petrol cap.
Use 0.0 if you want the exact pos, positive numbers (> 0.0) if you want it in front of it, negative if behind (< 0.0)
Reply


Messages In This Thread
GetVehicleModelInfo - by Ph0eniX - 05.08.2016, 15:15
Re: GetVehicleModelInfo - by Stinged - 05.08.2016, 15:59
Re: GetVehicleModelInfo - by Crayder - 05.08.2016, 16:13
Re: GetVehicleModelInfo - by Ph0eniX - 05.08.2016, 16:19
Re: GetVehicleModelInfo - by AbyssMorgan - 05.08.2016, 16:29

Forum Jump:


Users browsing this thread: 1 Guest(s)