Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do u make a Police Database that adds arrests and citations?

Asked by 7 years ago

I'm new to coding and I was wondering if someone could help me out by helping me make a script that would allow "police officers" (Team: Police) to be able to open up a database and look at the person's name that they are dealing with and see if they have had and citation's or arrests, etc to add on to this I would like help with a script that when you arrest people with handcuffs it comes up with a panel where you can enter in how long to put them in jail and the reason you are arresting them then after you have filled in that information the player is kicked from the server for that amount of time (in seconds) and all that info that you added in goes to the database, also a citation book that when you write a citation it goes to the offending player they have to "sign it" and then it goes and is displayed on the database when someone looks up said playes name..

Hope this makes sense contact me if you would like further information either through this or on discord my code is #8877

0
in my opion people will abuse that jail time. But its your game, you would need a screen gui that shows everything to the player. Im guessing you would have to make a system thats counts how many times the player has been arrested. But im not sure just a heads up when you make it, make sure to a max time the players can be in jail because people will ABUSE that power. User#19513 5 — 7y

1 answer

Log in to vote
0
Answered by
caipira 29
7 years ago
Edited 7 years ago

game.Players.PlayerAdded:connect(function(plr) local stats = Instance.new("IntValue", plr) stats.Name = "stats" local arrest = Instance.new("IntValue", stats) arrest.Name = "TimesArrested" local function Arrest(arre) local reason = Instance.new("StringValue", stats) reason.Name = "ReasonArrested" reason.Value = game.Players[plr.Name].PlayerGui.ScreenGui.TextBox.Text arrest.Value = arrest.Value + 1 print(arrest.Value) print(reason.Value) end workspace.arres.Touched:connect(Arrest) end)
0
That is a simple way to do it, only problem is it wont save. So that's a very bad way of doing it. RootEntry 111 — 6y
Ad

Answer this question