30.08.2013, 01:31
When I go to the location and type loadgoods, everything works except the trailer does not want to attach to the vehicle.
Код:
CMD:loadgoods(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 514) { if(Takinggoods[playerid] == 1) { if(Deliveringgoods[playerid] == 0) { if(IsPlayerInRangeOfPoint(playerid, 3.0, 1078.3209, 1931.6184, 10.8487) == 1) { Takinggoods[playerid] = 0; RemovePlayerMapIcon(playerid, 1); Deliveringgoods[playerid] = 1; SetPlayerMapIcon(playerid, 2, 1788.7258, -2066.9011, 13.4604, 0, 3, MAPICON_GLOBAL_CHECKPOINT); SendClientMessage(playerid, COLOR_WHITE, "Your truck has been loaded, go to the delivery point to deliver the goods"); AttachTrailerToVehicle(450, vehicleid); return 1; } else return SendClientMessage(playerid, COLOR_WHITE, "You are not at the delivery point"); } else return SendClientMessage(playerid, COLOR_WHITE, "Your truck is already loaded with goods"); } else return SendClientMessage(playerid, COLOR_WHITE, "You are not delivering any goods, Use /truckerhelp for more info"); } else return SendClientMessage(playerid, COLOR_WHITE, "You are not in any truck."); }