SA-MP Forums Archive
Trailer doesn't appear - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Trailer doesn't appear (/showthread.php?tid=460813)



Trailer doesn't appear - Lynchos - 30.08.2013

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



Re: Trailer doesn't appear - CyNiC - 30.08.2013

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

https://sampwiki.blast.hk/wiki/CreateVehicle


Re: Trailer doesn't appear - Lynchos - 30.08.2013

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


Re: Trailer doesn't appear - Lynchos - 31.08.2013

BUMP