forked from Simnation/Main
motel
This commit is contained in:
parent
3ca62609e3
commit
8703f26ab8
52 changed files with 18756 additions and 6 deletions
16
resources/[jobs]/[police]/sperrzone_rundmail/server_main.lua
Normal file
16
resources/[jobs]/[police]/sperrzone_rundmail/server_main.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterServerEvent("qbcore:announcement")
|
||||
AddEventHandler("qbcore:announcement", function(message)
|
||||
local src = source
|
||||
local player = QBCore.Functions.GetPlayer(src)
|
||||
|
||||
if player and Config.AllowedJobs[player.PlayerData.job.name] then
|
||||
TriggerClientEvent('chat:addMessage', -1, {
|
||||
template = '<div class="chat-message system"><b>Ankündigung:</b> {0}</div>',
|
||||
args = { message }
|
||||
})
|
||||
else
|
||||
TriggerClientEvent('QBCore:Notify', src, "Du bist nicht berechtigt, eine Ankündigung zu senden.", "error")
|
||||
end
|
||||
end)
|
Loading…
Add table
Add a link
Reference in a new issue