Train issues
#1

ok hello today I wanted to add a train to ls train station but I dont know how to get the streak train cars to stay with it when I drive train the train cars dont follow what can I do to fix this? or get it working I dont know how to script it
I do not no what to do because you cant attach it with mta then copy it over
Reply
#2

Did you create the train with AddStaticVehicle? Alao, use AttachTraileToVehicle after you've created the wagons.

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

how many trailers could I attach? I need 4
Reply
#4

and how would I combine it was ad vehicle stats
Reply
#5

new Batz,TBatz,BBatz;
public OnGameModeInit()
{
Batz = AddStaticVehicle(Train info);
TBatz = AddStaticVehicle(1st trailer);
BBatz = AddStaticVehicle(2nd one);
}
public OnVehicleStreamIn(vehicleid,forplayerid)
{
if(vehicleid==Batz||vehicleid==BBatz||vehicleid==T Batz) AttachTrailerToVehicle(BBatz,Batz),AttachTrailerTo Vehicle(TBatz,BBatz);
return 1;
}
Reply
#6

where it says train info is that where I put the id?
Reply
#7

how do I add more then 2 trailers do I put tbatz again??
Reply
#8

Use AddStaticVehicle and spawn the train on the railroad. Use /save in-game to get the co-ordinates of the railroad.

Edit: Some threads I found regarding this issue
https://sampforum.blast.hk/showthread.php?tid=169916
https://sampforum.blast.hk/showthread.php?tid=281557
https://sampforum.blast.hk/showthread.php?tid=125054
Reply
#9

Quote:
Originally Posted by Makaveli93
Посмотреть сообщение
Use AddStaticVehicle and spawn the train on the railroad. Use /save in-game to get the co-ordinates of the railroad.

Edit: Some threads I found regarding this issue
https://sampforum.blast.hk/showthread.php?tid=169916
https://sampforum.blast.hk/showthread.php?tid=281557
https://sampforum.blast.hk/showthread.php?tid=125054
thoughts posts dont help at all
Reply
#10

Well it's said in those posts that you need to spawn the train with AddStaticVehicle on the railroad. Why don't you try it?

Edit: Here:
This will spawn your train near Palomino Creek
pawn Код:
AddStaticVehicle(537,2457.2207,-274.1781,18.5465,86.1217,1,74); // train
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)