[Include] DIVM - Dynamic Integrated Vehicle Management (XVM style)
#1

[include] tAxI's DIVM

Hey Guys, so I've been working on this one for a wee bit now. This is essentially a full vehicle management system for use in ANY GAMEMODE. It's based on my XVM system but now has easy integration and will fully manage and keep track of all vehicle id's registered on the system in addition to a whole bag of new things. This system will be replacing my current XVM all round when i can get round to integrating it into my freeroam mode. This is still in kinda early stages but it seems to work ok as of yet. Please report any and all problems you notice so I can fix em fast! so here it is... to use it simply add the line below to the top of your code with the rest and make sure you have the inc file in your includes folder for pawno:

pawn Код:
#include <divm>
The include makes use of sscanf2 - it can be downloaded from the link provided. I am in no way responsible for the code in those includes and claim no credit!

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

UPDATED: v3.6.0 released

- Some misc code rewrites for efficiency.
- OVERHAULED THE OWNERSHIP SYSTEM - YOU CAN NOW OWN ANY (YES ANY) NUMBER OF VEHICLES U LIKE

Max owned vehicles limit is set by DIVM_OWNED_LIMIT feel free to change it to whatever you like. default is set to 5 vehicles.

CALLCAR function in the menu now opens a list that will dynamically generate a list of vehicles that you own for you to select which one you would like transported to you. Pretty slick.

As always please inform me of any errors people manage to come accross!

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

Release Name: tAxI's Dynamic Integrated Vehicle Management
File Version: 3.6.0
File Date: March 22, 2013


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

SETUP:

*** As of V2.0.0a the batch file is no longer required to setup your GM - all vehicles can be added from within the game.

1 - In order to use the initial batch add system, in the scriptfiles folder you must place a file named DIVM_vehicles_setup.txt (demo included in the download package)
2 - The vehicles setup file should contain the co-ords/info of your vehicles to be batch added into the system in the following format:

model,x,y,z,z_angle,color1,color2 (each set of co-ords/info for each vehicle must start on a new line)

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

FEATURES:

- CAN NOW OWN AS MANY VEHICLES AS YOU LIKE!!!!!!!!
- Menu based Administration and Player Vehicle Management
- Full ownership and administrator control for your vehicles
- Dynamic or Batch vehicle add system - add or remove system vehicles while your server is running
- Can detect if a vehicle on your server is included in the DIVM system i.e. you can add vehicles via addstatic or createvehicle in your GM with no effect on thie DIVM system.
- Fuel system with icons and pickups automatically generated
- Map Icon streamer system built in with easy integration options
- Vehicle security, both lethal and ejection
- Call your owner vehicle to you ANYWHERE!
- Park your owned vehicle ANYWHERE YOU LIKE!
- Vehicle Mod Saving!!! When you Mod your vehicle it will respawn with all of the mods you bought!
- EASY TO INTEGRATE WITH SYSTEM REGISTRATION AND LOGIN COMMANDS THAT WORK WITH YOUR EXISTING LOGIN SYSTEM
- Faction system for RP system integration

USER FUNCTIONS:

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

- DIVM_ShowPlayerMenu(playerid) - Shows the DIVM Menu for the selected playerid

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

- DIVM_Login(playerid) - logs the player in to the DIVM system
- DIVM_Register(playerid) - registers player with the DIVM system

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

- DIVM_MakeAdmin(playerid) - Makes player able to use vehicle moderator commands
- DIVM_RemoveAdmin(playerid) - Removes player DIVM admin rights
- DIVM_IsPlayerAdmin(playerid) - returns 1 if player is vehicle system admin and 0 if not

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

- DIVM_CreateMapIcon(markermodel,Float,Float:y,Flo at:z,Floatpawn_distance) - Adds a map icon that will be displayed properly alongside the DIVM system icons. YOU MUST USE THIS COMMAND WHEN ADDING MAP ICONS IN YOUR SERVER TO AVOID MAJOR ISSUES!!!!

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

- DIVM_DeactivateVehicle(vehicleid) - put vehicleid into storage mode - vehicle will still be saved and active on the system memory but is unspawned untill activated again. RETURNS STORAGEID.
- DIVM_ActivateVehicle(storgeid) - restores a deactivated vehicle to active spawn list. RETURNS VEHICLEID

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

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

