SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 11/06/2012, 04:48 PM   #1
woaha
Big Clucker
 
Join Date: Jun 2008
Posts: 121
Reputation: 8
Post Load, Spawn & Save Vehicles (Noob friendly) New version 1.1!

Hello, gonna just share one of my local projects...
This is simple way to Load, Spawn & Save Vehicles.
This is NOT COMPLETE GAMEMODE or filterscript, its just amount of functions to play with.

It's just pure PAWN not MySQL. Very easy to use.

These functions features,
Vehicle system with:
- Saving vehicle mods
- Saving vehicle colors
- Saving vehicle paintjobs
- Saving vehicle plates
- Sell & Buy vehicle
- Saving vehicle parameters like engine status and bonnets...
- Setting owner for all vehicles.

And variables to play with:
- Fuellevel
- Alarm
- Doorlock status

There are 3 levels of owners they are:
playername = set your own name to here
server = bayable vehicles
default = not bayable vehicles

There is also example of usage to check is do you own this vehicle.

You can use following code to check is that vehicle loaded by this script:
Code:
if(DynamicVehicle[vehicleid] == 1)
{
   // VEHICLE IS DYNAMIC CONTINUE
}

OR

if(!DynamicVehicle[vehicleid] return 0;
INSTALL:
Ive included download link for an example gamemode, where functions and things should be placed, it also include all those functions.
You can freely copy all those functions to your own gamemode and modify all those functions as you want.

Ive also included sample file of vehicles.txt, wich contains more than 1900+ vehicles around SA, from my local server for just example of usage. Check it out!
Sample file is in scriptfiles folder. Make sure it will be there also. If you wish, you can always replace those vehicles with your own. You set all your vehicles to that file.

To understand file format, check savevehicles(); function.

You NEED ALSO ******'s foreach script and Incognito's Streamer Plugin to get this work!

BTW:
Ive using RPN(playerid) to detect player name.
If you are using own login system, you need to replace those with your own system.

DOWNLOAD LINK: OLD ONE !
http://www.solidfiles.com/d/4f4053decb/


NEW VERSION: 1.1
It contains now example commands for refuel, lock and unlock vehicles...You still need to be setup park commands by yourself. (You CAN DO that EASILY by making command and call function ParkVehicle(playerid)) And there is now also /fuel command to show how much you have left fuel (in %). yeah you should make it to display in textdraw .
Oh, and yeah forget whole fuel system from package last time. Hopely I havent forget this time anything!
http://www.solidfiles.com/d/cc3767e300/


PS: Yeah, sorry this post dont have any bbcodes, dont know how to use em!

Last edited by woaha; 14/07/2013 at 03:23 PM.
woaha is offline   Reply With Quote
Old 13/06/2012, 03:45 AM   #2
sienal
Big Clucker
 
sienal's Avatar
 
Join Date: Feb 2012
Posts: 75
Reputation: 3
Default Re: Load, Spawn & Save Vehicles

nice man i like it good jod
sienal is offline   Reply With Quote
Old 13/06/2012, 08:52 AM   #3
Unirom Shaw
Huge Clucker
 
Unirom Shaw's Avatar
 
Join Date: May 2012
Location: Solar System
Posts: 209
Reputation: 22
Thumbs up Re: Load, Spawn & Save Vehicles

Usefully for me, tnx
Unirom Shaw is offline   Reply With Quote
Old 13/06/2012, 08:54 AM   #4
Smokkr
Huge Clucker
 
Smokkr's Avatar
 
Join Date: May 2012
Location: Bulgaria
Posts: 313
Reputation: 13
Default Re: Load, Spawn & Save Vehicles

10/10 Good work dude
__________________
Quote:
One day I will open my own gallery for naked people.
Smokkr is offline   Reply With Quote
Old 02/12/2012, 03:00 PM   #5
Baumann
Big Clucker
 
Join Date: Nov 2012
Posts: 80
Reputation: 0
Default Re: Load, Spawn & Save Vehicles

how i use this if cars dont have fuel ?
Baumann is offline   Reply With Quote
Old 07/12/2012, 05:05 PM   #6
x96664
Gangsta
 
x96664's Avatar
 
Join Date: Jun 2009
Posts: 585
Reputation: 7
Default Re: Load, Spawn & Save Vehicles

This is awesome !
x96664 is offline   Reply With Quote
Old 20/01/2013, 03:36 PM   #7
bathushan
Huge Clucker
 
Join Date: May 2012
Location: Germany
Posts: 283
Reputation: -22
Default Re: Load, Spawn & Save Vehicles

CMDS ? It just spawn 165 Car Arround ls/SA.
How to use ? Cmds ?
__________________

You want a Mapper? PM me with your Server ip!
bathushan is offline   Reply With Quote
Old 20/01/2013, 03:41 PM   #8
niels44
High-roller
 
niels44's Avatar
 
Join Date: Jul 2011
Location: Wooden Box
Posts: 1,101
Reputation: 39
Default Re: Load, Spawn & Save Vehicles

nice work, gonna check this out later on my own pc
niels44 is offline   Reply With Quote
Old 20/01/2013, 06:43 PM   #9
fanta291327
Huge Clucker
 
Join Date: Jan 2013
Posts: 276
Reputation: 26
Default Re: Load, Spawn & Save Vehicles

Great job
fanta291327 is offline   Reply With Quote
Old 13/07/2013, 07:04 PM   #10
woaha
Big Clucker
 
Join Date: Jun 2008
Posts: 121
Reputation: 8
Default Re: Load, Spawn & Save Vehicles

Quote:
Originally Posted by bathushan View Post
CMDS ? It just spawn 165 Car Arround ls/SA.
How to use ? Cmds ?
For now, you make your own commands, just call function with parameters.
And it should spawn more than 1900+ vehicles around SA when you call loadvehicles on your ongamemodeinit.

BTW; new version 1.1.

Quote:
Originally Posted by Baumann View Post
how i use this if cars dont have fuel ?
You can now man! Forget last time whole fuel system !

Last edited by woaha; 13/07/2013 at 08:16 PM.
woaha 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
MySQL: Vehicles don't load... Tee Help Archive 0 08/08/2011 09:13 AM
Load Vehicles xpeppe Help Archive 0 20/11/2010 06:21 PM
How to load vehicles from file? Torran Help Archive 2 08/03/2010 09:57 AM
Spawn Vehicles and save to File Memoryz Help Archive 6 24/07/2009 09:25 PM
[HELP] Vehicles Spawn (Save Tuning) charles30 Help Archive 17 13/07/2009 01:59 AM


All times are GMT. The time now is 09:21 AM.


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