[PAID] vsNotify

[PAID] vsNotify

[Description]

The vsNotify system is a completely new variant of notification systems. Players can make their own in-game settings and customise the location and volume of the individual notifications. It is also possible, for example, to create customised notifications with logos for all jobs. See for yourself!

Get this Script at our Store for just 12.99 € !

Showcase

Link to the Showcase Video

Config

ESX = exports['es_extended']:getSharedObject()

Config = {}

Config.AutoAnnounce = {
    [1] = {time = {hour = 12, min = 0}, message = "VibeScripts #1"},
    [2] = {time = {hour = 12, min = 10}, message = "VibeScripts #1"},
    [3] = {time = {hour = 12, min = 15}, message = "VibeScripts #1"}, 
}

function SendAnnounceAuto(message)
    TriggerClientEvent("vs-announce", -1, "Announcement", message)  
end

 
Config.JobAnnounce = {
    ["police"] = {command = "policesend", notifypng = "police", type = "announce", color = "#08ff00"}, -- type = "announce" or "notify"
    ["ambulance"] = {command = "ambulancesend", notifypng = "ambulance", type = "announce", color = "#ff0000"}
}

Citizen.CreateThread(function()
    for job, data in pairs(Config.JobAnnounce) do
        RegisterCommand(data.command, function(source, args)
            local xPlayer = ESX.GetPlayerFromId(source)
            if xPlayer.job.name ~= job then
                TriggerClientEvent("vs-notify", source, "error", "Notify", "You are not authorized", 5000) 
                return
            end
            local message = table.concat(args, " ")
            if message == "" then
                TriggerClientEvent("vs-notify", source, "error", "Notify", "/"..data.command.." [MESSAGE]", 5000) 
                return
            end
            if data.type == "announce" then
                TriggerClientEvent("vs-announce", -1, "Announce", message, 5000, data.notifypng, data.color) 
            else
                TriggerClientEvent("vs-notify", -1, "extra", "Notify", message, 5000, data.notifypng) 
            end
        end, false)
    end
end)


RegisterCommand("announce", function(source, args)
    local xPlayer = ESX.GetPlayerFromId(source) 
    if xPlayer.getGroup() == "superadmin" or xPlayer.getGroup() == "admin" then
        local message = table.concat(args, " ")
        if message == "" then
            TriggerClientEvent("vs-notify", source, "error", "Notify", "/announce [MESSAGE]", 5000) 
            return
        end
        TriggerClientEvent("vs-announce", -1, "Announce", message, 5000) 
    else
        TriggerClientEvent("vs-notify", source, "error", "Notify", "You are not authorized", 5000) 
    end 
end)


Client-Config

ClientConfig = {}

ClientConfig.TestCommand = true -- (/testn or /testa)

ClientConfig.CustomSettings = "nsettings" -- command for Custom-Settings

ClientConfig.Locale = {
    ['notify_settings_message'] = "Please drag the field to the desired position with your mouse!",
    ['notify_settings'] = "NOTIFY-SETTINGS",
    ['notify_descmenu'] = "Here you can customize the notify",
    ['notify_volume'] = "Volume",
    ['notify_save'] = "Save"
}

CSS-Config

/* Custimize the Notify Background */

/*normal notify*/
.notify-info {
    background: var(--background-notify); 
    border-radius: 7px;
    border: 0.5px solid var(--notify-info-header);
} 
.notify-error {
    background: var(--background-notify); 
    border-radius: 7px;
    border: 1px solid var(--notify-error-header);
} 
.notify-success {
    background: var(--background-notify); 
    border-radius: 7px;
    border: 1px solid var(--notify-success-header);
}


/*notify with custom Background*/

/* 

.notify-info {
    background: url("LINK TO YOUR IMAGE");
    background-position: center;
    background-size: cover; 
    border-radius: 7px;
    border: 0.5px solid var(--notify-info-header);
} 
.notify-error {
    background: url("LINK TO YOUR IMAGE");
    background-position: center;
    background-size: cover; 
    border-radius: 7px;
    border: 1px solid var(--notify-error-header);
} 
.notify-success {
    background: url("LINK TO YOUR IMAGE");
    background-position: center;
    background-size: cover; 
    border-radius: 7px;
    border: 1px solid var(--notify-success-header);
}

*/






/* Custimize the Announce Background */

/*normal announce*/
.announce-box {
    animation: 1s moveTop;
    position: relative;
    width: 10% - 3vh;
    padding: 1.6vh;
    margin-top: 3vh;  
    border-radius: .7vh ;
    background: var(--background-notify);
    border: 1px solid var(--announce-color);
}


/*announce with custom Background

.announce-box {
    animation: 1s moveTop;
    position: relative;
    width: 10% - 3vh;
    padding: 1.6vh;
    margin-top: 3vh;  
    border-radius: .7vh ;
    background: url("LINK TO YOUR IMAGE");
    background-position: center;
    background-size: cover;
}

*/



/* Edit LOGO */
img {
    position: absolute;
    width: 4vh;
    left: 1.5vh;
    top: 50%;
    transform: translateY(-50%); 
    border-radius: 5px;
}

.notify-logo-container img {
    width: 80px; 
    height: 55px; 
    object-fit: contain; 
    position: absolute;
    left: 9vh;
    top: -.5vh; 
    border: none;
}

 
  .notify-logo-announce img {
    width: 100px; 
    height: 55px; 
    object-fit: contain; 
    position: absolute;
    left: 25vh;
    top: -.3vh; 
    border: none;
}
/* LOG END */

Optimization

  • IDLE: 0.00ms
  • Running: 0.00ms

Further Information

SHOP: vsNotify

This resource is using the FiveM Asset Escrow system

Code is accessible No
Subscription-based No
Lines (approximately) 1350
Requirements ESX
Support Yes