Simple Peacetime (Standalone)

DESCRIPTION
My first release : ) Simple to the point of :clown_face:, but I saw someone requested it.

A simple “peacetime” script for RP servers which disables firing and shows status. Easy customization. Uses HTML UI with simple, smooth transitions.

DEPENDENCIES

  • One Sync

DOWNLOAD

VIDEO

:clap:

Update 1.01 Fixed perms issue, typo, and UI Issue : )

9 Likes

Awesome job, very clean look!

1 Like

HOW TO CHANGE FONT AND COLORS

Fonts:

  • Go here
  • Pick a font
  • Click “+ Select this style” on the styles you want to use
  • Click on “import” and copy the code not including <style> </style>
    image
  • Paste it at line 1 of ui/ui.css
  • Change line 19 in ui/ui.css to
    font-family: "Your Font Name", your-font-type;
  • Change line 20 and 27 to the numbers you want, they can be found in your @import code.

Colors:

  • To change the color of “Enabled”, change the RGBA value in ui/ui.css line 5
  • To change “Peacetime” color, change white at line 23 to a hex value or rgb(x,x,x) value

Nice starting release :smiley:

1 Like

How do i move it?

1 Like

@Brandon37

  width: 1000px;
  margin: 0 auto;
  margin-top: 200px;
  text-align: center;

The position is determined by these lines in the CSS.

If you have an idea of where you want to move it I can point you in the right direction?

1 Like

hey I would like to move it right next to the top of the mini map. can u help me out with that?

1 Like

To position it above the map change these lines in ui.css

width: 1000px;
margin: 0 auto;
margin-top: 200px;
text-align: center;

To this:

position: absolute;
bottom: 20vh;
left: 1vw;
margin: 0;
text-align: left;

I haven’t tested this, so you will have to adjust the value of “bottom: 20vh:” a bit. It should be a value around 15vh-30vh

Hope this works! If not let me know.

thank you! it works

1 Like

I don’t see the text saying PT is activated. It only shows in chat

Make sure you have one sync enabled and you have the most recent version.

Definitely late to the party here, but would it be possible to add a function where it checks if peacetime is enabled when a new player connects, and if so push the NUI display to the new player? I was doing some testing and if you relog or join the server during an active peacetime, you can’t see the NUI saying peacetime is enabled (yes OneSync is on) and this may lead players to believe their game is bugged. I tried looking around the docs to see if this was possible but couldn’t find anything that I could put together with my limited scripting knowledge.

I’m pretty sure I added this, I will double check it if I get a chance.

Edit: looks like I didn’t I will add it

2 Likes

You need to make one of these for Priority Cooldown :slight_smile:

1 Like

Fixed bugs in this, it now works properly.

This has been corrected/added.