-
Notifications
You must be signed in to change notification settings - Fork 3
/
client.lua
46 lines (41 loc) · 1.59 KB
/
client.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
local QBCore = exports['qb-core']:GetCoreObject()
local PlayerData = QBCore.Functions.GetPlayerData()
PlayerJob = {}
RegisterNetEvent('QBCore:Client:OnJobUpdate', function(JobInfo)
PlayerJob = JobInfo
end)
local year --[[ integer ]], month --[[ integer ]], day --[[ integer ]], hour --[[ integer ]], minute --[[ integer ]], second --[[ integer ]] = GetLocalTime()
RegisterNetEvent("bodycam:time")
AddEventHandler("bodycam:time", function (h,m,s)
SendNUIMessage({
action = "zamanguncelle",
zaman = day.."/"..month.."/"..year.." ".." - "..h..":"..m..":"..s.." BST",
})
end)
RegisterNetEvent("marsh-bodycam:openBoy")
AddEventHandler("marsh-bodycam:openBoy", function (item, h,m,s)
local Player = QBCore.Functions.GetPlayerData()
if Player.job.name == "ambulance" then
if Player.charinfo.gender == "0" then
gender = Config.Gender2
else
gender = Config.Gender1
end
if acik then
acik = false
SendNUIMessage({
action = "hidebodycam"
})
TriggerServerEvent("booleanuodate", false)
else
SendNUIMessage({
action = "showbodycam",
player = Player.job.grade.name.. " "..gender.." "..Player.charinfo.lastname,
callsign = "["..Player.metadata['callsign'].."]",
tarih = day.."/"..month.."/"..year.." ".." - "..h..":"..m..":"..s.." BST",
})
TriggerServerEvent("booleanuodate", true)
acik = true
end
end
end)