Train trailers. - 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 trailers. (
/showthread.php?tid=329892)
Train trailers. -
Cpt.Falcon - 30.03.2012
Hi all,
I'm trying to experiment a bit with the trains offered by SA. But I have run into a problem.
When I spawn, for instance, a freight(cargo train). You would expect that only the locomotive would spawn.
But this is not the case, it automaticly spawns three trailers behind it. When I try to detach them, by making a command with DetachTrailer, they dont detach...
It could be my lacking coding skills I dont know, so here is my detach command:
Код:
if (strcmp("/trains", cmdtext, true, 10) == 0)
{
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
return 1;
}
It can be done, because I saw it here: [ame]http://www.youtube.com/watch?v=_yItJ5Dr_JU[/ame]
Thanks in advance!
Cheers.
Re: Train trailers. -
Vince - 30.03.2012
The way trains are created has changed over time and I'm pretty sure that you can't detach the trailers.