Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Read Me

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

ESX.UI.Menu.

Open(
'default', GetCurrentResourceName(), 'id_card_menu',
{
title = 'id_card_menu',
elements = {
{label = 'Check your ID', value = 'checkID'},
{label = 'Show your ID', value =
'showID'},
{label = 'Check your driver license',
value = 'checkDriver'},
{label = 'Show your driver license',
value = 'showDriver'},
{label = 'Check your firearms license',
value = 'checkFirearms'},
{label = 'Show your firearms license',
value = 'showFirearms'},
}
},
function(data, menu)
local val = data.current.value

if val == 'checkID' then


TriggerServerEvent('jsfour-idcard:open',
GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()))
elseif val == 'checkDriver' then
TriggerServerEvent('jsfour-idcard:open',
GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'driver')
elseif val == 'checkFirearms' then
TriggerServerEvent('jsfour-idcard:open',
GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'weapon')
else
local player, distance =
ESX.Game.GetClosestPlayer()

if distance ~= -1 and distance <= 3.0 then


if val == 'showID' then
TriggerServerEvent('jsfour-
idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(player))
elseif val == 'showDriver' then
TriggerServerEvent('jsfour-idcard:open',
GetPlayerServerId(PlayerId()), GetPlayerServerId(player), 'driver')
elseif val == 'showFirearms' then
TriggerServerEvent('jsfour-idcard:open',
GetPlayerServerId(PlayerId()), GetPlayerServerId(player), 'weapon')
end
else
ESX.ShowNotification('No players nearby')
end
end
end,
function(data, menu)
menu.close()
end
)

Nandor_101
Apr '20
How can I get a weapon license?

11 DAYS LATER

dieselpowerl

You might also like