#Qbcore
1 messages · Page 1 of 1 (latest)
RegisterCommand('+ragdoll', function() Ragdoll() end, false)
RegisterCommand('-ragdoll', function() StopRagdoll() end, false)
RegisterKeyMapping("+ragdoll", "Ragdoll your character", "keyboard", Config.RagdollKeybind)
local stop = true
function Ragdoll()
if IsInAnimation then return end
local ped = PlayerPedId()
if not IsPedOnFoot(ped) then return end
if Config.RagdollAsToggle then
stop = not stop
else
stop = false
end
while not stop do
SetPedToRagdoll(ped, 1000, 1000, 0, false, false, false)
Wait(0)
end
end
function StopRagdoll()
if Config.RagdollAsToggle then return end
stop = true
end
There's an easy example
Example: bind keyboard 9 "escort"
In F8
Cfx.re Native Reference
Registered commands can be executed by entering them in the client console (this works for client side and server side registered commands). Or by entering them in the server console/through an RCON c