SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 06/09/2010, 01:13 PM   #1
Ky_Bob
Little Clucker
 
Join Date: Aug 2010
Posts: 6
Reputation: 0
Question truck to trailer

First let me say im a big 52 yr old noob and not looking to put a big fancy server up,just for a few friends and family
and yes ive read the wiki and ******d ok all im trying to do is attach a trailer to a truck, and from what i understand this should work ,however i cant seem to get it to..it compiled with 2 warnings (loose indentions) which i fixed ..can someone tell a old Noob what the heck the problem is..i found this on pastebin looks like what i want..
thanks in advance
Attached Files
File Type: pwn Trailers.pwn (4.7 KB, 15 views)

Last edited by Ky_Bob; 06/09/2010 at 02:18 PM. Reason: mistake in original ?
Ky_Bob is offline  
Old 06/09/2010, 01:26 PM   #2
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 10,095
Reputation: 2655
Default Re: truck to trailer

Use Pastebin or the [ pawn ] tag, please.
Not using them messes up the indentation, which makes the code unreadable.
__________________
Vince is offline  
Old 06/09/2010, 01:32 PM   #3
Mauzen
Banned
 
Join Date: Jun 2007
Location: Western Germany
Posts: 4,899
Reputation: 1597
Default Re: truck to trailer

You are using vehicle MODEL ids, instead of the ingame ids. You have to get the normal id of the players vehicle (GetPlayerVehicleID only), then create the trailer somewhere (CreateVehicle returns the id of the newly created vehicle) and then attach these both ids.
Mauzen is offline  
Old 06/09/2010, 02:35 PM   #4
Ky_Bob
Little Clucker
 
Join Date: Aug 2010
Posts: 6
Reputation: 0
Default Re: truck to trailer

Quote:
Originally Posted by Mauzen View Post
You are using vehicle MODEL ids, instead of the ingame ids. You have to get the normal id of the players vehicle (GetPlayerVehicleID only), then create the trailer somewhere (CreateVehicle returns the id of the newly created vehicle) and then attach these both ids.
Thank you ..that seems to work
but the trailer disappears after about 5 min I changed the respawn in the CreateVehicle time to -1 and it still disappeared..like i said im as green as a gourd

Last edited by Ky_Bob; 06/09/2010 at 03:28 PM. Reason: other problem
Ky_Bob is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
God Damn!, connot attach my trailer to the truck!.. please help! FujiNNN Help Archive 19 29/06/2011 02:15 AM
Tow Truck ScottCFR Help Archive 5 06/06/2011 06:38 AM
How to check if a truck have a trailer ? UsaBoy91 Help Archive 3 30/05/2010 05:53 PM
[FS/MAP]3 Truck(Trailer) Interiors! [NYRP]Mike. Filterscripts 3 03/11/2009 05:44 AM


All times are GMT. The time now is 07:23 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.