Skip to content

Commit

Permalink
refactor(client): release anims
Browse files Browse the repository at this point in the history
* refactor(client): release anims

* fix(server): linter errors
  • Loading branch information
solareon authored Jun 24, 2024
1 parent 6fe6695 commit 4a7e98c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions client/powerstation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ RegisterNetEvent('thermite:UseThermite', function()
if dist < 1.5 then
if CurrentCops >= config.minThermitePolice then
if not powerStationConfig[closestStation].hit then
lib.requestAnimDict('weapon@w_sp_jerrycan')
TaskPlayAnim(cache.ped, 'weapon@w_sp_jerrycan', 'fire', 3.0, 3.9, 180, 49, 0, false, false, false)
lib.playAnim(cache.ped, 'weapon@w_sp_jerrycan', 'fire', 3.0, 3.9, 180, 49, 0, false, false, false)
SetNuiFocus(true, true)
SendNUIMessage({
action = 'openThermite',
Expand All @@ -65,8 +64,7 @@ RegisterNetEvent('thermite:UseThermite', function()
TriggerServerEvent('evidence:server:CreateFingerDrop', pos)
if CurrentCops >= config.minThermitePolice then
currentGate = CurrentThermiteGate
lib.requestAnimDict('weapon@w_sp_jerrycan')
TaskPlayAnim(cache.ped, 'weapon@w_sp_jerrycan', 'fire', 3.0, 3.9, -1, 49, 0, false, false, false)
lib.playAnim(cache.ped, 'weapon@w_sp_jerrycan', 'fire', 3.0, 3.9, -1, 49, 0, false, false, false)
SetNuiFocus(true, true)
SendNUIMessage({
action = 'openThermite',
Expand Down
3 changes: 1 addition & 2 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ local config = require 'config.server'
local sharedConfig = require 'config.shared'
local robberyBusy = false
local timeOut = false
local ITEMS = exports.ox_inventory:Items()

--- This will convert a table's keys into an array
--- @param tbl table
Expand Down Expand Up @@ -395,7 +394,7 @@ end)
lib.callback.register('thermite:server:check', function(source)
local player = exports.qbx_core:GetPlayer(source)
if not player then return false end
if exports.ox_inventory:RemoveItem(src, 'thermite', 1) then
if exports.ox_inventory:RemoveItem(source, 'thermite', 1) then
return true
else
return false
Expand Down

0 comments on commit 4a7e98c

Please sign in to comment.