[FilterScript] Load, Spawn & Save Vehicles
#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:
Код:
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!
Reply


Messages In This Thread
Load, Spawn & Save Vehicles (Noob friendly) New version 1.1! - by woaha - 11.06.2012, 16:48
Re: Load, Spawn & Save Vehicles - by sienal - 13.06.2012, 03:45
Re: Load, Spawn & Save Vehicles - by Unirom Shaw - 13.06.2012, 08:52
Re: Load, Spawn & Save Vehicles - by Smokkr - 13.06.2012, 08:54
Re: Load, Spawn & Save Vehicles - by Baumann - 02.12.2012, 15:00
Re: Load, Spawn & Save Vehicles - by x96664 - 07.12.2012, 17:05
Re: Load, Spawn & Save Vehicles - by bathushan - 20.01.2013, 15:36
Re: Load, Spawn & Save Vehicles - by niels44 - 20.01.2013, 15:41
Re: Load, Spawn & Save Vehicles - by fanta291327 - 20.01.2013, 18:43
Re: Load, Spawn & Save Vehicles - by woaha - 13.07.2013, 19:04

Forum Jump:


Users browsing this thread: 1 Guest(s)