Script ESX

iNotificationV3

$19.00

Zaawansowany system powiadomień z konfigurowalnymi wiadomościami, czasami trwania i stylami. Obsługuje wyzwalacze po stronie klienta dla profesjonalnych powiadomień UI.

Product facts

Framework
ESX
Resource type
Script
Included files
1 downloadable file
Add to Cart
iNotificationV3 FiveM zasób
iNotificationV3
$19.00
ADN'S | iNotificationV3 | NUI Advanced Notification | FiveM Scripts

📦 Installation of Notifications

  1. Przeciągnij iNotificationV3 folder do swoich zasobów.
  2. Dodaj linię ensure iNotificationV3 do twojego server.cfg.

📝 Text Options

  1. Jeśli dołączysz ~h~ w tekście, sprawi, że tekst będzie pogrubiony (przykład: ~h~Trying bold text~h~).
  2. Jeśli dołączysz ~i~ w tekście, sprawi, że tekst będzie kursywa (przykład: ~i~Trying italic text~i~).
  3. Jeśli dołączysz <br/> w tekście, utworzy nową linię (przykład: line 1<br/>line 2).

🔔 Example Notifications (Client/Server)

Strona klienta

-- showNotification
TriggerEvent("iNotificationV3:showNotification", "This is a message", 5, "left");

-- showAdvancedNotification
TriggerEvent("iNotificationV3:showAdvancedNotification", "Title", "Subtitle", "this is a message", "CHAR_MP_BIKER_BOSS", 7, "left");

-- showHelpNotification
TriggerEvent("iNotificationV3:showHelpNotification", "Press ~INPUT_PICKUP~ to ...", 10, "right");

-- showAdvancedHelpNotification
TriggerEvent("iNotificationV3:showAdvancedHelpNotification", "Interactions", "Press ~INPUT_PICKUP~ to trigger ...", "CHAR_MP_BRUCIE", 8, "left");

Strona serwera

-- showNotification
TriggerClientEvent("iNotificationV3:showNotification", source, "This is a message", 5, "left");

-- showAdvancedNotification
TriggerClientEvent("iNotificationV3:showAdvancedNotification", source, "Title", "Subtitle", "this is a message", "CHAR_MP_BIKER_BOSS", 7, "left");

-- showHelpNotification
TriggerClientEvent("iNotificationV3:showHelpNotification", source, "Press ~INPUT_PICKUP~ to ...", 10, "right");

-- showAdvancedHelpNotification
TriggerClientEvent("iNotificationV3:showAdvancedHelpNotification", source, "Interactions", "Press ~INPUT_PICKUP~ to trigger ...", "CHAR_MP_BRUCIE", 8, "left");

⚠️ Wskazówka: Zalecamy, aby nie modyfikować wszystkich powiadomień przez ESX.
Zamiast tego, modyfikuj je indywidualnie w każdym skrypcie, w którym występują, aby uzyskać lepszą kontrolę (pozycja, czas trwania itp.).


🧩 Modify All Notifications in Your ESX Framework Easily

  1. Przejdź do folderu ex_extended/client.
  2. Otwórz plik functions.lua.
  3. Postępuj zgodnie z poniższymi krokami modyfikacji.

🔧 Modification

Zastąp ten kod:

ESX.ShowNotification = function(msg)
    SetNotificationTextEntry('STRING');
    AddTextComponentString(msg);
    DrawNotification(0, 1);
end

ESX.ShowAdvancedNotification = function(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
    if saveToBrief == nil then saveToBrief = true end
    AddTextEntry('esxAdvancedNotification', msg)
    BeginTextCommandThefeedPost('esxAdvancedNotification')
    if hudColorIndex then ThefeedNextPostBackgroundColor(hudColorIndex) end
    EndTextCommandThefeedPostMessagetext(textureDict, textureDict, false, iconType, sender, subject)
    EndTextCommandThefeedPostTicker(flash or false, saveToBrief)
end

ESX.ShowHelpNotification = function(msg, thisFrame, beep, duration)
    AddTextEntry('esxHelpNotification', msg)

    if thisFrame then
        DisplayHelpTextThisFrame('esxHelpNotification', false)
    else
        if beep == nil then beep = true end
        BeginTextCommandDisplayHelp('esxHelpNotification')
        EndTextCommandDisplayHelp(0, false, beep, duration or -1)
    end
end

Tym kodem:

ESX.ShowNotification = function(msg, time, position)
    TriggerEvent("iNotificationV3:showNotification", msg, time or 12, position or "left");
end

ESX.ShowAdvancedNotification = function(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
    TriggerEvent("iNotificationV3:showAdvancedNotification", sender, subject, msg, textureDict, 12, "left")
end

ESX.ShowHelpNotification = function(msg, thisFrame, beep, duration)
    TriggerEvent("iNotificationV3:showHelpNotification", msg, 12, "left");
end

➕ Łatwo dodawaj powiadomienia

showNotification

Client

-- message: string (message content) (⚠️ Required)
-- duration: number (seconds the notification stays visible) (❌ Optional)
-- location: string["left", "middle", "right"] (screen position) (❌ Optional)
exports["iNotificationV3"]:showNotification(message, duration, location);
-- or:
TriggerEvent("iNotificationV3:showNotification", message, duration, location);

Serwer

TriggerClientEvent("iNotificationV3:showNotification", playerId or source, message, duration, location)

showAdvancedNotification

Client

-- title: string (title of notification) (❌ Optional)
-- subtitle: string (subtitle) (❌ Optional)
-- message: string (message content) (⚠️ Required)
-- duration: number (display duration) (❌ Optional)
-- location: string["left", "middle", "right"] (screen position) (❌ Optional)
-- icon: string (GTA 5 notification image or custom image name from "assets/images/") (❌ Optional)

exports["iNotificationV3"]:showAdvancedNotification(title, subtitle, message, icon, duration, location);
-- or:
TriggerEvent("iNotificationV3:showAdvancedNotification", title, subtitle, message, icon, duration, location);

Serwer

local inotif = "iNotificationV3:showAdvancedNotification";
TriggerClientEvent(inotif, playerId or source, title, subtitle, message, icon, duration, location)

showHelpNotification

Client

exports["iNotificationV3"]:showHelpNotification(message, duration, location);
-- or:
TriggerEvent("iNotificationV3:showHelpNotification", message, duration, location);

Serwer

local inotif = "iNotificationV3:showHelpNotification";
TriggerClientEvent(inotif, playerId or source, message, duration, location)

showAdvancedHelpNotification (Podgląd)

Client

exports["iNotificationV3"]:showAdvancedHelpNotification(title, message, icon, duration, location);
-- or:
TriggerEvent("iNotificationV3:showAdvancedHelpNotification", title, message, icon, duration, location);

Serwer

local inotif = "iNotificationV3:showAdvancedHelpNotification";
TriggerClientEvent(inotif, playerId or source, title, message, icon, duration, location)

Gotowe!
Twój plik został teraz w pełni przetłumaczony na angielski, zachowując bloki kodu i formatowanie.

Czy chcesz, abym wygenerował wersję angielską-markdown tego pliku (readme_en.md) którą możesz pobrać?

Informacje dodatkowe

Framework

ESX