Rankings
Search
Advanced search Ctrl + K to open search

RedM Vote Plugin

Easily integrate the Top-Games voting system to your RedM server and reward your players in real time with authentic western rewards.

RedM Compatible
Real time
Framework compatible

Installation

1
Download the plugin

Download the latest version of the plugin from our GitHub repository. The same plugin works for FiveM and RedM.

Download v3
2
Copy to resources

Extract and copy the contents of the cfx-vote-plugin folder into your RedM server's resources/vote directory.

resources/vote
3
Get the token

Get your token from the Top-Games panel.

4
Configure server.cfg

Add the following lines to your server.cfg file:

ensure vote
set vote_token "YOUR_TOKEN_HERE"
5
Enable the plugin

Enable the "Vote Plugin v3" in your Top-Games panel. You can test the plugin by clicking on "Test connectivity" and simulate a vote.

Configuration and usage

Vote event

The plugin automatically triggers the onPlayerVote event when a player votes for your RedM server.

vote-handler.lua
-- 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)
Example with VORP Framework
vote-vorp.lua
-- 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)

Troubleshooting

  • Check that the folder is properly placed in resources/
  • Make sure the ensure vote line is in server.cfg
  • Restart your RedM server completely
  • Check the server logs for specific errors

  • Check that your token is correct in server.cfg
  • Enable the "Vote Plugin v3" in your Top-Games panel
  • Make sure your RedM server is accessible from the Internet
  • Test with a manual vote from Top-Games

  • Check the syntax of your AddEventHandler
  • Make sure your script containing the handler is properly loaded
  • Test with a simple print() to debug
  • Check compatibility with your RedM framework

  • Check that your framework (RSGCore, VORP, etc.) is properly installed
  • Adapt functions according to your specific framework
  • Consult your RedM framework documentation
  • Test without framework first to isolate the problem
Information
Version: v3 (Latest)
Compatibility: RedM
Frameworks: RSGCore, VORP, RedEM:RP
Support

Need help configuring the plugin on RedM? Our team knows the western universe.