转化为ox_lib格式
exports['mythic_progbar']:Progress({
name = "using",
duration = GetOptions("RobTime") * 1000,
label = 'Robbing ATM',
useWhileDead = false,
canCancel = true,
controlDisables = {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}
}, function(cancelled)
if not cancelled then
TriggerServerEvent("szi_atmrobbery:success")
taken = taken + 1
FinishHacking(true)
else
ClearPedTasks(PlayerPedId())
cancontinue = false
taken = 0
Cooldown(true)
end
end)转化为ox_lib格式
ox_lib['mythic_progbar'].Progress({
name = "using",
duration = ox_lib.GetOptions("RobTime") * 1000,
label = 'Robbing ATM',
useWhileDead = false,
canCancel = true,
controlDisables = {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}
}, function(cancelled)
if not cancelled then
ox_lib.TriggerServerEvent("szi_atmrobbery:success")
taken = taken + 1
FinishHacking(true)
else
ClearPedTasks(PlayerPedId())
cancontinue = false
taken = 0
Cooldown(true)
end
end)
页:
[1]