Standalone Arm Wrestling Minigame
This script offers a unique and engaging arm wrestling minigame, inspired by the mechanics seen in The Outlast Trials. Perfectly designed for developers looking to add a competitive and immersive feature to their projects.
Features:
- Smooth Animations: Delivering a polished and realistic gameplay experience.
- Three Unique Arm Wrestling Tables: Choose from various table designs to add variety to your scenes.
- Robust Synchronization: Ensures flawless multiplayer interactions for a seamless gaming experience.
- Optimized and Performant Codebase: Built with performance and efficiency in mind, guaranteeing smooth integration into your project.
- Easy Framework Adaptation: Simple to implement with minimal adjustments required for your existing framework.
Exposed functions:
- Adding interaction for arm wrestling tables
- Custom notifications
- OnArmWrestlingStart/OnArmWrestlingEnd functions client/server side
- Run minigame export
- Editable locales
Config
-----------------
-- CLIENT SIDE --
-----------------
-- Arm Wrestling interaction will be registered for supported models
-- Allowed objects: 'bkr_prop_clubhouse_arm_wrestle_01a', 'bkr_prop_clubhouse_arm_wrestle_02a', 'prop_arm_wrestle_01'
Config.RegisterInteractionForModels = true
-- Locale configuration - these strings will be displayed to players during arm wrestling
-- won: Shown when player wins the match
-- lost: Shown when player loses the match
-- go_away: Instruction for player to go away from the arm wrestling table
-- hit: Instruction for player action during the match
Config.Locale = {
['won'] = 'You won!',
['lost'] = 'You lost!',
['go_away'] = 'Go away',
['hit'] = 'Hit',
['table_busy'] = 'Table is busy!',
}
-----------------
-- SERVER SIDE --
-----------------
-- TargetsData configuration - defines scoring points for different zones in arm wrestling
-- Higher values = more points/greater advantage when hit
-- Lower values = fewer points/smaller advantage when hit
Config.TargetsData = {
[0] = 0.35, -- white zone - Highest scoring zone (biggest advantage)
[1] = 0.20, -- red zone - High scoring
[2] = 0.125, -- orange zone - Medium scoring
[3] = 0.10, -- yellow zone - Low scoring
[4] = 0.09, -- less yellow zone - Very low scoring
[5] = 0.06, -- pale yellow zone - Lowest scoring (smallest advantage)
}
Open LUA files
-----------------
-- CLIENT SIDE --
-----------------
--- @param models string[]
function AddInteractionToModel(models)
exports.ox_target:addModel(models, {
label = 'Siłowanie na rękę',
icon = 'fa-solid fa-hand-back-fist',
distance = 2.0,
canInteract = function(entity, distance, coords, name, bone)
if activeSession then return false end
if isPlayerBusy then return false end
local playerPed = PlayerPedId()
if IsPedRagdoll(playerPed) then return false end
if IsPedInAnyVehicle(playerPed) then return false end
return true
end,
onSelect = function(data)
StartArmWrestling(data.entity)
end
})
end
function ShowNotification(msg, _type, time)
lib.notify({
description = msg,
type = _type,
duration = time
})
end
--- Function called when arm wrestling match starts
function OnArmWrestlingStart()
-- Add your custom code here for when arm wrestling starts
-- For example:
-- TriggerEvent('custom:armwrestling:started')
end
--- Function called when arm wrestling match ends
function OnArmWrestlingEnd()
-- Add your custom code here for when arm wrestling ends
-- For example:
-- TriggerEvent('custom:armwrestling:ended')
end
-----------------
-- SERVER SIDE --
-----------------
--- Function called when arm wrestling match starts
--- @param players integer[] Array of player IDs participating in the match
function OnArmWrestlingStart(players)
-- Add your custom code here for when arm wrestling starts
-- For example:
-- TriggerEvent('custom:armwrestling:started', players)
end
--- Function called when arm wrestling match ends
--- @param winner integer Winner player ID
--- @param loser integer Loser player ID
function OnArmWrestlingEnd(winner, loser)
-- Add your custom code here for when arm wrestling ends
-- For example:
-- TriggerEvent('custom:armwrestling:ended', winner, loser)
end
Available tables:
Preview video 
Any questions? Contact us on our Discord
Price: $20 + TAX
Take your game to the next level with this fun and interactive feature!
Code is accessible | No |
Subscription-based | No |
Lines | 3700+ LUA, 900+ VUE |
Requirements | ox_lib(optional) |
Support | Yes |