Event and Exports
START PUZZLE EVENT
TriggerEvent('bp_vehiclepuzzle:startPuzzle', puzzleData)
puzzleData = {
type = 'middle' ---------------> 'small', 'middle', 'big' 3 map select
point = 0 ---------------> Points that can be earned
timer = second (example 120s) 2 munite
level = Level 1 to 5
callback = If it is true, a callback notification such as a progress bar or minigame will appear.
If you leave all information blank except for the type, everything will be generated randomly.
TriggerEvent('bp_vehiclepuzzle:startPuzzle', {type = "middle"})
In this example, it creates a random level on the middle map, and there is no time or score.
PUZZLE CALLBACK
TriggerEvent('bp_vehiclepuzzle:startPuzzle', {
type = 'middle',
timer = 120,
point = 0,
level = 1,
callback = true
}, function(success)
if success then
TriggerEvent('bp_vehiclepuzzle:notify', "Congratulations on completing the minigame", 2000, 'base', "success")
else
TriggerEvent('bp_vehiclepuzzle:notify', "Sorry, the minigame failed.", 2000, 'base', "error")
end
end)
ADMIN PART EVENT
TriggerEvent('bp_vehiclepuzzle:openAdoCreate')
Last updated