19 lines
		
	
	
	
		
			557 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			557 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
| ---Checks if the player can slash tires
 | |
| ---@return boolean canPlayerSlash
 | |
| ---@return string|nil reason nil if canPlayerSlash is true
 | |
| function CanPlayerSlashTires()
 | |
|     local playerState = LocalPlayer.state
 | |
|     if playerState.dead then
 | |
|         return false, 'is_dead'
 | |
|     end
 | |
| 
 | |
|     if playerState.gettingCuffed or playerState.isCuffed then
 | |
|         return false, 'is_handcuffed'
 | |
|     end
 | |
| 
 | |
|     if playerState.invBusy or playerState.handsUp or playerState.isCuffing then
 | |
|         return false, 'generic_fail_reason'
 | |
|     end
 | |
| 
 | |
|     return true
 | |
| end
 | 
