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 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
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
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)
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.
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