GithubHelp home page GithubHelp logo

timnboys / el_scoreboard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elipse458/el_scoreboard

1.0 1.0 0.0 38 KB

License: Do What The F*ck You Want To Public License

Lua 31.47% HTML 4.49% JavaScript 50.61% CSS 13.44%

el_scoreboard's Introduction

el_scoreboard

Installation

  1. Download the resource
  2. Rename it to el_scoreboard and put it in your resources folder
  3. Edit the config.lua and html/config.js to your liking
  4. Add start el_scoreboard to your server.cfg Make sure to add this after es_extended
  5. Start it and you're good to go

Features

  • Well... it's a scoreboard lol
  • Left clicking a player in the scoreboard will copy their steam profile url
  • Right clicking a player in the scoreboard will bring up an admin menu (if you're an admin)
  • Customizable design
  • Customizable nav & admin menu buttons
  • Customizable pages

Customization

Navbar button format

Property Type Description Extra
label string Label of the button Required
page string The id of the page to switch to upon clicking the button Not required if action is set
action function Will get executed upon clicking the button (the button will not get highlighted) Not required if page is set

Navbar pages

This is just the html of the page that will show up in .main-content, this must be a string

Admin context button format

Property Type Description Extra
label string Label of the button Required
action string / function Nui callback admin-ctx will get executed with needed data (check client.lua line 56) Required
action string / function Will get executed when button is clicked (more about this below) Required
style string Custom css styling Optional
args object If set, will ask for text input (more info below) Optional

Admin context button - action (function)

Format (without args):

action: function(receiver) {
  console.log("Hello, world!")
}

Format (with args):

action: function(receiver,args) {
  console.log("Hello, world!")
}

receiver - string - the server id of the target player
args - string - text input from the user

Admin context button - args

Format

Property Type Description Extra
description string The text that will show up above text input Required
placeholder string The hint that will show up in the text input Optional

In-Game reference
If the cancel button is pressed, the current action will be aborted!!!

Button actions

Custom functions

Function name Parameters Description Return
hexidtodec string sid Will transform hex SteamID to SteamID64 string sid64
selectPageButton string page name This will select the button corresponding to the page name Nothing
changePage string page name This will change the current page to the specified page Nothing
toggleMenu boolean state This will toggle the menu Nothing
getInput string description - Text above input
optional string placeholder - Hint in input
function callback - with string parameter
Asks for text input from player, if cancelled, callback parameter will be null, otherwise it will be a string with the text content Nothing
copyText string text
string callbackText - Text that will pop up when copied
int callbackFadeTime - How long it will take for the popup to disappear (in ms)
Will copy specified text to the clipboard Nothing
isAdmin Nothing Checks if the player is admin boolean admin status

You can also use JQuery functions

Custom variables

Variable name Type Description
mygroup string The user's group
mysteamid string The user's hex steam id
mouseX int Cursor's X position
mouseY int Cursor's Y position

These are read only! Don't rewrite them!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.