Jump to content

Car Locked to a player


donis123

Recommended Posts

Hey! :) i wanna make a script there a player on my server can come to me and tell me that he want a car and tell me what car and color osv and then i can place hes car on one of hes house and set a private lock to him and maby another players who he want and i realy dont find a lock like that :/ can anyone make a format and a meta to me about that?

What i need

Meta format " all stuff inside meta? "

Lua format " how to make it? (can you make it for me?)"

thank you for your time of your life to help me with this! :)

Link to comment
you want a command something like that ?

/createvehicle MODEL KEY?

and to unlock him

/unlockmyveh KEY ?

That could be done, yeah. But why dont you just create a small system that checks the ElementData of the vehicle? Or save it into a SQLite server and retrieve the information.

If you'd ask me I'd make it like this;

- The player receives a car from an admin 
-- The car is being spawned 
-- The car's elementData is being set to his name (the player's name) 
-- Data is being saved into a SQLite database (including VehicleID, VehicleOwner) 

If you done that, you can respawn, repair and keep the progress of the car saved. It will be save and locked up in a database. So, how can you unlock and lock these car's you might ask. Well that's easy;

- create a command; lock 
-- when the player triggers the command, make a loop through all the vehicle's 
--- when the vehicle's elementData (vehicleOwner) equals the name of the player 
---- (un)lock the vehicle 
--- else, do nothing. 

the functions you need for this are;

addCommandHandler 
dbConnect 
executeSQLQuery 
setElementData 
getElementData 
getElementsByType 
setElementPosition 
createVehicle 

Link to comment
you want a command something like that ?

/createvehicle MODEL KEY?

and to unlock him

/unlockmyveh KEY ?

That could be done, yeah. But why dont you just create a small system that checks the ElementData of the vehicle? Or save it into a SQLite server and retrieve the information.

If you'd ask me I'd make it like this;

- The player receives a car from an admin 
-- The car is being spawned 
-- The car's elementData is being set to his name (the player's name) 
-- Data is being saved into a SQLite database (including VehicleID, VehicleOwner) 

If you done that, you can respawn, repair and keep the progress of the car saved. It will be save and locked up in a database. So, how can you unlock and lock these car's you might ask. Well that's easy;

- create a command; lock 
-- when the player triggers the command, make a loop through all the vehicle's 
--- when the vehicle's elementData (vehicleOwner) equals the name of the player 
---- (un)lock the vehicle 
--- else, do nothing. 

yea with sqlite but I think ...donis123 is begginer :D and..

Link to comment
you want a command something like that ?

/createvehicle MODEL KEY?

and to unlock him

/unlockmyveh KEY ?

That could be done, yeah. But why dont you just create a small system that checks the ElementData of the vehicle? Or save it into a SQLite server and retrieve the information.

If you'd ask me I'd make it like this;

- The player receives a car from an admin 
-- The car is being spawned 
-- The car's elementData is being set to his name (the player's name) 
-- Data is being saved into a SQLite database (including VehicleID, VehicleOwner) 

If you done that, you can respawn, repair and keep the progress of the car saved. It will be save and locked up in a database. So, how can you unlock and lock these car's you might ask. Well that's easy;

- create a command; lock 
-- when the player triggers the command, make a loop through all the vehicle's 
--- when the vehicle's elementData (vehicleOwner) equals the name of the player 
---- (un)lock the vehicle 
--- else, do nothing. 

the functions you need for this are;

addCommandHandler 
dbConnect 
executeSQLQuery 
setElementData 
getElementData 
getElementsByType 
setElementPosition 
createVehicle 

yeah ;O im a beginner yes! X)

Link to comment

Well,,, Want to hear a great story about a average programmer?

"It started a while ago, around 9 years ago. The little fella called Mars was being bullied in school for quite some years back then. He didn't had friends in real life, only online friend. There was 1 guy that realy helped him alot. But one day, 9 years back. Mars found out about making a website. He came back from school and started his computer, searched some things out and started to type. Error's, bug's, glitches everything tried to put him down but they failed. Years have passed and the errors made him better, gave him more information and knowledge about different things. This day, Mars is still programming. Ever new language is a new challenge for him, nothing will back him off. Cause he know's, you have to replace your line, to achieve your goal."

Now think again, are you to bad to program with SQLite? :D

Link to comment
@Donis, if you want, I can support you in this script. I'm doing some free scripts (small ones) atm. Just join my server, you'll find it fast enough. :)

pm me info

server ID osv! :)

how many script formats can you make? i just want the formats there i can fill in fks job spawn osv! :)

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...