π₯Top Serveurs
π³οΈ Top-Serveurs Vote System β In-Game Voting & Rewards
β‘ Getting Started
Players can vote for your server on Top-Serveurs directly from in-game, and instantly receive configurable rewards.
π¬ How to Open the Vote Menu
1. By Command
Enabled by default (
Config.enable_command = true)Players use the command set in
Config.command(default:/vote)
2. Client Event
TriggerEvent("redrp-bt:showVoteUi")3. Server Event
TriggerClientEvent("redrp-bt:showVoteUi", source)βοΈ Configuration Example (config.lua)
config.lua)Config = {}
Config.serverToken = "..." -- Your Top-Serveurs token
Config.serverURL = "https://top-serveurs.net/rdr/vote/your-server-name"
Config.DiscordWebhook = "" -- Discord webhook for staff notifications
Config.DiscordName = "BT_TOPSERVER"
Config.enable_command = true
Config.command = "vote"
Config.enable_client_side = true
Config.client_function = 'redrp-bt:showVoteUi'
Config.NotifyAllPlayersOnVote = true -- Notify everyone when someone votes
-- Leaderboard config
Config.MaxVotersToDisplay = 5 -- Number of top voters in leaderboard
Config.LeaderboardRefreshInterval = 120 -- Minutes between leaderboard announcements
Config.Txt = {
VoteForUs = "Vote for Western Raiders",
AlreadyVoted = "Your vote has already been rewarded, thank you :)",
WinMoneyGold = "Thank you for your vote, here is your reward: %d %s",
WinWeapon = "Thank you for your vote, congratulations, here is a weapon: %s",
WinItem = "Thank you for your vote, you have won: %d %s",
VoteAgain = "You can vote again on Top-Serveurs",
NotifyAll = "%s has voted for the server! (/vote)",
LeaderBoardTitle = "**π Top Voters Leaderboard π**\n\n",
LeaderBoardPlayer = "**%d.** `%s` β **%d votes**\n"
}π Rewards Structure
Set up your reward chances and prize pools in Config.Prices:
You can edit, remove, or add as many rewards as you want.
All labels and items/weapons must match your serverβs inventory and database.
π Leaderboard
Displays top voters in-game
Number of voters and refresh interval are configurable:
Config.MaxVotersToDisplayConfig.LeaderboardRefreshInterval(minutes)
π§ Notification System
SendValidNotification: Called when a player wins a reward.
SendErrorNotification: Called when the player has already been rewarded for their vote.
SendInfoNotification: Used for generic info (e.g., can vote again soon).
Discord Logging: All votes/rewards can be logged to your Discord using your webhook.
π Notes
All menu texts, reward messages, and notifications are configurable in
Config.Txt.Notifying all players on each vote is enabled/disabled by
Config.NotifyAllPlayersOnVote.No SQL setup is required for basic operation, but leaderboard or advanced logging may require persistent storage.
For leaderboard and multi-vote support, ensure your identifiers and data saving logic are implemented correctly.
Last updated