Giter Club home page Giter Club logo

ps-hud's Introduction

Project Sloth GitHub Project PS-HUD Banner

ps-hud

Ultra customizable hud featuring a unique and robust settings menu. Change eveything about your experience!

Project Sloth Buttons 2

Optional:

⚠️Important:

  • Do not rename this resource from ps-hud or you will encounter issues.
  • Locale is now supported. Make sure that your qb-core is update. You can update it here.
  • This script is fully open source, it has no obfuscation. Svelte compiled the js when it gets build and original source code is here svelte-source.
  • If the minimap is pulsating or flickering, make sure if you are using custom maps that you ensure ps-hud BEFORE map resource or if another script use the SetRadarZoom() native for disable it there.


Project Sloth GitHub Project PS-HUD Install Banner

Start installing now

We will now provide you with a step-by-step guide for the installation process. Shouldn't take too long and it shouldn't be too confusing either!

Step 1:

Go ahead and start by dragging and dropping ps-hud into your designated resources folder.

If you are still lost, Slothy has created a few GIF's to help guide you through all the installation steps.

chrome_KpjdUnvhgV



Admin Only Setting:

If you don't want your community to be able to access the customizability options within the menu; make sure to change Config.AdminOnly to true instead of false. Keep in mind as well, while true, the changes you save will override for everyone on the server.

This configuration setting is found in ps-hud/config.lua as shown in the GIF below.

chrome_ZwsidhP73y



Project Sloth GitHub Project PS-HUD Features Banner

Some features to mention within this ps-hud:

  • Custom icon shapes
  • Alter icon size, position and color
  • Customize settings for individual icons
  • Endless options for icon position and orientation


Project Sloth GitHub Project PS-HUD Showcase Banner

Time to show you what it looks like!

Here's a few showcased examples while using ps-hud.

Design mode and shapes:

DesignModeandShapes.mp4

Icon state and color:

IconStateandColors.mp4

Icon size and position:

IconSizeandPosition.mp4

Change progress color:

ColorChanges.mp4

Individually edit icons:

IndividualEdits.mp4

Icon layout and spacing:

IconLayoutandSpacing.mp4

Credits:

Inspiration and some code snippets from Svelte & Lua Boilerplate by Project Error

Unsupported ESX Version made by reyyghi

Copyright © 2022 Project Sloth.

ps-hud's People

Contributors

alivemonstor avatar azutake avatar christianbdev avatar dexter9006 avatar ggfto avatar imkuroneko avatar jay-fivem avatar jnccloud avatar lenzh avatar loljoshie avatar menkzy avatar mockdot avatar monkeywhisper avatar monsieurbibo avatar myshkovsky avatar noobysloth avatar noonenook avatar pushkart2 avatar qbtreyyy avatar randolio avatar reyyghi avatar s1lentcodes avatar solareon avatar valentineu0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ps-hud's Issues

Allow restricting PS-Hud menu to admin/god

It would be great if there could be an option to set permissions on which roles are able to open the menu.
This would be very handy on servers that do not allow players to adjust the hud but would like to customize it as an admin and then save to the server to apply to players.

Bug in Nitro Icon

Not sure if its an HUD bug, faced it with qb-hud also,
whenever anyone in the server applies nitro in the vehicle, the Nitro icon becomes globally visible and stays on the screen until the relog.

A simple suggestion !

Hello guys,

First of all, this is a great resource, we really love it, great job :) We thing that adding 2 more things to it will make it even grater.

  1. Option to set the percentage to show the icons individually. Right now, you can see all the icons (food, health etc) if the percentage goes under 100%. Adding the ability for the players to set their own value will be even better.
  2. Voice integration for SaltyChat. Right out of the box, works only with mumble. Add the option for the owners to select between mumble and saltychat and if you want to take a step even further, TokoVoip :)

Again, thank you for a great resource and keep up the good work guys :)

Buff icons not showing after re-log

If you have an active buff and leave the server then join back the buff icon will be an exclamation point instead of showing the respective icon.

EDIT: Buffs also transfer between players if you do /logout and switch characters or logout via housing or apartments. They do not transfer if you close out of the game completely and choose another character.

[BUG] Support widescreen displays

I'm running on 3440 x 1440 and the border never matches the minimap.
As suggested in discord, I've changed the savezone in my display settings, but I'm never able to match the border with the minimap.
So I think support for widescreens is needed.

IU3Akpz

fix resolution

ps-hud not support all resolution
i have problrm with different resolution like minimap border and fuel and speed hud

I don't have these problems in qb-hud

Translations

