25.02.2013, 04:29
(
Последний раз редактировалось CJay9209; 22.03.2013 в 10:17.
)
[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:
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
--------------------------------------------
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>
================================================== ====================================
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
--------------------------------------------