Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(client): release anims #23

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading