Truck and trailers
#1

Is there any way to spawn trailers attached to truck, so player doesn't have to attach it, becouse I don't know way to do it by the command or something.. Sorry for my bad english.
Reply
#2

When the truck spawns it has its own co-orderants, u just have to add so much co-ordderants then it will spawn just behind the truck and auto attach
Reply
#3

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

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

But do bear in mind, the trailer has to be streamed-in for it to attach.
Reply
#5

How do you mean streamed-in?
Reply
#6

Quote:
Originally Posted by ivanVU
Посмотреть сообщение
How do you mean streamed-in?
Loaded for the client/user.
If you use AttachTrailerToVehicle before the Trailer or Truck is loaded for the player, it will not attach it for the player, but maybe for some other player who has them streamed in (=loaded) already.
Reply
#7

Can I make check if player first get's in the truck and reverse it to the trailer? Like on some trucking servers?
So player have to attach trailer to truck by himself.. If you understand what am I talking about..
Reply
#8

Quote:
Originally Posted by ivanVU
Посмотреть сообщение
If you understand what am I talking about..
No sorry, didn't get what you mean.
Reply
#9

Players can already attach trailers to trucks (roadtrain/linerunner/tanker) by backing up to them; you don't need to script that.
Reply
#10

Yes I know that but how can I check if trailer is attached like that?

Код:
CMD:work(playerid,params[])
{
if(IsPlayerInTruck(playerid)) return SCM(playerid, -1, "You are not in truck!");
if(I need this check) return SCM(playerid, -1, "You didn't attached trailer!");
SetPlayerCheckpoint......
etc...
etc...
return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)