30.03.2012, 17:35
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:
It can be done, because I saw it here: [ame]http://www.youtube.com/watch?v=_yItJ5Dr_JU[/ame]
Thanks in advance!
Cheers.
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; }
Thanks in advance!
Cheers.