SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 14/01/2014, 02:29 PM   #1
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Posts: 1,620
Reputation: 477
Default Dynamic Vehicles - GTA's Spawns

Dynamic Vehicles FS by NaS

What does this FS do?

This FS spawns vehicles just like in SinglePlayer.

There are Vehicle Slots around whole SA with different types of vehicles - rich cars, poor cars or simply a static model for special vehicles (airplanes, NRGs, helis).

Instead of just respawning, the cars will now respawn to a different model of the same group - eg an infernus will respawn to a banshee.

You can dynamically add, remove and edit Slots as you wish during run-time (Look at the Commands).

Which groups are there?

Look into the script, the array "VGroups" contains the groups, I made comments with the name.

Commands (RCON-only):
  • /dv_AddSlot - Park a vehicle where you want the Slot to be and type the CMD, you can then select the type of Slot - pretty self-explaining.
  • /dv_EditSlot - Be near a Slot and you can change its Group, define a static Model or delete it!
  • /dv_SlotInfo - Near a Slot: Show info about the Slot (such as ID, model or group), Elsewhere: Show general info about the system.

How to install?

Open the archive you downloaded below.

Put dyn_vehicles.pwn into your filterscripts folder and open it, then compile it - if you get errors about the sccanf2.inc, view this thread to install it. Make sure it is loaded!

Put the folder dyn_vehicles into your scriptfiles folder.

Open your server.cfg and add dyn_vehicles to filterscripts

Start the server!

Is there anything else I should know?

I also implemented a feature to have some default tuning (like Nos, Hydraulics or random body kits) which are randomly put on spawned vehicles (DISABLED by default).

To enable this, set the define DEFAULT_TUNING to true.

You can adjust the spawn delay and timer tick, look into the script and search for SPAWN_DELAY or VTIMER_TICK. The timer tick should not be higher than the spawn delay.

The original vehicles.txt (Original GTA Coords, gathered by Slice) is in the folder dyn_vehicles too. But there are many bugged slots (wrong Z-Coordinate) and some areas are completely left out.

I made many comments to help anyone understanding this a bit.

Download:

Code (GitHub)

Code + scriptfiles (Zippyshare)

Credits:
Slice - I took his array to have the Singleplayer Slot positions which he took from an IPL, the rest of this script is entirely made by me or taken from GTA's files).
Y_Less - sscanf2 Plugin

Do not re-release this under your name. You can edit this or take out arrays as you like, but don't remove the credits!

If you have any suggestions, found a bug or need a different hoster, please post it here!

Last edited by NaS; 26/07/2016 at 07:54 PM.
NaS is online now   Reply With Quote
Old 14/01/2014, 03:58 PM   #2
AIped
Gangsta
 
AIped's Avatar
 
Join Date: Feb 2011
Location: Netherlands
Posts: 781
Reputation: 46
Default Re: Dynamic Vehicles - GTA's Spawns

Nice work man! keep it up
AIped is offline   Reply With Quote
Old 15/01/2014, 10:00 AM   #3
LMagnifico
Huge Clucker
 
LMagnifico's Avatar
 
Join Date: Dec 2013
Location: Location: Location
Posts: 208
Reputation: 10
Default Re: Dynamic Vehicles - GTA's Spawns

very nice
__________________
rep+ me if you remember what happen to me and your mom last night
LMagnifico is offline   Reply With Quote
Old 15/01/2014, 10:25 AM   #4
KingServerIRAN
Banned
 
Join Date: Aug 2013
Location: SarBNR, IRAN!. Reputation:9999. . Posts2: 160754
Posts: 365
Reputation: 45
Default Re: Dynamic Vehicles - GTA's Spawns

Good Work . Cool Man!
KingServerIRAN is offline   Reply With Quote
Old 15/01/2014, 04:43 PM   #5
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Posts: 1,620
Reputation: 477
Default AW: Dynamic Vehicles - GTA's Spawns

Thank you
NaS is online now   Reply With Quote
Old 15/01/2014, 04:59 PM   #6
kiss
Huge Clucker
 
kiss's Avatar
 
Join Date: Jul 2010
Location: I will miss you guys :( I quitted: 28/05/2013
Posts: 261
Reputation: 6
Default Re: Dynamic Vehicles - GTA's Spawns

Wowa viva! Keep it up!
__________________
pawn Code:
if($weather == "sunny") PlaySunnySong(); // By Kiss :P
kiss is offline   Reply With Quote
Old 26/07/2016, 05:16 AM   #7
Tass007
Gangsta
 
Tass007's Avatar
 
Join Date: May 2011
Location: Somewhere not near you
Posts: 731
Reputation: 31
Default Re: Dynamic Vehicles - GTA's Spawns

New download link?
__________________
Copyright 2016 vR Studios
Currently working with vR Studios
Copying and pasting doesn't allow you to learn the things that reading and understanding will.
Tass007 is offline   Reply With Quote
Old 26/07/2016, 03:36 PM   #8
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Posts: 1,620
Reputation: 477
Default Re: Dynamic Vehicles - GTA's Spawns

Quote:
Originally Posted by Tass007 View Post
New download link?
Updated link in the topic.
NaS is online now   Reply With Quote
Old 11/11/2016, 09:32 PM   #9
marley
Little Clucker
 
Join Date: Mar 2008
Posts: 27
Reputation: 0
Default Re: Dynamic Vehicles - GTA's Spawns

Hey man, I know this is a little old, but I've got a bug with this code, and can't figure out what causes it, at the moment the slots and everything work fine, however whenever a player enters and exits an interior, all the cars for that player, and all other players change color....don't know if this is expected?
marley is offline   Reply With Quote
Old 06/11/2018, 04:23 PM   #10
Mike861
Big Clucker
 
Join Date: Feb 2018
Posts: 197
Reputation: 14
Default Re: Dynamic Vehicles - GTA's Spawns

Do the vehicles i make save?
Mike861 is offline   Reply With Quote
Reply

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
[Tutorial] Dynamic Spawns Lynn Tutorials 10 01/02/2013 10:38 PM
Dynamic Vehicles? Desertsoulz Help Archive 5 19/03/2011 01:10 AM
HELP! Vehicles spawns bad Firew Help Archive 2 11/09/2010 10:32 PM
[HELP]Some vehicles spawns wrong place KeyWay Help Archive 14 13/06/2009 06:24 AM


All times are GMT. The time now is 06:20 PM.


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