09.12.2013, 01:43
You are attaching the object to vehicle id 530
Check this
and this
Try like this
Check this
pawn Код:
AttachObjectToVehicle(CrateBox, 530, 0.000000, 0.999999, 0.529999, 0.000000, 0.000000, 0.000000);
pawn Код:
AttachObjectToVehicle(objectid, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ);
Try like this
pawn Код:
CMD:getcrate(playerid, params[])
{
if (IsPlayerInRangeOfPoint(playerid, 10.0, 2353.8000500, -2026.0999800, 15.3000000)) // Matrun 3
{
new vehicle = GetPlayerVehicleID(playerid);
if(IsAForklift(vehicle))
{
CrateBox = CreateObject(1685, 10.0, 10.0, 10.0, 0, 0, 0);
AttachObjectToVehicle(CrateBox, vehicle, 0.000000, 0.999999, 0.529999, 0.000000, 0.000000, 0.000000); //Object Model: 1685 | obj
}
else SendClientMessage(playerid, COLOR_YELLOW, "You are not inside of a Forklift or near the Get Crate point");
}
return 1;
}