Files
rpemotes/client/Walk.lua
DogsGoBark d1339ba7de Various Fixes (#3)
* Update fxmanifest.lua

* Rename Config.lua to config.lua

* Update Walk.lua

* Update Syncing.lua

* Update Ragdoll.lua

* Update Keybinds.lua

* Update Emote.lua

* Update and rename Client/AnimationList.lua to client/AnimationList.lua

* Rename Client/Emote.lua to client/Emote.lua

* Rename Client/EmoteMenu.lua to client/EmoteMenu.lua

* Rename Client/Keybinds.lua to client/Keybinds.lua

* Rename Client/Ragdoll.lua to client/Ragdoll.lua

* Rename Client/Syncing.lua to client/Syncing.lua

* Rename Client/Walk.lua to client/Walk.lua

* Rename Server/Server.lua to server/Server.lua

* Rename Server/Updates.lua to server/Updates.lua
2021-12-19 02:36:55 +13:00

41 lines
919 B
Lua

function WalkMenuStart(name)
RequestWalking(name)
SetPedMovementClipset(PlayerPedId(), name, 0.2)
RemoveAnimSet(name)
end
function RequestWalking(set)
RequestAnimSet(set)
while not HasAnimSetLoaded(set) do
Citizen.Wait(1)
end
end
function WalksOnCommand(source, args, raw)
local WalksCommand = ""
for a in pairsByKeys(DP.Walks) do
WalksCommand = WalksCommand .. ""..string.lower(a)..", "
end
EmoteChatMessage(WalksCommand)
EmoteChatMessage("To reset do /walk reset")
end
function WalkCommandStart(source, args, raw)
local name = firstToUpper(args[1])
if name == "Reset" then
ResetPedMovementClipset(PlayerPedId()) return
end
if tableHasKey(DP.Walks,name) then
local name2 = table.unpack(DP.Walks[name])
WalkMenuStart(name2)
else
EmoteChatMessage("'"..name.."' is not a valid walk")
end
end
function tableHasKey(table, key)
return table[key] ~= nil
end