[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
#2

nice man i like it good jod
Reply
#3

Usefully for me, tnx
Reply
#4

10/10 Good work dude
Reply
#5

how i use this if cars dont have fuel ?
Reply
#6

This is awesome !
Reply
#7

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

nice work, gonna check this out later on my own pc
Reply
#9

Great job
Reply
#10

Quote:
Originally Posted by bathushan
Посмотреть сообщение
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
Посмотреть сообщение
how i use this if cars dont have fuel ?
You can now man! Forget last time whole fuel system !
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)