1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Re-creating the DarkRP arresting/criminal/justice system

Discussion in 'DarkRP Features and Code Design' started by NoOriginality, Oct 20, 2016.


Should this system be part of the default DarkRP?

  1. Yes

  2. No

  1. NoOriginality

    NoOriginality Member

    So basically I am recreating the same system in Altis Life Arma 3 for DarkRP

    I have created a program that keeps track of crime that people commit in Dark RP.

    Murder, mugging, carjacking, robbing, Vehicle Manslaughter, Contraband, Ilegal weapons, Terrorism, Burgalry.

    Those are the only ones I have right now.

    So the cops, if they catch the criminal, will be able to restrain and escort players to their HQ and then they will have the choice of

    Ticketing them
    Escorting/Stop Escorting
    View crimes
    Seize Illegal Items
    Send them to jail

    I would like to see this in the core of dark rp because I think it would cut down on RDA 100%. Not saying we should get rid of the arrest baton but I think this system is pretty good.

    I have most of the code done, just finishing the GUI for it and some of the math.

    I was hoping to get some help with it also, I wanted to make it look nice and have the restraining like they do in Arma 3 but I don't really have a clue on how to rig models. I heard of some animation API floating around here but I never really worked with API's in general.

    Anyways, just posting this here to see if Falco would be interested in putting this into the DarkRP gamemode.
    I think it would make a pretty good addition and maybe cut down on the cancer in DarkRP and actually get some roleplay going.
  2. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    Cut down on random arrest? Last time I heard random arrest was a problem was before people started advertising literally everything.

    I'm interested, but not for cutting down on random arrest. This would make cops way more useful than they are right now. It might convince people to have cops deal with people breaking RP laws rather than admins.
  3. NoOriginality

    NoOriginality Member

    Well, I don't really care about RDA also, I just thought that would be an attention getter.
    But glad to hear that you're interested!

    I'll try and finish the code by the end of the month, no promises but I can only hope.
  4. Nagisa Momoe

    Nagisa Momoe Member

    +1 damn this is good, btw the tracking of the player can be viewed by?
    --- Double Post Merged, Oct 20, 2016 ---
    Oh and can you add an option to set the jail time? Cuz I don't want different kind of crime getting the same jail time
  5. NoOriginality

    NoOriginality Member

    Here is the current config, it is still not done though.

    Need to set the jail times, the ticket amounts (murder = 1000$, mugging = 500$, etc) and some other shit.

  6. Nagisa Momoe

    Nagisa Momoe Member

    Very nice, hope this will be part of DarkRP soon
    Btw about the record of crimes, how does it work?
  7. NoOriginality

    NoOriginality Member

    I have hooks for every crime, it then gets saved into the player table as well as a txt file.

    The txt file then gets modified whenever the charges table in the player table get modified.

    After a week the txt file gets delete if it is not modified before then (by deafult but changable)

    Some other stuff, you can see it when I release the code.
  8. Nagisa Momoe

    Nagisa Momoe Member

    Oh nice, love it, about the jail time, different crime will get different jail time?
  9. NoOriginality

    NoOriginality Member

    Yes, dude just wait until I release it.
  10. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    Also, the fact that I'm interested is no guarantee for a merge with DarkRP. I'll definitely consider it, though.
  11. NoOriginality

    NoOriginality Member

    Well whatever happens, happens.
  12. Nagisa Momoe

    Nagisa Momoe Member

    I can't wait xD this is so good, finally can get rid of scriptfodder shiet
    --- Double Post Merged, Oct 24, 2016 ---
    How's goin?
    --- Double Post Merged, Oct 27, 2016 ---
    Last edited: Oct 27, 2016
  13. NoOriginality

    NoOriginality Member

    Actually I have a question on what I should do.

    For now I have been going about creating this in the way that on every code that runs it checks what the cop is looking at, like if the cop pressed "Pardon" and a confirmation windows pops up to say yes or no, if the suspect moves then it will automaticlly update and when the cop presses yes, if the current thing he is looking at is not wanted or not a player it returns not allowed or whatever.

    I see now this may be a shitty way going about this.
    Should I just have the first entity the cop looked at and have it apply to all the functions regardless if it moves? Just not have it constantly update. And then close the menu if that player gets too far away?

    Since I am hoping it merges with DarkRP, I wanted to get your take on how I should do it. Seems like the second way would be easier to code and a better way of doing it. Thoughts?
    --- Double Post Merged, Oct 28, 2016 ---
    Dude, leave me alone. Seriously. This will get done when it gets done, I don't work for you and I am not your slave. I am creating this so you will get updates when I feel like posting them.
    Last edited: Oct 28, 2016
  14. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    Before thinking about traces, think about what you would want as a player. The player wants to pardon another player. You've already decided that the cop is to walk up to the other player, "select" them somehow and then decide on their fate. A cop should not very asked to re-select the player when they move slightly. That would piss people off. Chat out how the Hitman menu does it.

    Some more notes:
    - theres a special function that doesn't directly use traces. It allows you to look at a player's general direction without looking directly at them. If the Hitman menu doesn't use it, I'm sure the stunstick and arrest batons do.
    - a confirmation screen seems like a redundant step. They're really annoying, the chance that you hit the e wrong button is very small and even if you do hit it, it's not the end of the world.
    - the hitman menu doesn't close when the Hitman moves a bit. It does close when the Hitman walks too far away from you. After all, you shouldn't be able to request a hit from the other side of the map. Make sure such checks are both clientside and serverside.
  15. NoOriginality

    NoOriginality Member

    Yes, so I already overhauled the whole system so it isn't based on the idiocy of constantly checking if the cop is looking at them. The suspect just has to stay within 150 units (about 3 meters) of the cop.
    I think I might keep the hit trace system because if you do the general direction I am afraid if there is a cluster of people the cop won't get the person he is trying to target.

    The confirmation screen may seem redundant but I think it is a good system for the choice of ticketing (confirmation pops up saying "Ticket name for this amount?") so the cop knows how much he is ticketing to who.
    Also for Pardoning ("Pardon name?") and Sending to jail ("Incarcerated name?")

    The checks are both already client and serverside, no need to frett about that.

    I am also thinking about adding a bail bondsman entity, the person can go up to him and pay a fine (his ticket/bounty worth) after he has served a certain amount of time. Maybe have it decreased by 50% because he went to jail.

    Quick question on your end, do you plan to implement an escape system where if a player gets a certain distance away from the jail then he will get released automatically?

    Here are some images.

    (The code isn't messed up for the gui. I just didn't take a screenshot of the whole gmod window)

    [​IMG] [​IMG]
  16. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    You can trust the function of vaguely looking at someone. It returns the player closest to your crosshair. It always points at the player you would expect it to.

    I'm not planning on anything big for DarkRP.

    About the UI, I urge you to please not make it feel like an install wizard. Ideally, there's always one screen with all the things you can do. With every window that opens on the press of a button, you confront the player with a new situation to think about. This cop menu represents ONE conceptual decision: How do I want to punish this player? Ideally, there is one complete visualisation of what the possibilities are. That means no surprises of a new window even you make a decision. Confirmation boxes slow people down. Especially if you have to click "yes" every single time you want to jail someone.

    Also, your UI style is not consistent with default DarkRP. Why did you choose blue?
    Pab14567 likes this.
  17. Pab14567

    Pab14567 Well-Known Member

    Took the words out of my mouth.
  18. NoOriginality

    NoOriginality Member

    I was planning on selling it, that is why it's blue.

    How should I go about putting in the specifics then? Maybe when the mouse is hovering over a certain amount of time it shows a small window underneath of it with the details?
    Not sure how to go on from here.
  19. Nagisa Momoe

    Nagisa Momoe Member

    Awww you gonna sell it :(
  20. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    I don't know, maybe some preset amounts? Low - medium - high? You'd want it to be possible to decide on an action super fast somehow.

Share This Page