07.10.2015, 08:56
hmm, train is just a vehicle, there is no trailers, so u should use code like this:
and you will need to adjust cordinates for each trailer behind the train, cuz train is just a vehicle, dont have a trailers and with default cordinates that container should spawn at the middle of the train...
Код:
CMD:SpawnContainers(playerid,params[]) { new vehicleid = GetPlayerVehicleID(playerid); new objectid1 = CreateObject(3572, 0.00000, 4.40000, 0.30000, 0.00000, 0.00000, 90.00000); new objectid2 = CreateObject(3572, 0.00000, -4.00000, 0.30000, 0.00000, 0.00000, 90.00000); AttachObjectToVehicle(objectid1, vehicleid, 0.00000, 4.40000, 0.30000, 0.00000, 0.00000, 90.00000); AttachObjectToVehicle(objectid2, vehicleid, 0.00000, -4.00000, 0.30000, 0.00000, 0.00000, 90.00000); }