mirror of
https://github.com/jimathy/rpemotes.git
synced 2026-05-12 11:01:54 -04:00
28 lines
773 B
Lua
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
|