- DIVM_SetVehicleFaction(vehicleid, factionid) - returns 1 if successfull and 0 if unsuccessfull
- DIVM_RemoveVehicleFaction(vehicleid) - returns 1 if successfull and 0 if unsuccessfull
- DIVM_GetVehicleFaction(vehicleid) - returns vehicle faction
- DIVM_SetPlayerFaction(playerid, factionid) - returns 1 if successfull and 0 if unsuccessfull
- DIVM_RemovePlayerFaction(playerid) - returns 1 if successfull and 0 if unsuccessfull
- DIVM_GetPlayerFaction(playerid) - returns player faction

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

as i said there should be nothing that interferes with your GM as it stands...

I always look for feedback so suggestions and comments are appreciated - most of the time lol!!!

I have included a demo GM with the following commands just to give you an idea of how you should go about integrating this. For a list of GM commands you can make use of please simply use the command, /help

Thanks to all so far who have helped test this as it's been kinda invaluable (mostly lookin lol)

--------------------------------------------
DOWNLOAD HERE
--------------------------------------------
Reply
#2

1st to comment and this is sooooooooooooooo sweeeeeeeeeeeeeeet really awsome work gonna test
Reply
#3

gah - uploaded old version - redownload - all errors fixed.
Reply
#4

Sweet ive been waiting for a long time for you to return Taxi =D its been awhile
Reply
#5

OK looking for ideas - tell me what you think i should add. V3 currently has a vehicle faction system in the works for team based RP servers i.e. players will only be able to use certain vehicles if they are members of that vehicles faction. Also working on implementing a parking system to allow users to specify parking zones or faction only parking zones. What other tools would users like to see for server management in game? Ask for anything u like and I'll see what I can do!!!

@lookin - I'm surprised ppl remember lol. It's been almost 7 years haha.
Reply
#6

no probs bud, understand completely - removed from the download
Reply
#7

Quote:
Originally Posted by CJay9209
Посмотреть сообщение
OK looking for ideas - tell me what you think i should add. V3 currently has a vehicle faction system in the works for team based RP servers i.e. players will only be able to use certain vehicles if they are members of that vehicles faction. Also working on implementing a parking system to allow users to specify parking zones or faction only parking zones. What other tools would users like to see for server management in game? Ask for anything u like and I'll see what I can do!!!

@lookin - I'm surprised ppl remember lol. It's been almost 7 years haha.
Maybe Making a short tut on how to put it in i can just imagine 100+ posts in a row asking for it from you xD

anyways just got it working and seem's fine so far defiantly looking forward to seeing more of your work

What's the chances of the V_limit going up? (safely)

Have an admin cmd where all cars get reset to their spawn positions?

And as for your work ive been following it for about 7 years xD i still have some of ur old original scripts sitting around xD
Reply
#8

Lol do you happen to have my capture the shark gm? I lost that years ago and was wanting to find a copy but can't find any downloads

In answer to your questions I'll design a system reset command if that's what ur thinking? I'll probs just make it a stock function so you can code it yourself into commands etc.

Also the v_limit is actually a throwback to the original xvm system years ago. I left it there because I haven't had time to check the current vehicle number limits. You can safely increase it to the limit that samp has built in but if I remember correctly the server would crash with too many vehicles or vehicle models.
Reply
#9

Quote:
Originally Posted by CJay9209
Посмотреть сообщение
Lol do you happen to have my capture the shark gm? I lost that years ago and was wanting to find a copy but can't find any downloads

In answer to your questions I'll design a system reset command if that's what ur thinking? I'll probs just make it a stock function so you can code it yourself into commands etc.

Also the v_limit is actually a throwback to the original xvm system years ago. I left it there because I haven't had time to check the current vehicle number limits. You can safely increase it to the limit that samp has built in but if I remember correctly the server would crash with too many vehicles or vehicle models.
i do, but its on my usb, and not really sure where i put it....

in a way yes

the sa-mp limit is 2000 i tryed uping the V_Limit on the older filterscript/GM versions but it freaked out at me.
Reply
#10

