iBenachrichtigungV3
Flexibles Benachrichtigungssystem mit umfangreichen Anpassungsoptionen fĂŒr professionelle BenutzeroberflĂ€chen-Mitteilungen.
Video-Vorschau
Click to load video from YouTube. By watching, you agree to their privacy policy.
? Installation von Benachrichtigungen
- Ziehen Sie den Ordner
iNotificationV3in Ihre Ressourcen. - FĂŒgen Sie die Zeile
ensure iNotificationV3zu Ihrerserver.cfghinzu.
? Text-Optionen
- Wenn Sie
~h~im Text verwenden, wird der Text fett (Beispiel:~h~Versuchen Sie fett zu schreiben~h~). - Wenn Sie
~i~im Text verwenden, wird der Text kursiv (Beispiel:~i~Versuchen Sie kursiv zu schreiben~i~). - Wenn Sie
im Text verwenden, wird eine ZeilenumbrĂŒche erstellt (Beispiel:Zeile 1).
Zeile 2
? Beispielbenachrichtigungen (Client/Server)
Client-Seite
-- showNotification
TriggerEvent(iNotificationV3:showNotification, Das ist eine Nachricht, 5, links);
-- showAdvancedNotification
TriggerEvent(iNotificationV3:showAdvancedNotification, Titel, Untertitel, das ist eine Nachricht, CHAR_MP_BIKER_BOSS, 7, links);
-- showHelpNotification
TriggerEvent(iNotificationV3:showHelpNotification, DrĂŒcken Sie ~INPUT_PICKUP~ um ..., 10, rechts);
-- showAdvancedHelpNotification
TriggerEvent(iNotificationV3:showAdvancedHelpNotification, Interaktionen, DrĂŒcken Sie ~INPUT_PICKUP~ um ..., CHAR_MP_BRUCIE, 8, links);
Server-Seite
-- showNotification
TriggerClientEvent(iNotificationV3:showNotification, source, Das ist eine Nachricht, 5, links);
-- showAdvancedNotification
TriggerClientEvent(iNotificationV3:showAdvancedNotification, source, Titel, Untertitel, das ist eine Nachricht, CHAR_MP_BIKER_BOSS, 7, links);
-- showHelpNotification
TriggerClientEvent(iNotificationV3:showHelpNotification, source, DrĂŒcken Sie ~INPUT_PICKUP~ um ..., 10, rechts);
-- showAdvancedHelpNotification
TriggerClientEvent(iNotificationV3:showAdvancedHelpNotification, source, Interaktionen, DrĂŒcken Sie ~INPUT_PICKUP~ um ..., CHAR_MP_BRUCIE, 8, links);
â ïž Tipp: Wir empfehlen nicht alle Ihre Benachrichtigungen ĂŒber ESX zu Ă€ndern.
Stattdessen Ă€ndern Sie sie individuell innerhalb jedes Skripts, wo sie fĂŒr bessere Kontrolle (Position, Dauer, etc.) auftreten.
? Ăndern Sie alle Benachrichtigungen in Ihrem ESX-Framework einfach
- Gehen Sie zum Ordner
ex_extended/client. - Ăffnen Sie die Datei
functions.lua. - Folgen Sie den untenstehenden Modifikationsschritten.
? Modifikation
Ersetzen Sie folgenden Code: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
Mit diesem Code:
ESX.ShowNotification = function(msg, time, position)
TriggerEvent(iNotificationV3:showNotification, msg, time or 12, position or links);
end
ESX.ShowAdvancedNotification = function(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
TriggerEvent(iNotificationV3:showAdvancedNotification, sender, subject, msg, textureDict, 12, links)
end
ESX.ShowHelpNotification = function(msg, thisFrame, beep, duration)
TriggerEvent(iNotificationV3:showHelpNotification, msg, 12, links);
end
â FĂŒgen Sie Benachrichtigungen einfach hinzu
showNotification
Client
-- message: string (Nachrichteninhalt) (â ïž Erfordert) --
-- duration: number (Sekunden, die die Benachrichtigung sichtbar bleibt) (â Optional) --
-- location: string[links, Mitte, rechts] (Bildschirmposition) (â Optional) --
exports[iNotificationV3]:showNotification(message, duration, location);
-- oder: --
TriggerEvent(iNotificationV3:showNotification, message, duration, location);
Server
TriggerClientEvent(iNotificationV3:showNotification, playerId or source, message, duration, location)
showAdvancedNotification
Client
-- title: string (Titel der Benachrichtigung) (â Optional) --
-- subtitle: string (Untertitel) (â Optional) --
-- message: string (Nachrichteninhalt) (â ïž Erfordert) --
-- duration: number (Anzeigedauer) (â Optional) --
-- location: string[links, Mitte, rechts] (Bildschirmposition) (â Optional) --
-- icon: string (GTA 5-Benachrichtigungsbild oder individuelles Bildname aus assets/images/) (â Optional) --
exports[iNotificationV3]:showAdvancedNotification(title, subtitle, message, icon, duration, location);
-- oder: --
TriggerEvent(iNotificationV3:showAdvancedNotification, title, subtitle, message, icon, duration, location);
Server
local inotif = iNotificationV3:showAdvancedNotification;
TriggerClientEvent(inotif, playerId or source, title, subtitle, message, icon, duration, location)
showHelpNotification
Client
exports[iNotificationV3]:showHelpNotification(message, duration, location);
-- oder: --
TriggerEvent(iNotificationV3:showHelpNotification, message, duration, location);
Server
local inotif = iNotificationV3:showHelpNotification;
TriggerClientEvent(inotif, playerId or source, message, duration, location)
showAdvancedHelpNotification (Vorschau)
Client
exports[iNotificationV3]:showAdvancedHelpNotification(title, message, icon, duration, location);
-- oder: --
TriggerEvent(iNotificationV3:showAdvancedHelpNotification, title, message, icon, duration, location);
Server
local inotif = iNotificationV3:showAdvancedHelpNotification;
TriggerClientEvent(inotif, playerId or source, title, message, icon, duration, location)
â Fertig! Ihr Datei wurde nun vollstĂ€ndig ins Deutsche ĂŒbersetzt, wĂ€hrend Codeblöcke und Formatierung erhalten blieben. Möchten Sie, dass ich eine Englische-Markdown-Version dieser Datei (
readme_en.md) generiere, die Sie herunterladen können?
```


