Done, now your minigame should be used for cigar production!
By default state:
--- Function to start a minigame inside Prison for specific interaction place/task.--- @param zoneId number Unique zone identifier--- @param place string Place type to start minigame forfunctionStartMinigame(zoneId,place) dbg.debug('Starting minigame for zoneId (%s) as place type: (%s)\nFunction path: modules/base/client/api/cl-minigames.lua', zoneId, place)if place == MINIGAME_PLACE_TYPE.CIGAR thenStartCigarProduction( Config.Minigame.Steps or5, Config.Minigame.TimeAcc or0.3, Config.Minigame.AnimDict, Config.Minigame.AnimName, function() PlaySoundFrontend(-1, "PICKUP_WEAPON_BALL", "HUD_FRONTEND_WEAPONS_PICKUPS_SOUNDSET", 0)TriggerServerEvent('rcore_prison:server:requestCigarProductionReward', zoneId) dbg.debug('RCore Minigame success!')end, function() dbg.debug('RCore Minigame failed!')end )endend
PS UI Example:
--- Function to start a minigame inside Prison for specific interaction place/task.--- @param zoneId number Unique zone identifier--- @param place string Place type to start minigame forfunctionStartMinigame(zoneId,place) dbg.debug('Starting minigame for zoneId (%s) as place type: (%s)\nFunction path: modules/base/client/api/cl-minigames.lua', zoneId, place)if place == MINIGAME_PLACE_TYPE.CIGAR then exports['ps-ui']:Circle(function(success)if success thenTriggerServerEvent('rcore_prison:server:requestCigarProductionReward', zoneId)elseprint("fail")endend, 2, 20) -- NumberOfCircles, MSendend