-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathframe.lua
42 lines (27 loc) · 1.06 KB
/
frame.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
HksCore = exports['qb-core']:GetCoreObject()
AddEventHandler('HksCore:Client:OnPlayerLoaded', function()
local Player = HksCore.Functions.GetPlayerData()
print (Player.job.name)
end)
RegisterNetEvent('HksCore:Client:OnJobUpdate', function(JobInfo)
HksCore.Functions.GetPlayerData().job = JobInfo
end)
RegisterCommand('jobmenu', function()
job = HksCore.Functions.GetPlayerData().job.name
if job == "police" then
TriggerEvent('police:menu:police')
elseif job == "ambulance" then
TriggerEvent('ambulance:menu:ambulance')
elseif job == "mechanic" then
TriggerEvent('mechanic:menu:mechanic')
elseif job == "taxi" then
TriggerEvent('taxi:menu:taxi')
else
HksCore.Functions.Notify(' No tienes acceso a este menu', "error")
end
end)
RegisterKeyMapping('jobmenu', 'menu de EMS', 'keyboard', 'F5')
RegisterNetEvent('panic:hks', function()
job = HksCore.Functions.GetPlayerData().job.label
ExecuteCommand('entorno Alguien de la faccion '..job..' a pulsado el botón del panico')
end)