WhoAmI Posted March 31, 2014 Share Posted March 31, 2014 (edited) Hello. Today i'm releasing a resource which I made today called 'Private cars'. It's private cars system which saves car to player's account. Features: - saving last position, color and upgrades before script is restarted - save to SQL/MySQL - fully configurable - creation panel if you hit 'Z' key or type /privatecars Thre are some exported functions: createPrivateVehicle ( int model, int x, int y, int z, int rotX, int rotY, int rotZ, table color, table upgrades, string accName ) table color should looks like { r, g, b, r1, g1, b1, r2, g2, b2, r3, g3, b3, r4, g4, b4 } Returns vehicle element if succesfully, false otherwise. isCarPrivate ( element vehicle ) Returns true if car is private, false otherwise. getPrivateCarOwner ( element vehicle ) Returns owner's account name, false otherwise. All functions are serverside. There are some built-in commands: /carinfo There are some screenshots: http://imgur.com/sMiYSLj,UpFjofz,mu5wL58 Configuration file --[[ PRIVATE CARS by WhoAmI (aka Jacob) You are able to modify the script, if you don't change author. #config.lua ]]-- --[[ change if you wish availible values: - MySQL - SQL ]]-- connectionType = "SQL"; -- ONLY if you chose MySQL MySQLdbhost = "localhost"; -- host MySQLdbname = "test"; -- database name MySQLdbuser = "root"; -- database user MySQLdbpassword = ""; -- user's password -- end -- ONLY if you chose SQL SQLfilename = "example.db"; -- choose name for databse file --[[ WARNING! without ".db" at the and it won't work. REMEMBER! you have to add following line to meta.xml: <file src="YOUR_NAME.db" /> AND create this file! otherwise, SQL won't work. REMEMBER! end ]]-- -- ACL groups allowed to create private car aclGroups = { "Admin", "Moderator", }; -- end -- ACL groups allowed to see car info aclGroupsInfo = { "Everyone", }; -- end -- command name for car's information carInfoCommandName = "carinfo"; -- end -- time after the vehicle will be fixed after explosion IN SECONDS respawnTime = 10; -- end Download https://community.multitheftauto.com/index.php?p= ... s&id=11268 I didn't test everything propperly, so there may be some bugs, but report it to me. Have fun! Edited April 2, 2015 by Guest Link to comment
spoty Posted April 1, 2014 Share Posted April 1, 2014 nice thanks so thats why you woulnd help me at my private cars script but looks nice gonna test it Link to comment
justn Posted April 2, 2014 Share Posted April 2, 2014 Nice Job Man ! Very useful to some players. Link to comment
Dzsozi (h03) Posted December 12, 2014 Share Posted December 12, 2014 Very nice script man, good job! But I have a question. Is this possible to remove/destroy private cars? So, for example if you want money you can go to the junkyard and destroy it. Then it will remove the table from SQL and destroys the car. So, a new export function to destroy cars. Or admins can delete cars by vehicle IDs (I mean the element data, because I can see that there is a "private" ID for each cars). It would be nice! EDIT: I'm edited your code, now it can store the secondary color of the car, and added some features, like if you exit the vehicle then the engine will turn off and if the lights are on then they will turn off as well, and if you enter the vehicle then the engine will turn on, and the lights based on time. So if it's night then they will turn on. Added information for admins if the arguments are wrong of /create command. I want to add one more feature, that the script stores the vehicle's health. Hope that it's not a problem. Rated 5/5 Link to comment
WhoAmI Posted April 1, 2015 Author Share Posted April 1, 2015 Just refreshing this old script up. Link to comment
WhoAmI Posted April 1, 2015 Author Share Posted April 1, 2015 Will be in near future - I guess. Link to comment
WhoAmI Posted April 2, 2015 Author Share Posted April 2, 2015 Updated. https://community.multitheftauto.com/index.php?p= ... s&id=11268 Configuration file --[[ PRIVATE CARS by WhoAmI (aka Jacob) You are able to modify the script, if you don't change author. #config.lua ]]-- --[[ change if you wish availible values: - MySQL - SQL ]]-- connectionType = "SQL"; -- ONLY if you chose MySQL MySQLdbhost = "localhost"; -- host MySQLdbname = "test"; -- database name MySQLdbuser = "root"; -- database user MySQLdbpassword = ""; -- user's password -- end -- ONLY if you chose SQL SQLfilename = "example.db"; -- choose name for databse file --[[ WARNING! without ".db" at the and it won't work. REMEMBER! you have to add following line to meta.xml: <file src="YOUR_NAME.db" /> AND create this file! otherwise, SQL won't work. REMEMBER! end ]]-- -- ACL groups allowed to create private car aclGroups = { "Admin", "Moderator", }; -- end -- ACL groups allowed to see car info aclGroupsInfo = { "Everyone", }; -- end -- command name for car's information carInfoCommandName = "carinfo"; -- end -- time after the vehicle will be fixed after explosion IN SECONDS respawnTime = 10; -- end Whole script have been re-written. I tried using as much OOP as I can. Please report bugs. Have fun. Link to comment
mike1234 Posted March 15, 2016 Share Posted March 15, 2016 Hello.Today i'm releasing a resource which I made today called 'Van Rental New Zealand'. It's private cars system which saves car to player's account. Features: - saving last position, color and upgrades before script is restarted - save to SQL/MySQL - fully configurable - creation panel if you hit 'Z' key or type /privatecars Thre are some exported functions: createPrivateVehicle ( int model, int x, int y, int z, int rotX, int rotY, int rotZ, table color, table upgrades, string accName ) table color should looks like { r, g, b, r1, g1, b1, r2, g2, b2, r3, g3, b3, r4, g4, b4 } Returns vehicle element if succesfully, false otherwise. isCarPrivate ( element vehicle ) Returns true if car is private, false otherwise. getPrivateCarOwner ( element vehicle ) Returns owner's account name, false otherwise. All functions are serverside. There are some built-in commands: /carinfo There are some screenshots: http://imgur.com/sMiYSLj,UpFjofz,mu5wL58 Configuration file --[[ PRIVATE CARS by WhoAmI (aka Jacob) You are able to modify the script, if you don't change author. #config.lua ]]-- --[[ change if you wish availible values: - MySQL - SQL ]]-- connectionType = "SQL"; -- ONLY if you chose MySQL MySQLdbhost = "localhost"; -- host MySQLdbname = "test"; -- database name MySQLdbuser = "root"; -- database user MySQLdbpassword = ""; -- user's password -- end -- ONLY if you chose SQL SQLfilename = "example.db"; -- choose name for databse file --[[ WARNING! without ".db" at the and it won't work. REMEMBER! you have to add following line to meta.xml: <file src="YOUR_NAME.db" /> AND create this file! otherwise, SQL won't work. REMEMBER! end ]]-- -- ACL groups allowed to create private car aclGroups = { "Admin", "Moderator", }; -- end -- ACL groups allowed to see car info aclGroupsInfo = { "Everyone", }; -- end -- command name for car's information carInfoCommandName = "carinfo"; -- end -- time after the vehicle will be fixed after explosion IN SECONDS respawnTime = 10; -- end Download https://community.multitheftauto.com/index.php?p= ... s&id=11268 I didn't test everything propperly, so there may be some bugs, but report it to me. Have fun! Thanks for this script and you done a great job. Link to comment
DreaM40BG Posted February 2, 2020 Share Posted February 2, 2020 Okay, I have a few questions: - How to remove vehicle? - How to "respawn" vehicle on a specific place if it is in the water? - How to add a team vehicle? - How to freeze it, but players in acl mechanic can get it with towtruck? - Is there any admin panel to modify, edit or remove vehicles? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now