Skip to content

derBalou/esx_badges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Esx_badges

 

ESX Badges

Github top language Github language count Repository size License

About   |   Features   |   Technologies   |   Requirements   |   Usage   |   Further Links   |   License   |   Author


🎯 About

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.

✨ Features

✔️ easy to use;
✔️ easy to customize;
✔️ lightweight;

🚀 Technologies

The following tools were used in this project:

✅ Requirements

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.

🔧 Usage

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

🏁 Further Links

📝 License

This project is under license from MIT. For more details, see the LICENSE file.

Made with ❤️ by derBalou

 

Back to top