Skip to content

wweziza/SAM-scoreboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAM scoreboard

SA-MP scoreboard for FiveM, you can adjust it anywhere.

Screenshot 1 Screenshot 1
Screenshot 2 Screenshot 2

Usage

It's plug and play, just make sure to ensure it on your server.cfg. Press 'Y' to show the scoreboard and for closing it, you can adjust it later in configuration or just edit the script (for now)

Callback

Every functions trigger server event called

AddEventHandler('SAM-scoreboard:Server:onScoreboardPlayerClicked', function(clickedPlayerId, clickedPlayerName, clickedPlayerPing)end)

You can listen the event in any other resource by adding this on your any resource files (make sure you put the SAM-scoreboard in top of your resources that you want to listen to)

RegisterNetEvent('SAM-scoreboard:Server:Custom:onScoreboardPlayerClicked')
AddEventHandler('SAM-scoreboard:Server:Custom:onScoreboardPlayerClicked', function(clickedPlayerId, clickedPlayerName, clickedPlayerPing)
    -- Handle the event here
    print("Received player click event in Example resource. Player ID: " .. clickedPlayerId .. ", Name: " .. clickedPlayerName .. ", Ping: " .. clickedPlayerPing)
end)

TODO

Configuration for the job, factions or gangs (it will give the player specific color based on their jobs or factions)

Feel free to open an issue, and contribute are welcomed.