Truck and 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: Truck and trailers (
/showthread.php?tid=414724)
Truck and trailers -
ivanVU - 10.02.2013
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.
Re: Truck and trailers -
Tom1412 - 10.02.2013
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
Re: Truck and trailers -
Jeffry - 10.02.2013
https://sampwiki.blast.hk/wiki/AttachTrailerToVehicle
Re: Truck and trailers -
MP2 - 10.02.2013
https://sampwiki.blast.hk/wiki/AttachTrailerToVehicle
But do bear in mind, the trailer has to be streamed-in for it to attach.
Re: Truck and trailers -
ivanVU - 10.02.2013
How do you mean streamed-in?
Re: Truck and trailers -
Jeffry - 10.02.2013
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.
Re: Truck and trailers -
ivanVU - 10.02.2013
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..
Re: Truck and trailers -
Jeffry - 10.02.2013
Quote:
Originally Posted by ivanVU
If you understand what am I talking about..
|
No sorry, didn't get what you mean.
Re: Truck and trailers -
MP2 - 10.02.2013
Players can already attach trailers to trucks (roadtrain/linerunner/tanker) by backing up to them; you don't need to script that.
Re: Truck and trailers -
ivanVU - 10.02.2013
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;
}