yeah it would - theres a few things where the variables that were indexed using it would go out of bounds and it will refuse to compile - I'll up it in the next update for ya
Reply
#11

Images / video, hard to understand what this is.
Reply
#12

Quote:
Originally Posted by Hanger
Посмотреть сообщение
Images / video, hard to understand what this is.
Uhm, there is enough information to know what this do and how it works...

On-Topic: Nice done and welcome back!
Reply
#13

images/video - can't really do anything about that as this is an INCLUDE and is part of any gamemode you choose to use it in.

hard to understand - not really, it's pretty self explanitory lol. just read the features section and you know what it does and how it should be integrated - it's dynamic and you need to use the provided stock functions listed in the features to integrate it with your GM

ALSO: I'll update pretty soon here to the latest version which will include vehicle disabling to allow you to temporarilly disable a vehicle but still have it saved (vehicle will become active by default on server reset). these commands allow you to reset any given vehicle independently or within a loop.

also adding function to allow users to check if a person is a vehicle system admin (limited used but may be useful for those of you who are getting into the core system and tweaking...)
Reply
#14

Quote:
Originally Posted by CJay9209
Посмотреть сообщение
yeah it would - theres a few things where the variables that were indexed using it would go out of bounds and it will refuse to compile - I'll up it in the next update for ya
YUS! thanks bro =D

Quote:
Originally Posted by BlackBank3
Посмотреть сообщение
Uhm, there is enough information to know what this do and how it works...

On-Topic: Nice done and welcome back!
He clearly stats it's based from XVM, so go look it up.
Reply
#15

UPDATED!!!

added 2 new commands:

- DIVM_DeactivateVehicle(vehicleid) - This will unspawn a vehicle without removing it from the game - vehicle will remain in storage untill it is reactivated or the server resets. The function returns the storage slot id so you can use the next command safely.

- DIVM_ActivateVehicle(storageid) - This command will return the stored vehicle from the specified slot to the active spawn list. This process will return the vehicleid of the created vehicle in case you need to use it.

IN ADDITION: i have updated the vehicle limit to 2000 and made a few small efficiency changes and fixed a couple of unnoticed blips in the system - nothing big enough to make note of, mostly just code tidying. I also changed the code to DIVM base instead of XVM as it's not really the same system at all lol.

ALSO: just to mess with ya I've simplified down the scriptfiles directory and structure as the folders were just too bulky and starting to piss me off lol. all files are now stored as standard under the scriptfiles root directory and are .txt extension for easy viewing although you should NEVER EVER EVER modify them manually - it'd just be a mess :S
Reply
#16

SAWEET!
im loving it

and as for messing with me and changing the batch file .......all i can say is "I GOTS SOME SCRIPTING TO DO!" xD
Reply
#17

UPDATED: Faction system update - now version 3.0.1a

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

- DIVM_SetVehicleFaction(vehicleid, factionid) - returns 1 if successfull and 0 if unsuccessfull
- DIVM_RemoveVehicleFaction(vehicleid) - returns 1 if successfull and 0 if unsuccessfull
- DIVM_GetVehicleFaction(vehicleid) - returns vehicle faction
- DIVM_SetPlayerFaction(playerid, factionid) - returns 1 if successfull and 0 if unsuccessfull
- DIVM_RemovePlayerFaction(playerid) - returns 1 if successfull and 0 if unsuccessfull
- DIVM_GetPlayerFaction(playerid) - returns player faction
================================================== ====================================

When you set a vehicle's faction it will become unbuyable and will only allow access to members of that faction. once you have set a player faction or vehicle faction it will be saved until you remove the faction.

NB: Player must be logged in to set the faction. Vehicles must be DIVM specific vehicles to have faction assigned.
Reply
#18

UPDATED: v3.1

basically removed all menu systems and predefined commands. now only gives you functions to design your own menu's and command structure!

POST UP ERRORS!
Reply
#19

for some reason the login n register aspect spazed out but unsure if its this include or me its most likely me ill keep you informed
Reply
#20

can you please have an example script or a tutorial on where things go?

Im a decent scripter but this is slightly out of my reach.

Thanks in advance

THENZSTONER
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)