mirror of
https://github.com/jimathy/jim-consumables.git
synced 2026-08-17 06:26:03 +01:00
Fixes player being stuck when consuming
This commit is contained in:
@@ -68,15 +68,17 @@ RegisterNetEvent('jim-consumables:Consume', function(itemName)
|
||||
end
|
||||
--Emote Stuff
|
||||
if Config.Debug then print("^5Debug^7: ^3Consume^7: ^2Grabbing Emote Animation Options^7...") end
|
||||
if emote.AnimationOptions then
|
||||
if emote.AnimationOptions.EmoteLoop then MovementType = 1
|
||||
elseif emote.AnimationOptions.EmoteMoving then MovementType = 51
|
||||
elseif emote.AnimationOptions.EmoteMoving == false then MovementType = 0
|
||||
elseif emote.AnimationOptions.EmoteStuck then MovementType = 50 end
|
||||
else MovementType = 0 end
|
||||
local InVehicle = IsPedInAnyVehicle(Player, true)
|
||||
if Config.Debug then print("^5Debug^7: ^3Consume^7: ^Player is in a vehicle^7..."..json.encode(InVehicle).." ") end
|
||||
if Config.Debug then print("^5Debug^7: ^3Consume^7: ^2Checking if player is in a vehicle^7...") end
|
||||
local InVehicle = IsPedInAnyVehicle(Player, true)
|
||||
if InVehicle == 1 then MovementType = 51 end
|
||||
if InVehicle == 1 then MovementType = 51
|
||||
elseif emote.AnimationOptions then
|
||||
if emote.AnimationOptions.EmoteMoving then MovementType = 51
|
||||
elseif emote.AnimationOptions.EmoteLoop then MovementType = 1
|
||||
elseif emote.AnimationOptions.EmoteStuck then MovementType = 50
|
||||
elseif emote.AnimationOptions.EmoteMoving == false then MovementType = 0
|
||||
end
|
||||
end
|
||||
--Load and Start animation
|
||||
if Config.Debug then print("^5Debug^7: ^3Consume^7: ^2Playing Animation^7...") end
|
||||
loadAnimDict(animDict)
|
||||
|
||||
Reference in New Issue
Block a user