Hi. Using ps-hud the code like notifications are using locales but the menu etc are not / i haven't found them.

As this, I would like to know how I can translate the interface.

Minimap

Mini map doesn’t move when trying to use left vertical column. Tried going in and looking around to see if I can move it myself and got confused looking at the script. Any hep would be awesome

Compass staying On even disabled + 3 options not saving

image

While on foot,

with the compass disabled but the compass only in vehicle disabled
the compass shows,

with compass disabled and only in vehicle
the compass doesn't shows,

While in a vehicle,
with the compass disabled but the compass only in vehicle disabled and with compass disabled and only in vehicle
the compass doesn't show

Also
image
those 3 seem to reset to checked everytime i restart the script

HUD randomly stops updating

For some reason at random, the HUD will just break. It will continue to show your speedometer even when are not inside a vehicle and when you enter a vehicle it just won't display or it won't update your speed or gas. This also happens with the map border staying on, and not disappearing or changing to the correct map. Resetting the HUD or settings of the HUD doesn't fix it. Only fix is to close and re-open FiveM.

Can't Toggle speedometer,fuel and seatbelt hud

Hi guys!, i need to hide the fuel, seatbelt and speedometer hud, but i can't find the option to do that, please help!, i've another speedometer so i want to disable the ps-hud speedo

ui problem

Hi, just wanne let you guys know, when you opened the menu to change the icons, when you close the the menu by pressing ESC you're stuck and you need to restart the hud

Major Issues

Followed the install exactly and when I got in game the entire hud was completely messed up. Some UI elements wouldn't work and the entire vehicle hud would not pop up.

esc clous

hello "I" I close the pop-up menu with the ESC key and its headlight stays in the middle of the screen and prevents me from moving

[REQUEST] Aircrafts

Have the option in the config to enable / disable stress when flying an aircraft

attempt to index a nil value (field 'metadata') on logout

i get the following error occuring when logging out a character:

SCRIPT ERROR: @ps-hud/client.lua:893: attempt to index a nil value (field 'metadata') @ps-hud/client.lua:893

line 893: playerDead = IsEntityDead(player) or PlayerData.metadata["inlaststand"] or PlayerData.metadata["isdead"] or false

Request: Client side customization

Having the ability to enable each client to select the hud position and the generic sizing that they want would be amazing. if we really want to make it even sweeter would allow admins to toggle each field to enable for client modification, populating the same component with the client side fields that admins would see, but slimmed down.

perhaps saving those few fields in the player table, or even its own, based off a license id would mean that different CID's wouldn't have to set up the positioning for each character. also, it'd be a smaller table. If they don't have it modified, default to the server's default settings.

New hud element - Blood value (bleeding)

Hi,

I wanted to suggest adding blood level as another hud element.

The features I would suggest:

  1. Visual representation of when the player is bleeding. Have a pulsating effect added to the element.
  2. To add to the pulsating effect and provide clarity. I would suggest adding different colours for the different stages of the bleed.
  3. Having the 0-100%, similar to health, food, or water.
  4. Adding a variable which would control the 0-100% of the new element.

Some of the reasons why I think this feature would be a good addition:

  1. It would provide a visual representation of when the player is bleeding.
  2. Would allow to incorporate new features to bleeding.

Personally, I want to expand the health system in the game by adding blood value. Which would be used by some other new features such as addiction and drugs as well as reworking the bleed system and how bleeding affects health.

[Request] UI langauge

Thanks for nice resource

can you please add UI locale language, for example player can choice the UI language

or some function to set language with NUI for example

SendNUIMessage({lang = 'etc..', type = 'setUILang'})

Unable to build UI

Hello there, I'm having an issue building the UI. When ever I try to build, I get the following error. Nothing seems to fix it unless I upgrade vite, but when I do so, the UI is completely broken (for obvious reasons), I know the latest update was recent, so I'm not sure what I'm doing wrong.

yarn run v1.22.19
$ sed -i 's/true/false/g' ./src/stores/debugStore.ts && vite build
failed to load config from /var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/vite.config.ts
error during build:
file:///var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/@sveltejs/vite-plugin-svelte/dist/index.js:630
import { createFilter } from "vite";
         ^^^^^^^^^^^^
