Hi there, I am newer to coding and only been doing it for a couple of months. I am currently working on a emote script that uses props and flags for upper body only. Now this is what I’ve come up with.
This is my table for right now.
local emote = {
["clipboard"] = {
animDict = "move_m@clipboard",
animName = "idle",
speed = 8,
speedX = -8,
duration = -1,
flags = 49
},
["box"] = {
animDict = "anim@heists@box_carry@",
animName = "idle",
speed = 8,
speedX = -8,
duration = -1,
flags = 49,
},
}
I haven’t began to add props since I cannot seem to get anything but a nil value when I run this function.
function playEmote(animDict, animName, speed, speedX, duration, flags)
if not DoesEntityExist(GetPlayerPed(-1)) then
return false
end
loadAnimDict(emote[name][animDict])
TaskPlayAnim(GetPlayerPed(-1), animDict, animName, speed, speedX, duration, flags, 0, 0, 0, 0)
return true
end
This is how I am running the function
if playEmote(emote[name][animDict], emote[name][animName], emote[name][speed], emote[name][speedX], emote[name][duration], emote[name][flags]) then
end
I know I am missing something, maybe a “for loop” that returns all the index in the first table as name? I’ve tried googling it but cannot seem to find the answer. Any help would be awesome!
, thanks a bunch as well