[Include] Server Vehicle Management System
#1

Server Vehicle Management System


Version: 1
Author: CJay9209

Required Includes:
=====================
Secured Download HERE
=====================

************************************************** **************************************************
The entire system was coded by myself and released under the Mozilla V2 License. Please give credit if you intend to use any of my code in your script! Please report any bugs!
************************************************** **************************************************

Description:

I've been meaning to release this for a long time now and finally got around to finishing the first draft. So ENJOY!

The Server Vehicle Management System allows you to gain full control over vehicles in game! You can add vehicles batch style using the new server initialisation system to add vehicles based on coordinates stored in an external file or simply create them in game yourself via the admin menu.

Don't worry too much about existing vehicles on your server or transient vehicles used for special missions etc as the system will simply ignore vehicles that are not managed by it. In other words you can add as many vehicles via AddStaticVehicle and CreateVehicle as you like and the system will simply ignore them (plans are drawn for future release allowing admins to convert a regular vehicle into a managed vehicle from inside the game).

The system features a full vehicle ownership system allowing users to buy and sell vehicles which gain them extra benefits not usually availlable to server visitors, for example:

All vehicle commands and features accessed via a single menu.
  • control door locks
  • control dashboard information
  • control vehicle security system (lethal and non lethal options availlable)
  • own multiple vehicles (10 is default limit but it can be changed via sourcecode alterations to as many as you like)
  • Once you own a vehicle you can teleport it to your location.
  • Park your owned vehicle anywhere you like and it will always respawn there (via the vehicle menu)
  • Fuel system for RPG style play (in next release you will be able to deactivate this system from within the game). The fuel of the vehicle will go down based on how fast you are travelling. Idling uses almost no fuel whilst racing along a breakneck speeds will use high amounts.
  • Mod saving system. If you modify your owned vehicles in a modshop it will always respawn with those modifications and color options applied.
  • Admins have complete control over system vehicles and can sell a vehicle etc even if they do not own it to reset vehicle stats and data.
  • Admins can set vehicles for admin use only (lethal and non-lethal ejection options)
  • Admins can set a vehicle on the system as unbuyable/buyable
  • Faction system allows server owners to assign players and vehicles to factions so only players of the vehicles faction can use it etc. (currently hardcode only but will be admin configurable from ingame in next release)
  • Admins can set vehicle spawn locations in-game (no server reset required)
  • All vehicle data and vehicle parked positions are maintained through server resets!
This system basically will allow you to gain full control over vehicles on your server and give you access to more tools than you ever thought possible!

Current Funtions:

The user functions listed below allow you to seamlessly integrate this system into your current user login and registration system:

================================================== ==========================================

- SVM_ShowPlayerMenu(playerid) - Shows the SVM Menu for the selected playerid

================================================== ==========================================

- SVM_Login(playerid) - logs the player in to the SVM system
- SVM_Register(playerid) - registers player with the SVM system

================================================== ==========================================

- SVM_MakeAdmin(playerid) - Makes player able to use vehicle moderator commands
- SVM_RemoveAdmin(playerid) - Removes player SVM admin rights
- SVM_IsPlayerAdmin(playerid) - returns 1 if player is vehicle system admin and 0 if not

================================================== ==========================================

- SVM_CreateMapIcon(markermodel,Float,Float:y,Floa t:z,Floatpawn_distance) - Adds a map icon that will be displayed properly alongside the SVM system icons correctly. Returns Icon ID.
- SVM_DestroyMapIcon(iconid) - Destroys specified Map Icon
- SVM_ChangeMapIconModel(iconid,newmodel) - Changes Specified Map Icon Model

================================================== ==========================================

***FACTION SYSTEM:::: any id number from 0+ can be used. Faction -1 is considered to be NO FACTION

- SVM_SetVehicleFaction(vehicleid, factionid) - returns 1 if successfull and 0 if unsuccessfull
- SVM_RemoveVehicleFaction(vehicleid) - returns 1 if successfull and 0 if unsuccessfull
- SVM_GetVehicleFaction(vehicleid) - returns vehicle faction

- SVM_SetPlayerFaction(playerid, factionid) - returns 1 if successfull and 0 if unsuccessfull
- SVM_RemovePlayerFaction(playerid) - returns 1 if successfull and 0 if unsuccessfull
- SVM_GetPlayerFaction(playerid) - returns player faction

================================================== ==========================================

***This system uses a very complex SQLite database system to store vehicle variables and data. If you are using the batch add feature, it could result in server load times of up to 5 minutes or more depending on how many vehicles you are adding in one shot. This is normal and will only happen on the first load of the GM. After the initial setup is finalised the server load should take no longer than normal. See readme for how to use batch add feature.

This system also uses a complex map icon streamer to manage map icons and prevent too many from being displayed at once. If you currently have map icons assigned in your GM then you WILL have to use the commands provided in this kit to ensure that client crashes do not occur due to over usage of system memory. See function list above for new map icon commands. The change is very minimal and not hard to do for any coder. Simply substitute the appropriate commands where necessary.

This toolkit is designed to be used in conjunction with an existing user registration and login system. You will have to insert the appropriate registration and login functions in your code to ensure proper function.
Reply
#2

From what I can see, this looks pretty tight. How-ever: a nice video, or SS would be nice to accompany this large sum of words.

Can you please provide a pastebin link? Thanks!
Reply
#3

lol I'll tidy it up tonight when i get home. SS will come whenever i get to fully testing and perhaps a vid for sure. thanks for the suggestions!

If you need to have a look at the vehicle features used in a GM i will be throwing one together soon here but the RPGD link in my signature has a very similar system installed (all be it a much more integrated RPG solution)
Reply
#4

pretty one clay i like this but plz put some video or ss
Reply
#5

So looking at pastebin its defo gonna be difficult to use as I've broken this INC up into multiple library files according to my own setup. I'll look into combining them or just pasting them all seperately. whatever would work best.
Reply
#6

Download link is broken
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)