Files
rpemotes/client/Ragdoll.lua
Clément RICATTE 5185d46153 fix: 🐛 fix typo
thanks @MichaelCoding25 for pointing it out
2022-08-27 11:25:42 +02:00

28 lines
773 B
Lua

if Config.RagdollEnabled then
RegisterCommand('+ragdoll', function(source, args, raw) Ragdoll() end)
RegisterCommand('-ragdoll', function(source, args, raw) StopRagdoll() end)
RegisterKeyMapping("+ragdoll", "Ragdoll your character", "keyboard", Config.RagdollKeybind)
local stop = true
function Ragdoll()
if Config.RagdollAsToggle then
stop = not stop
else
stop = false
end
while not stop do
local ped = PlayerPedId()
if IsPedOnFoot(ped) then
SetPedToRagdoll(ped, 1000, 1000, 0, 0, 0, 0)
end
Wait(10)
end
end
function StopRagdoll()
if Config.RagdollAsToggle then return end
stop = true
end
end