About | Features | Technologies | Requirements | Usage | Further Links | License | Author
ESX Badges is an easy tool to let your players show their affiliation with agencies and firms. You can easily create your own badges and id cards. It is based on the jsfour ID-Card System by jonassvensson4. You can easily create your own id cards with the image tool of your choice.
✔️ easy to use;
✔️ easy to customize;
✔️ lightweight;
The following tools were used in this project:
Before starting, you need to have a Running FiveM Server, a MySQL Connector (e.g. ox-mysql or mysql-async) and a running version of the ESX Framework installed.
To use the script you need to add the events to a client-side file of your choice and incorporate it in a menu of your choice.
The event has the following format:
TriggerServerEvent('esx_badges:open', showingPlayer, targetPlayer, job)
It is possible to trigger this event either from client-side or from server-side
Example:
-- Show your badge to someone (as a police officer)
closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestDistance ~= -1 and closestDistance <= 3.0 then
TriggerServerEvent('esx_badges:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer), "police")
else
ESX.ShowNotification("No players nerby.")
end
-- Look at your own badge
TriggerServerEvent('esx_badges:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), "police")
This project is under license from MIT. For more details, see the LICENSE file.
Made with ❤️ by derBalou