SA-MP Forums Archive
Train Spawning Question - 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: Train Spawning Question (/showthread.php?tid=405627)



Delete Please - coolmark1995 - 07.01.2013

Hi I was wondering how I could spawn a passenger train for my server with the train cars attached would it be just AddStaticVehicle ? and trailers auto spawn?


Re: Train Spawning Question - Frede - 07.01.2013

im not sure, i guess this is it:
Код:
CMD:train(playerid,params[])
{
	new Float:X;
	new Float:Y;
	new Float:Z;
	new A;
	GetPlayerPos(playerid, X, Y, Z);
	A = AddStaticVehicle(538, X, Y, Z, 40.19, -1, -1);
	PutPlayerInVehicle( playerid, A, 0);
	SendClientMessage(playerid, 0xFFFFFF, "Train spawned");
	return 1;
}