[Release] ID Card [LVOS]

[LVOS] id-card


Allows to retrieve the information of a player and transmit them to the needs

GUI ID Card

Required

  • EssentialMode 2.X (SQL Version)
  • MYSQL Async
  • Optional : es_freeroam (For notification)
  • Optional : Job System

Download :

My vision of things

This resource lets you open a door. You have to adapt it, or improve it as you see fit. The fact that I that it is not “more” complete is wanted. Many people already have their systems installed. In spite of this this resource will be adapted for the others that I would put online.

How to install

  • Download resources on github
  • Add it to the resources folder
  • Add ‘- id-card’ to AutoStartResources in citmp-server.yml
  • Adapt the script to your resources (Request(s), Notification(s))
  • Watch the events and use as you see fit
  • Its goooooooood

ID Card features

  • Allows display of ID cards
  • Event for transmitting data
  • Displaying a GUI for ID cards

The texts are in French but I have put comments in English and French. This is fairly simple French.

I would also like to point out that I would not help people who do not have a minimum of knowledge. Not because I do not feel like it, but because I do not have the time right now. So I can not be there to help everyone, I rely on the community to help each other :slight_smile: Just a Prevention

What is LVOS?

This is the diminutive of Los Vanilla Open Source, it is simply the category where I would share the codes of the server Los Vanilla, my server. I will share server codes. Just a kind of signature :slight_smile:

10 Likes

Thanks for your share :slight_smile: I’m gonna make a check at this for sure :slight_smile:

/bow

PS : no /inspect ID to check the Id card right ? It get the closest player ?

1 Like

No there is no command to do, just functions to use, I will soon release another resource that may be helping you :slight_smile:

2 Likes

Love your script. Could you give an example of trigger please ? :slight_smile:

Awesome job !

No problem for get id_card on each player, but can’t get the donnercarte working, it says
“Error: ScriptEnvironment : :TriggerEvent: Error executing event handler for event id_card:donnercarte in resource id_card: Nombre de paramètres incorrects.”

I call the donnercarte with

function show_id_card()
TriggerServerEvent(‘id_card:donnercarte’)
end

Any idea ? Thanks :slight_smile:

That’s because you need to supply the “toPlayer”

RegisterServerEvent('id_card:donnercarte')
AddEventHandler('id_card:donnercarte', function(toPlayer)
	TriggerEvent('es:getPlayerFromId', source, function(user)
		TriggerEvent('es:getPlayerFromId', toPlayer, function(user2)
			local user2Identifier = user.identifier
			-- FR -- Il faut adapter la requête -- EN -- You have to adapt the query
			-- FR -- Actuellement le numéro de téléphone est "user_id" c'est une valeur AUTO_INCREMENT-- EN -- Currently the phone number is "user_id"
			executed_query = MySQL:executeQuery("SELECT * FROM `users` INNER JOIN jobs ON users.job = jobs.job_id WHERE identifier = '@identifier'", {['@identifier'] = user2Identifier})
			result4 = MySQL:getResults(executed_query, {'nom','job_name','user_id'})
			TriggerClientEvent('id_card:envoyer', toPlayer, result4)
		end)
	end)
end)

I’m starting with lua, what do you mean with supply “toPlayer” ?

for showing id_card, i have

function get_id_card()
TriggerServerEvent(‘id_card:getinfos’)
end

and i don’t supply “source” for this event and it work…

That’s because that event doesn’t take any parameters. Please read the documentation (comments) for this addon if you want to know how to use the events.

2 Likes

@Morsonn_Music

This allows to see how to use the functions to inspect, give or read his card

@ChaosNighT As said Ravage everything is indicated in comment, the event getinfos is used to retrieve the information of the user (source) it does not ask for parameters

1 Like

working on fxserver , es4 ?

how do i open the menus or popups?

Can i use this with ESX?