SyntaxError: Named export 'createFilter' not found. The requested module 'vite' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'vite';
const { createFilter } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
    at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15)
    at async loadConfigFromFile (/var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/vite/dist/node/chunks/dep-689425f3.js:61916:31)
    at async resolveConfig (/var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/vite/dist/node/chunks/dep-689425f3.js:61456:28)
    at async doBuild (/var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/vite/dist/node/chunks/dep-689425f3.js:41564:20)
    at async build (/var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/vite/dist/node/chunks/dep-689425f3.js:41552:16)
    at async CAC.<anonymous> (/var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/vite/dist/node/cli.js:738:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
``

Player ID is not showing when enabled

hey Ps Team, i just downloaded the latest ps-hud from here and i noticed that nothing is showing in the player id circle. i do have it enabled in the settings

no errors in the console

Screenshot 2022-08-15 175513

[REQUEST] ESX Version

Hello!

Really awesome HUD. Is there a Way that you can make a ESX Version?

Best Regards :)

Double map load notification

Upon using ps-hud, I can see multiple notifications of map load:

  1. Upon loading qb-multicharacter selection screen
  2. Upon selecting character and spawn point

Tried checking the code to see if I can avoid it showing in qb-multicharacter but was unable to:

2023-03-02 22_24_58-FiveM® by Cfx re - El Mundo RP

2023-03-02 22_25_16-FiveM® by Cfx re - El Mundo RP

Minimap hide issue.

After checking "Show Minimap only in Vehicle" and when player is not in vehicle,

Player is still able to see minimap.

image

[SUGGESTION] Media Query for 2560x1080 Monitors

I have included a media query for the 2560x1080 monitors

-- map-border-hud
@media (width: 2560px) and (height: 1080px) {
.square {
left: -0.25vw !important;
bottom: -1.8vh !important;
}
.circle {
left: 0.15vw !important;
width: 27.6vh !important;
bottom: -1vh !important;
}
}

--particle-circle-ring
@media (width: 2560px) and (height: 1080px) {
.vehicle-number {
font-size: 1.7vh !important;
}
.vehicle-text {
font-size: 0.9vh !important;
}
}

-- Vehicle Hud
@media (width: 2560px) and (height: 1080px) {
.responsive.svelte-18lolzz {
margin-left: 33.5vh !important;
transform: scale(1.3);
bottom: 7.2vh !important;
}
#speedometer.svelte-18lolzz {
position: relative;
left: 0vw !important;
}
#fuelgauge.svelte-18lolzz {
position: relative;
left: 2vw !important;
bottom: 5.95vh !important;
}
#altitudegauge.svelte-18lolzz {
position: relative;
left: 4vw !important;
}
#seatbelt.svelte-18lolzz {
position: relative;
left: 4.1vw !important;
bottom: 8.5vh !important;
}
#seatbeltAltitude.svelte-18lolzz {
position: relative;
left: 2.8vw !important;
bottom: 12vh !important;
}
}

[Feature Request] Default UI profile/settings

Similar to how AdminOnly works, however, you're able to either create a default profile or have default UI settings (and/or multiple presets) that people can then edit on top of if they wish to. I want to be able to set what people see when they first join, however, I also want them to be able to overwrite those default settings.

Config Update + pt.lua

I saw you took the qb-hud config, one thing got left out:
image
For non programes who want to change that may cause some confusion as vehicle hud text is not defined on the CSS but rather on the "index.js", a simple CTRL+F for "MPH" will locate the text field.

Also there were some PT lines missing on the locales, here is the complete version:

pt.lua.txt

falldamage

I don't take fall damage
how can i fix it?

[Question]

hey what will happen if you keep the hud on design mode
you will have a infinity food and water and all that?

Metadata index value error

image

This issue is due to some scripts setting a PlayerLoggedInState to "true" too soon. Players need to look thru their scripts for any client side events that set the state to true too soon and adjust

ps-buffs icons

Hi. I tried to add "backpack" as an icon for the buffs.

Unfortunatly, I get an exclamation dot when I put "backpack" as iconName.

I've seen that the icons are set in the svelte-source but is there a work around to setup font-awesome icons if not defined?

Licensing

Great job on the release but I’m noticing that it’s missing the GPL licensing here from qb-hud but instead now has a copyright claim. If you’d prefer to actually copyright the resource then I’d suggest re-writing the client/server/config entirely so it’ll be it’s own resource and not have to adhere to the GPL licensing which requires any re-releases be licensed under the same. If you could add that I’d appreciate it, thanks!

/logout issue

To fix this issue Got to line 894

and add these lines above it and it should all look like this:

PlayerData = QBCore.Functions.GetPlayerData()
if PlayerData == nil then return end
playerDead = IsEntityDead(player) or PlayerData.metadata["inlaststand"] or PlayerData.metadata["isdead"] or false
parachute = GetPedParachuteState(player)

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.