Files
rpemotes/client/Ragdoll.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

26 lines
544 B
Lua

local isInRagdoll = false
Citizen.CreateThread(function()
while true do
Citizen.Wait(10)
if isInRagdoll then
SetPedToRagdoll(PlayerPedId(), 1000, 1000, 0, 0, 0, 0)
end
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustPressed(2, Config.RagdollKeybind) and Config.RagdollEnabled and IsPedOnFoot(PlayerPedId()) then
if isInRagdoll then
isInRagdoll = false
else
isInRagdoll = true
Wait(500)
end
end
end
end)