Trailer doesn't appear
#1

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.");
}
Reply
#2

Is need to create the trailer before attach(as a normal vehicle).

https://sampwiki.blast.hk/wiki/CreateVehicle
Reply
#3

They are implented in the gamemode. But still, it doesn't work.
Reply
#4

BUMP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)