๐๏ธ BLN RPS Game โ

๐บ Preview โ
๐ฐ Buy Now โ
Add an interactive Rock Paper Scissors game to your RedM server! Challenge nearby players to quick matches with animations, create engaging social interactions, and customize the game outcomes for your server's needs.
โจ Features โ
- ๐ฏ Proximity-based player challenges
- ๐ญ Synchronized animations for all players
- ๐ซ Sleek UI for game choices
- ๐ Automatic round system for ties
- โก Built-in cooldown system
- ๐ก๏ธ Anti-spam protection
- ๐จ Customizable notifications
- ๐ Developer API for game outcomes
Dependencies โ
โ๏ธ Installation โ
- Download the latest release
- Extract the files to your server's resource folder
- Add
ensure bln_rps_game
to yourserver.cfg
- Configure the settings in
config.lua
to your liking - Restart your server
๐ฎ Usage โ
The game can be initiated using:
/rps
- Starts a game request with a nearby player (within configured proximity)
Game Flow:
- Player uses command near another player
- Target player receives request notification
- If accepted, both players see the choice UI
- Players make their choices
- Animations play and results are shown
- Game either continues (tie) or ends with a winner
๐ ๏ธ Configuration โ
The config.lua
file allows you to customize various aspects of the game:
lua
Config = {
Settings = {
command = "rps", -- Command to start the game
proximityDistance = 3.0, -- Distance to detect nearby players
animationDelay = 3000, -- Delay before showing animations
resultDelay = 1000, -- Delay before showing results
cooldownTime = 60, -- Seconds before playing again
enableCooldown = true, -- Enable/disable cooldown system
defaultDuration = 7000 -- Default notification duration
},
-- Customize all notification messages
Notifications = {
alreadyInGame = {
title = "Game in Progress",
description = "You are already in a game!",
placement = "middle-right",
type = "ERROR"
},
-- More notification configurations...
},
-- Customize result messages
ResultMessages = {
win = "You won! Your opponent chose %s",
lose = "You lost! Your opponent chose %s",
tie = "It's a tie! Both chose %s. Playing another round!"
}
}
๐ป Developer API โ
Export Functions โ
lua
-- Get all active games
exports.bln_rps_game:GetActiveGames()
-- Check if a player is in game
exports.bln_rps_game:IsPlayerInGame(playerId)
Game Finished Event โ
The script fires a server event when each game concludes that you can listen to in any resource:
lua
-- shared/custom.lua
RegisterNetEvent('bln_rps_game:gameFinished')
AddEventHandler('bln_rps_game:gameFinished', function(winner, loser, winnerChoice, loserChoice)
-- Add your custom logic here
-- Examples:
-- - Give rewards to winner
-- - Track statistics
-- - Trigger other game systems
-- - Add gambling functionality
end)
Example: Adding Rewards โ
lua
-- shared/custom.lua
RegisterNetEvent('bln_rps_game:gameFinished')
AddEventHandler('bln_rps_game:gameFinished', function(winner, loser, winnerChoice, loserChoice)
-- Example: Give winner 10 cash
exports.framework:giveCash(winner, 10)
-- Example: Track wins in database
exports.framework:updatePlayerStats(winner, 'rps_wins')
end)
๐ง Technical Details โ
UI System โ
- Clean HTML/CSS interface for player choices
- Responsive design with hover effects
- Easy to customize appearance
Cooldown System โ
- Prevents spam and abuse
- Configurable duration
- Server-side validation
- Automatic cleanup of expired cooldowns
๐ค Support โ
Need help? Have questions? Join our Discord server for support and updates!
- ๐ฌ Discord: Join Here
- ๐ฎ Live support and community help
- ๐ Regular updates and improvements