[Free] K5 Notify

This is a free and open Fivem script that lets you create multiple styles of reusable notifications. It’s an easy to use and configure resource, that helps you customize your server.

Demo

Watch the demo here: YouTube

Download

Features

  • Create multiple, highly customizable notificitions
  • Reuse defined notifications
  • Use custom sounds for different notification types
  • Users can change notification location, direction and volume
  • Can be used with export or client event

Check out Discord

11 Likes

i cant get this to work trying to put it on /job and nothing comes up

Find where you register the /job command, and place the export or the TriggerEvent() in that function. You also have to get the player’s job and add that in the text string aswell.

1 Like

Does it have server side event trigger support

Yes, there’s an example in the GitHub readme at the bottom.

very nice bro thanks for realease

Any exemple to replace for ESX.ShowNotification/AdvancedShowNotification ? :stuck_out_tongue:

Thanks buddy

You have to find and replace every ESX notification function in every script manually, there’s no other way to do that. If you use VSCode, there’s an option where you can search in every file.

Or i have juste replace the function Esx.shownotifiation in es_extended :slight_smile: ?

Hi how can I choose the color for my notify in server.lua pls ?

If you read the GitHub documentation, it says that you have to define notification types in the notification.js file. This is where you choose the color aswell. If you have that, then you call the "k5_notify:notify" client event on the server and pass the defined type’s name as the 5th parameter of TriggerClientEvent.

server.lua:
TriggerClientEvent("k5_notify:notify", source, "TITLE", "This is a test", "yourDefinedTypeName", 5000)

notifications.js:

const k5Notifications  = {
    ['yourDefinedTypeName']: {
	    background: '#235f2a)',
        ...
    }
}
1 Like

You can do that, but that would introduce some problems. For example, ESX.ShowNotification() can interpret control names, like ~INPUT_CONTEXT~ to show a key, or ~r~ to make the text red. These will not be converted in my notification, so the messages would look like this:
Press ~INPUT_CONTEXT~ to ~r~remove~s~ objects.
So you would still have to check your ESX.ShowNotification messages to remove these parts.

Did u think make a update for it ? to update it ?

This resource was not made to replace ESX.ShowNotification. This is a general tool that you can customize and use as you wish. If you want to replace your current ESX notifications with this resource, feel free to do that, but that’s a framework specific feature and this script is standalone. What you’re asking is possible with this script, but you have to do that yourself, since it is your server’s specific feature.

Hello, if I want the notification to appear as an error, or a success how should I do please

Everything is detailed in the Github README. If you can’t find somthing there, contact me.

Hello, I just downloaded the resource on github and the notification is left instead of right! How can I put it on the right please I tried to modify the css but nothing changes!
Thank you for your valuable help!

YOu can change it ingame. /notifysettings command

and what if I want it to be for everyone and not just for me?

In the settings.js file, there are these lines:
image

If you set the fromRightToLeft to false, the notification comes from the left. The problem here is that you could set the left value to something like 900, and the notification would appear somewhere on the left, but if a player has a resolution like 1024x768, they wouldn’t be able to see the box, because it would be outside their screen. If you don’t mind that, you could set it to 900, but the you would have to delete your local storage in the NUI DevTools to see this in action. To be able to do this feature I should add a new config to set the default values and determinate the width of the screen for each player. I might add this in the future.