SA-MP Forums Archive
[Include] Server Vehicle Management System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Server Vehicle Management System (/showthread.php?tid=557745)



Server Vehicle Management System - CJay9209 - 14.01.2015

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.
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.



Re: Server Vehicle Management System - Abagail - 14.01.2015

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!


Re: Server Vehicle Management System - CJay9209 - 14.01.2015

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)


Re: Server Vehicle Management System - Rog - 15.01.2015

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


Re: Server Vehicle Management System - CJay9209 - 15.01.2015

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.


Re: Server Vehicle Management System - sagnik - 10.01.2016

Download link is broken