mirror of
https://github.com/jimathy/rpemotes.git
synced 2026-08-03 10:48:38 -04:00
* 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
26 lines
544 B
Lua
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)
|
|
|