1
0
Fork 0
forked from Simnation/Main
Main/resources/[carscripts]/slashtires/bridge/framework/standalone/client.lua
2025-06-07 08:51:21 +02:00

17 lines
580 B
Lua

---Checks if the player can slash tires
---@return boolean canPlayerSlash
---@return string|nil reason nil if canPlayerSlash is true
function CanPlayerSlashTires()
local playerPed = PlayerPedId()
if IsPedDeadOrDying(playerPed, true) then
return false, 'is_dead'
end
-- Checks if the ped has the CPED_CONFIG_FLAG_IsHandCuffed flag or is playing a cuffed anim
if GetPedConfigFlag(playerPed, 120, true) or IsEntityPlayingAnim(playerPed, 'mp_arresting', 'idle', 3) then
return false, 'is_handcuffed'
end
return true
end