Easily integrate the Top-Games voting system to your RedM server and reward your players in real time with authentic western rewards.
Download the latest version of the plugin from our GitHub repository. The same plugin works for FiveM and RedM.
Download v3
Extract and copy the contents of the cfx-vote-plugin
folder into your RedM server's resources/vote
directory.
resources/vote
Get your token from the Top-Games panel.
Add the following lines to your server.cfg
file:
ensure vote
set vote_token "YOUR_TOKEN_HERE"
Enable the "Vote Plugin v3" in your Top-Games panel. You can test the plugin by clicking on "Test connectivity" and simulate a vote.
The plugin automatically triggers the onPlayerVote
event when a player votes for your RedM server.
-- Basic usage example for RedM
AddEventHandler('onPlayerVote', function(playername, date)
print('New vote received on RedM server!')
print('Cowboy: ' .. playername)
print('Date: ' .. date)
-- Add your western reward logic here
end)
-- VORP Framework specific configuration
local VORP = exports.vorp_core:GetCore()
TriggerEvent("getCore", function(core)
VORP = core
end)
AddEventHandler('onPlayerVote', function(playerid, date)
local User = VORP.getUser(playerid)
if User then
local Character = User.getUsedCharacter
local name = Character.firstname .. " " .. Character.lastname
print("Vote received from: " .. name)
-- Cash and gold reward
Character.addCurrency(0, 50.0) -- Cash
Character.addCurrency(1, 2.0) -- Gold
-- VORP notification
TriggerClientEvent("vorp:TipRight", playerid, "Thank you for your vote! +$50 and 2 Gold", 4000)
end
end)
resources/
ensure vote
line is in server.cfg
server.cfg
AddEventHandler
print()
to debugNeed help configuring the plugin on RedM? Our team knows the western universe.