[FilterScript] Caravan Script
#1

Hello All,

I made this simple caravan script. It has two versions:
1. A roleplay version, which allows you to buy a caravan at a caravan dealer.
2. A more simple version for freeroam and fun servers. This version allows you to attach a caravan direct to you car.

The Freeroam Version:

Commands:
/attach --> Attaches a big caravan to the vehicle you're driving. (It connects to any vehicle, this will be fixed soon)

How to Install?
1. Download caravan2.pwn (See the attachment)
2. Place caravan2.pwn in the filterscripts folder, compile it.
3. Add caravan2 to you server.cfg file.

Pictures:

Day

Night.

The RolePlay Version:

Commands:
/buy --> You can use this command at the dealership to buy a small or big caravan.
/attach --> Attaches your caravan to the car. (It connects to any vehilce, this will be fixed soon)
/detach --> Detaches the caravan from your car and saves the position of it. (Has some little position bugs)
/sellcaravan --> You can use this command to sell your caravan.

How to Install?
1. Download the YSI include, because you need Y_INI. Place it at pawno/includes
2. Download caravan3.pwn and place it in your filterscript folder. (See the attachment)
3. Edit the edit section in the caravan3.pwn (default dealership is in las venturas near the airport) and compile the caravan3.pwn.
4. Create a folder named "Caravans" (without the " ") in the scriptfiles folder.
5. Add caravan3 to your server.cfg

Pictures:

A picture of the default dealership with the caravan attached to a car.

Updates:
Update 3.1:
-Fixed bug problem with dialogs.
-Fixed bug with not spawning of the caravan.
-Fixed the credits in the sampserver.exe.
-Added picture to the forum page with default dealership location.

Update 3.2:
-Fixed Major Bug with caravans attaching to motorbikes, boats, airvehicles. The caravans will now only attach to cars.

----------------------------------------------------------------------------------------------------
If you have tips or suggestions, place them in this topic or PM me. And ofcourse, if you like it, rep me

PS: Don't remove the credits, if you want to edit it, ask me via PM and I'll will edit it for you.
Reply
#2

lol nice idea
Reply
#3

Quote:
Originally Posted by Nenad
Посмотреть сообщение
lol nice idea
Thanks, there could be a bug with the dealership if you change the coords in the edit part of the script. The caravan will probably not spawn or spawn incorrect. If so, please report it to me and I'll fix it.
Reply
#4

Suggestions:

1. Maybe use the "GetPlayerVehicleModel" to see what vehicle the player are in.
2. Make the caravan enterable or something? :P
3. A /detach command, where you are using "GetPlayerVehiclePos" and place the object a little behind the car.

Otherwise, really nice idea and work.
Reply
#5

Quote:
Originally Posted by cruteX_modshop
Посмотреть сообщение
Suggestions:

1. Maybe use the "GetPlayerVehicleModel" to see what vehicle the player are in.
2. Make the caravan enterable or something? :P
3. A /detach command, where you are using "GetPlayerVehiclePos" and place the object a little behind the car.

Otherwise, really nice idea and work.
Thanks

1.Will definitely be in the next version.
2. I maybe add this in the next version, but I am still not sure how to make an interior for each caravan.
3. The detach command is already using GetPlayerVehiclePos, but it's kind of buggy with the coords, but I try to fix that soon.

EDIT: First post updated, redownload the caravan3.pwn
Reply
#6

Update 3.2:
-Fixed Major Bug with caravans attaching to motorbikes, boats, airvehicles. The caravans will now only attach to cars.
Reply
#7

very nice
Reply
#8

i need ysi but i haven't got that
Reply
#9

Awsome idea
Reply
#10

LOL, I made a script just like this a few months ago, and you can enter/exit the trailer
Reply
#11

havent tested it but will be nice to post a video
becouse if you attached it just like a object if you turn the vehicle then the caravan will turn two and will not look as realistic!
so my rating will be 8/10 still good keep it up
Reply
#12

Nice its usable but it's not realistic because just look at the caravan :P.
Anyways good work .
Reply
#13

Lol It Was Awsom
10/10 +REP
Reply
#14

Quote:
Originally Posted by [PC]henkie[NL]
Посмотреть сообщение
Thanks

1.Will definitely be in the next version.
2. I maybe add this in the next version, but I am still not sure how to make an interior for each caravan.
3. The detach command is already using GetPlayerVehiclePos, but it's kind of buggy with the coords, but I try to fix that soon.

EDIT: First post updated, redownload the caravan3.pwn
Oh you dont really have to make an interior for Each caravan, you only make 1, and then when a person uses /entercaravan(or w/e ur command will be) and then u SetPlayerVirtualWorld(playerid, vehicle), in other words, just use the vehicleid of the vehicle that is attached to the caravan, that way you always have the coцrdinates for the player to get back out of the caravan by simply using GetVehiclePos(GetPlayerVirtualWorld(playerid), X, Y, Z), this way you never got the same virtual world for a caravan.

Or instead of the vehicleid, just use the object ID of the caravan. and then get the cords of the object instead of the vehicle.
Reply
#15

Nice idea! but now 5/10
Reply
#16

Very cool! But would be good if the carvan !"moving"/turns when u turn the car and rotaiting wheels 9/10

But very hard to fix I think but very cool like said before.
Reply
#17

I dont understand.. when i put /buy than i got menu there is Small Caravan and Big Caravan and when i put Choose nothing happend it didnt buy or there isnt any caravan.. ja tried to but /attach it dostn to nothing. When i put /sellcaravan it says that i dont have caravan.
When loading server and copieling than there is no errors or nothing.. everything is ok.
What can be the problem? I want to add that to my truck rollplay server
Reply
#18

Quote:
Originally Posted by notime
Посмотреть сообщение
Oh you dont really have to make an interior for Each caravan, you only make 1, and then when a person uses /entercaravan(or w/e ur command will be) and then u SetPlayerVirtualWorld(playerid, vehicle), in other words, just use the vehicleid of the vehicle that is attached to the caravan, that way you always have the coцrdinates for the player to get back out of the caravan by simply using GetVehiclePos(GetPlayerVirtualWorld(playerid), X, Y, Z), this way you never got the same virtual world for a caravan.

Or instead of the vehicleid, just use the object ID of the caravan. and then get the cords of the object instead of the vehicle.
Thanks, I will try that. Forgot this project, hиhи.

Quote:
Originally Posted by (ETR)Geto244
Посмотреть сообщение
I dont understand.. when i put /buy than i got menu there is Small Caravan and Big Caravan and when i put Choose nothing happend it didnt buy or there isnt any caravan.. ja tried to but /attach it dostn to nothing. When i put /sellcaravan it says that i dont have caravan.
When loading server and copieling than there is no errors or nothing.. everything is ok.
What can be the problem? I want to add that to my truck rollplay server
Do hou have the right folder in your scriptfiles? If not, add it.
Reply
#19

Nice script man. thanks
Reply
#20

When you turn, does it actually look like you're pulling a trailer?
If so; That's pretty sweet I must say.
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)