[Release] jsfour-idcard [ESX]

EDIT- Nevermind.

when my friend show id card i see my face not my friend face ? you know something to fix it?

Hello,I use your jsfour-idcard,and I’ve got a question with it.Where can I change the name distance,and the photo size? Capture

Låtom nem csak én vagyok Magyar ebben a topicban. A szöveg elhelyezésére igazåból annyi ötletem van, hogy a css-ben írd åt a margin részeket.

How to make key for the whole Menu?
Should I change jsfour-idcard:open with id_card_menu here:?

- Key events
Citizen.CreateThread(function()
	while true do
		Wait(0)
		-- Controls found in the FiveM docs:
		-- https://docs.fivem.net/game-references/controls/

		-- 38 = E
		if IsControlJustReleased(0, 166) then
			-- (Taken from the Usage-guide on the GitHub page)
			-- Look at your own ID-card
			TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()))
		end
		if IsControlJustReleased(0, 322) and open or IsControlJustReleased(0, 177) and open then
			SendNUIMessage({
				action = "close"
			})
			open = false
		end
	end
end)

A kĂ©pet sikerĂŒlt beĂĄllĂ­tani az “id-card” margin rĂ©sznĂ©l,de a mĂĄsik margin rĂ©sz nem csak a nevet mozgatja,hanem az összes többi adatot is :frowning:
The image could be set in the “id-card” margin section, but the other margin section not only moves the name but also all other data :frowning:

may you send me?

Hello, how could I do so that when the police register you, they will take your ID card directly with the police menu?

Not too famulair with the resource, however im pretty sure u can trigger the event where it would show the ID card, whenever the police registers the individual.

It is what I am trying but what happens to me is that when I select identity document from the police menu, I show my ID card to the subject or just look at mine.
May you help me please?

remove use essential mode then reimport

How to Open Menu.
Just copy and paste the following code between this code:

if IsControlJustReleased(0, 166) then
            -- (Taken from the Usage-guide on the GitHub page)
            -- Look at your own ID-card
            -- Paste Menu code in here
end

Copy this Code Menu ./.

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
			)

How can I get a weapon license?

I am looking for a script or a way to get the weapon license. Could anyone suggest a way in which I would be able to get it? I haven’t figured out if it is implemented in this script


Hello i’m having this error:
Error loading script server/main.lua in resource esx_identity: @esx_identity/server/main.lua:159: attempt to call a nil value (field ‘RegisterCommand’)
stack traceback:
@esx_identity/server/main:lua:159 in main chunk
faild to load script server/main.lua

Can anybody help

1 Like

Hey all,

I have a localhost server. I am looking to install and set up the ESX Extended to get /register, bank account, jobs, etc

I cannot download it anymore from GIT as you may know.
Can anyone of you have it somewhere and can send me a zip of it ?

All my other scripts are blocked by the absence of Extended on the SQL.

Thank you
AiBee

I keep falling trough the ground? Can somebody help?

Hi, thx for the share but i would like to be able to create the identity card in item and to be able to show it from the inventory an idea of comment I will be able to make?

Which folder/file do I add this code to?

local open = false
local ESX  = nil

-- ESX
-- Added this so you can include the rest of the Usage-stuff found on the GitHub page
Citizen.CreateThread(function()
	while ESX == nil do
		TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
		Citizen.Wait(0)
	end
end)

-- Open ID card
RegisterNetEvent('jsfour-idcard:open')
AddEventHandler('jsfour-idcard:open', function( data, type )
	open = true
	SendNUIMessage({
		action = "open",
		array  = data,
		type   = type
	})
end)

-- Key events
Citizen.CreateThread(function()
	while true do
		Wait(0)
		-- Controls found in the FiveM docs:
		-- https://docs.fivem.net/game-references/controls/

		-- 38 = E
		if IsControlJustReleased(0, 38) then
			-- (Taken from the Usage-guide on the GitHub page)
			-- Look at your own ID-card
			TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()))
		end
		if IsControlJustReleased(0, 322) and open or IsControlJustReleased(0, 177) and open then
			SendNUIMessage({
				action = "close"
			})
			open = false
		end
	end
end)

is this working on newest esx?