diff --git a/client/client.lua b/client/client.lua index de7e078..3e617f3 100644 --- a/client/client.lua +++ b/client/client.lua @@ -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)