Improved Emote Menu
+ Added banner + Fixed keybinds
@@ -18,53 +18,54 @@ local PtfxWait = 500
|
||||
local PtfxNoProp = false
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
while true do
|
||||
if IsPedShooting(PlayerPedId()) and IsInAnimation then
|
||||
EmoteCancel()
|
||||
end
|
||||
|
||||
if IsPedShooting(PlayerPedId()) and IsInAnimation then
|
||||
EmoteCancel()
|
||||
if PtfxPrompt then
|
||||
if not PtfxNotif then
|
||||
SimpleNotify(PtfxInfo)
|
||||
PtfxNotif = true
|
||||
end
|
||||
if IsControlPressed(0, 47) then
|
||||
PtfxStart()
|
||||
Wait(PtfxWait)
|
||||
PtfxStop()
|
||||
end
|
||||
end
|
||||
|
||||
if Config.EnableXtoCancel then if IsControlPressed(0, 73) then EmoteCancel() end end
|
||||
Citizen.Wait(1)
|
||||
end
|
||||
|
||||
if PtfxPrompt then
|
||||
if not PtfxNotif then
|
||||
SimpleNotify(PtfxInfo)
|
||||
PtfxNotif = true
|
||||
end
|
||||
if IsControlPressed(0, 47) then
|
||||
PtfxStart()
|
||||
Wait(PtfxWait)
|
||||
PtfxStop()
|
||||
end
|
||||
end
|
||||
|
||||
if Config.MenuKeybindEnabled then if IsControlPressed(0, Config.MenuKeybind) then OpenEmoteMenu() end end
|
||||
if Config.EnableXtoCancel then if IsControlPressed(0, 73) then EmoteCancel() end end
|
||||
Citizen.Wait(1)
|
||||
end
|
||||
end)
|
||||
|
||||
if Config.MenuKeybindEnabled then
|
||||
RegisterKeyMapping("emotemenu", "Open dpemotes menu", "keyboard", Config.MenuKeybind)
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
-- Commands / Events --------------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
TriggerEvent('chat:addSuggestion', '/e', 'Play an emote', {{ name="emotename", help="dance, camera, sit or any valid emote."}})
|
||||
TriggerEvent('chat:addSuggestion', '/e', 'Play an emote', {{ name="emotename", help="dance, camera, sit or any valid emote."}})
|
||||
TriggerEvent('chat:addSuggestion', '/emote', 'Play an emote', {{ name="emotename", help="dance, camera, sit or any valid emote."}})
|
||||
TriggerEvent('chat:addSuggestion', '/e', 'Play an emote', { { name = "emotename", help = "dance, camera, sit or any valid emote." } })
|
||||
TriggerEvent('chat:addSuggestion', '/emote', 'Play an emote', { { name = "emotename", help = "dance, camera, sit or any valid emote." } })
|
||||
if Config.SqlKeybinding then
|
||||
TriggerEvent('chat:addSuggestion', '/emotebind', 'Bind an emote', {{ name="key", help="num4, num5, num6, num7. num8, num9. Numpad 4-9!"}, { name="emotename", help="dance, camera, sit or any valid emote."}})
|
||||
TriggerEvent('chat:addSuggestion', '/emotebinds', 'Check your currently bound emotes.')
|
||||
TriggerEvent('chat:addSuggestion', '/emotebind', 'Bind an emote', { { name = "key", help = "num4, num5, num6, num7. num8, num9. Numpad 4-9!" }, { name = "emotename", help = "dance, camera, sit or any valid emote." } })
|
||||
TriggerEvent('chat:addSuggestion', '/emotebinds', 'Check your currently bound emotes.')
|
||||
end
|
||||
TriggerEvent('chat:addSuggestion', '/emotemenu', 'Open dpemotes menu (F6) by default.')
|
||||
TriggerEvent('chat:addSuggestion', '/emotemenu', 'Open the emote menu.')
|
||||
TriggerEvent('chat:addSuggestion', '/emotes', 'List available emotes.')
|
||||
TriggerEvent('chat:addSuggestion', '/walk', 'Set your walkingstyle.', {{ name="style", help="/walks for a list of valid styles"}})
|
||||
TriggerEvent('chat:addSuggestion', '/walk', 'Set your walkingstyle.', { { name = "style", help = "/walks for a list of valid styles" } })
|
||||
TriggerEvent('chat:addSuggestion', '/walks', 'List available walking styles.')
|
||||
end)
|
||||
|
||||
RegisterCommand('e', function(source, args, raw) EmoteCommandStart(source, args, raw) end)
|
||||
RegisterCommand('emote', function(source, args, raw) EmoteCommandStart(source, args, raw) end)
|
||||
if Config.SqlKeybinding then
|
||||
RegisterCommand('emotebind', function(source, args, raw) EmoteBindStart(source, args, raw) end)
|
||||
RegisterCommand('emotebinds', function(source, args, raw) EmoteBindsStart(source, args, raw) end)
|
||||
RegisterCommand('emotebind', function(source, args, raw) EmoteBindStart(source, args, raw) end)
|
||||
RegisterCommand('emotebinds', function(source, args, raw) EmoteBindsStart(source, args, raw) end)
|
||||
end
|
||||
RegisterCommand('emotemenu', function(source, args, raw) OpenEmoteMenu() end)
|
||||
RegisterCommand('emotes', function(source, args, raw) EmotesOnCommand() end)
|
||||
@@ -72,11 +73,13 @@ RegisterCommand('walk', function(source, args, raw) WalkCommandStart(source, arg
|
||||
RegisterCommand('walks', function(source, args, raw) WalksOnCommand() end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
DestroyAllProps()
|
||||
ClearPedTasksImmediately(GetPlayerPed(-1))
|
||||
ResetPedMovementClipset(PlayerPedId())
|
||||
end
|
||||
if resource == GetCurrentResourceName() then
|
||||
local ply = PlayerPedId()
|
||||
DestroyAllProps()
|
||||
ClearPedTasksImmediately(ply)
|
||||
DetachEntity(ply, true, false)
|
||||
ResetPedMovementClipset(ply)
|
||||
end
|
||||
end)
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
@@ -84,47 +87,49 @@ end)
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
function EmoteCancel()
|
||||
local ply = PlayerPedId()
|
||||
if ChosenDict == "MaleScenario" and IsInAnimation then
|
||||
ClearPedTasksImmediately(ply)
|
||||
IsInAnimation = false
|
||||
DebugPrint("Forced scenario exit")
|
||||
elseif ChosenDict == "Scenario" and IsInAnimation then
|
||||
ClearPedTasksImmediately(ply)
|
||||
IsInAnimation = false
|
||||
DebugPrint("Forced scenario exit")
|
||||
end
|
||||
|
||||
if ChosenDict == "MaleScenario" and IsInAnimation then
|
||||
ClearPedTasksImmediately(PlayerPedId())
|
||||
IsInAnimation = false
|
||||
DebugPrint("Forced scenario exit")
|
||||
elseif ChosenDict == "Scenario" and IsInAnimation then
|
||||
ClearPedTasksImmediately(PlayerPedId())
|
||||
IsInAnimation = false
|
||||
DebugPrint("Forced scenario exit")
|
||||
end
|
||||
PtfxNotif = false
|
||||
PtfxPrompt = false
|
||||
|
||||
PtfxNotif = false
|
||||
PtfxPrompt = false
|
||||
|
||||
if IsInAnimation then
|
||||
PtfxStop()
|
||||
ClearPedTasks(GetPlayerPed(-1))
|
||||
DestroyAllProps()
|
||||
IsInAnimation = false
|
||||
end
|
||||
if IsInAnimation then
|
||||
PtfxStop()
|
||||
ClearPedTasks(ply)
|
||||
DetachEntity(ply, true, false)
|
||||
CancelSharedEmote(ply)
|
||||
DestroyAllProps()
|
||||
IsInAnimation = false
|
||||
end
|
||||
end
|
||||
|
||||
function EmoteChatMessage(args)
|
||||
if args == display then
|
||||
TriggerEvent("chatMessage", "^5Help^0", {0,0,0}, string.format(""))
|
||||
else
|
||||
TriggerEvent("chatMessage", "^5Help^0", {0,0,0}, string.format(""..args..""))
|
||||
end
|
||||
if args == display then
|
||||
TriggerEvent("chatMessage", "^5Help^0", { 0, 0, 0 }, string.format(""))
|
||||
else
|
||||
TriggerEvent("chatMessage", "^5Help^0", { 0, 0, 0 }, string.format("" .. args .. ""))
|
||||
end
|
||||
end
|
||||
|
||||
function DebugPrint(args)
|
||||
if Config.DebugDisplay then
|
||||
print(args)
|
||||
end
|
||||
if Config.DebugDisplay then
|
||||
print(args)
|
||||
end
|
||||
end
|
||||
|
||||
function PtfxStart()
|
||||
if PtfxNoProp then
|
||||
PtfxAt = PlayerPedId()
|
||||
PtfxAt = PlayerPedId()
|
||||
else
|
||||
PtfxAt = prop
|
||||
PtfxAt = prop
|
||||
end
|
||||
UseParticleFxAssetNextCall(PtfxAsset)
|
||||
Ptfx = StartNetworkedParticleFxLoopedOnEntityBone(PtfxName, PtfxAt, Ptfx1, Ptfx2, Ptfx3, Ptfx4, Ptfx5, Ptfx6, GetEntityBoneIndexByName(PtfxName, "VFX"), 1065353216, 0, 0, 0, 1065353216, 1065353216, 1065353216, 0)
|
||||
@@ -133,30 +138,30 @@ function PtfxStart()
|
||||
end
|
||||
|
||||
function PtfxStop()
|
||||
for a,b in pairs(PlayerParticles) do
|
||||
DebugPrint("Stopped PTFX: "..b)
|
||||
StopParticleFxLooped(b, false)
|
||||
table.remove(PlayerParticles, a)
|
||||
end
|
||||
for a, b in pairs(PlayerParticles) do
|
||||
DebugPrint("Stopped PTFX: " .. b)
|
||||
StopParticleFxLooped(b, false)
|
||||
table.remove(PlayerParticles, a)
|
||||
end
|
||||
end
|
||||
|
||||
function EmotesOnCommand(source, args, raw)
|
||||
local EmotesCommand = ""
|
||||
for a in pairsByKeys(DP.Emotes) do
|
||||
EmotesCommand = EmotesCommand .. ""..a..", "
|
||||
end
|
||||
EmoteChatMessage(EmotesCommand)
|
||||
EmoteChatMessage(Config.Languages[lang]['emotemenucmd'])
|
||||
local EmotesCommand = ""
|
||||
for a in pairsByKeys(DP.Emotes) do
|
||||
EmotesCommand = EmotesCommand .. "" .. a .. ", "
|
||||
end
|
||||
EmoteChatMessage(EmotesCommand)
|
||||
EmoteChatMessage(Config.Languages[lang]['emotemenucmd'])
|
||||
end
|
||||
|
||||
function pairsByKeys (t, f)
|
||||
function pairsByKeys(t, f)
|
||||
local a = {}
|
||||
for n in pairs(t) do
|
||||
table.insert(a, n)
|
||||
end
|
||||
table.sort(a, f)
|
||||
local i = 0 -- iterator variable
|
||||
local iter = function () -- iterator function
|
||||
local i = 0 -- iterator variable
|
||||
local iter = function() -- iterator function
|
||||
i = i + 1
|
||||
if a[i] == nil then
|
||||
return nil
|
||||
@@ -173,94 +178,111 @@ function EmoteMenuStart(args, hard)
|
||||
|
||||
if etype == "dances" then
|
||||
if DP.Dances[name] ~= nil then
|
||||
if OnEmotePlay(DP.Dances[name]) then end
|
||||
if OnEmotePlay(DP.Dances[name]) then end
|
||||
end
|
||||
elseif etype == "animals" then
|
||||
if DP.AnimalEmotes[name] ~= nil then
|
||||
if OnEmotePlay(DP.AnimalEmotes[name]) then end
|
||||
end
|
||||
elseif etype == "props" then
|
||||
if DP.PropEmotes[name] ~= nil then
|
||||
if OnEmotePlay(DP.PropEmotes[name]) then end
|
||||
if OnEmotePlay(DP.PropEmotes[name]) then end
|
||||
end
|
||||
elseif etype == "emotes" then
|
||||
if DP.Emotes[name] ~= nil then
|
||||
if OnEmotePlay(DP.Emotes[name]) then end
|
||||
if OnEmotePlay(DP.Emotes[name]) then end
|
||||
else
|
||||
if name ~= "🕺 Dance Emotes" then end
|
||||
if name ~= "🕺 Dance Emotes" then end
|
||||
end
|
||||
elseif etype == "expression" then
|
||||
if DP.Expressions[name] ~= nil then
|
||||
if OnEmotePlay(DP.Expressions[name]) then end
|
||||
if OnEmotePlay(DP.Expressions[name]) then end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function EmoteCommandStart(source, args, raw)
|
||||
if #args > 0 then
|
||||
local name = string.lower(args[1])
|
||||
if name == "c" then
|
||||
if IsInAnimation then
|
||||
EmoteCancel()
|
||||
else
|
||||
EmoteChatMessage(Config.Languages[lang]['nocancel'])
|
||||
local name = string.lower(args[1])
|
||||
if name == "c" then
|
||||
if IsInAnimation then
|
||||
EmoteCancel()
|
||||
else
|
||||
EmoteChatMessage(Config.Languages[lang]['nocancel'])
|
||||
end
|
||||
return
|
||||
elseif name == "help" then
|
||||
EmotesOnCommand()
|
||||
return
|
||||
end
|
||||
return
|
||||
elseif name == "help" then
|
||||
EmotesOnCommand()
|
||||
return end
|
||||
|
||||
if DP.Emotes[name] ~= nil then
|
||||
if OnEmotePlay(DP.Emotes[name]) then end return
|
||||
elseif DP.Dances[name] ~= nil then
|
||||
if OnEmotePlay(DP.Dances[name]) then end return
|
||||
elseif DP.PropEmotes[name] ~= nil then
|
||||
if OnEmotePlay(DP.PropEmotes[name]) then end return
|
||||
else
|
||||
EmoteChatMessage("'"..name.."' "..Config.Languages[lang]['notvalidemote'].."")
|
||||
if DP.Emotes[name] ~= nil then
|
||||
if OnEmotePlay(DP.Emotes[name]) then end
|
||||
return
|
||||
elseif DP.Dances[name] ~= nil then
|
||||
if OnEmotePlay(DP.Dances[name]) then end
|
||||
return
|
||||
elseif DP.AnimalEmotes[name] ~= nil then
|
||||
if OnEmotePlay(DP.AnimalEmotes[name]) then end
|
||||
return
|
||||
elseif DP.PropEmotes[name] ~= nil then
|
||||
if OnEmotePlay(DP.PropEmotes[name]) then end
|
||||
return
|
||||
else
|
||||
EmoteChatMessage("'" .. name .. "' " .. Config.Languages[lang]['notvalidemote'] .. "")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function LoadAnim(dict)
|
||||
while not HasAnimDictLoaded(dict) do
|
||||
RequestAnimDict(dict)
|
||||
Wait(10)
|
||||
end
|
||||
if not DoesAnimDictExist(dict) then
|
||||
return false
|
||||
end
|
||||
|
||||
while not HasAnimDictLoaded(dict) do
|
||||
RequestAnimDict(dict)
|
||||
Wait(10)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function LoadPropDict(model)
|
||||
while not HasModelLoaded(GetHashKey(model)) do
|
||||
RequestModel(GetHashKey(model))
|
||||
Wait(10)
|
||||
end
|
||||
while not HasModelLoaded(GetHashKey(model)) do
|
||||
RequestModel(GetHashKey(model))
|
||||
Wait(10)
|
||||
end
|
||||
end
|
||||
|
||||
function PtfxThis(asset)
|
||||
while not HasNamedPtfxAssetLoaded(asset) do
|
||||
RequestNamedPtfxAsset(asset)
|
||||
Wait(10)
|
||||
end
|
||||
UseParticleFxAssetNextCall(asset)
|
||||
while not HasNamedPtfxAssetLoaded(asset) do
|
||||
RequestNamedPtfxAsset(asset)
|
||||
Wait(10)
|
||||
end
|
||||
UseParticleFxAssetNextCall(asset)
|
||||
end
|
||||
|
||||
function DestroyAllProps()
|
||||
for _,v in pairs(PlayerProps) do
|
||||
DeleteEntity(v)
|
||||
end
|
||||
PlayerHasProp = false
|
||||
DebugPrint("Destroyed Props")
|
||||
for _, v in pairs(PlayerProps) do
|
||||
DeleteEntity(v)
|
||||
end
|
||||
PlayerHasProp = false
|
||||
DebugPrint("Destroyed Props")
|
||||
end
|
||||
|
||||
function AddPropToPlayer(prop1, bone, off1, off2, off3, rot1, rot2, rot3)
|
||||
local Player = PlayerPedId()
|
||||
local x,y,z = table.unpack(GetEntityCoords(Player))
|
||||
local Player = PlayerPedId()
|
||||
local x, y, z = table.unpack(GetEntityCoords(Player))
|
||||
|
||||
if not HasModelLoaded(prop1) then
|
||||
LoadPropDict(prop1)
|
||||
end
|
||||
if not HasModelLoaded(prop1) then
|
||||
LoadPropDict(prop1)
|
||||
end
|
||||
|
||||
prop = CreateObject(GetHashKey(prop1), x, y, z+0.2, true, true, true)
|
||||
AttachEntityToEntity(prop, Player, GetPedBoneIndex(Player, bone), off1, off2, off3, rot1, rot2, rot3, true, true, false, true, 1, true)
|
||||
table.insert(PlayerProps, prop)
|
||||
PlayerHasProp = true
|
||||
SetModelAsNoLongerNeeded(prop1)
|
||||
prop = CreateObject(GetHashKey(prop1), x, y, z + 0.2, true, true, true)
|
||||
AttachEntityToEntity(prop, Player, GetPedBoneIndex(Player, bone), off1, off2, off3, rot1, rot2, rot3, true, true, false, true, 1, true)
|
||||
table.insert(PlayerProps, prop)
|
||||
PlayerHasProp = true
|
||||
SetModelAsNoLongerNeeded(prop1)
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
@@ -271,15 +293,15 @@ end
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
function CheckGender()
|
||||
local hashSkinMale = GetHashKey("mp_m_freemode_01")
|
||||
local hashSkinFemale = GetHashKey("mp_f_freemode_01")
|
||||
local hashSkinMale = GetHashKey("mp_m_freemode_01")
|
||||
local hashSkinFemale = GetHashKey("mp_f_freemode_01")
|
||||
|
||||
if GetEntityModel(PlayerPedId()) == hashSkinMale then
|
||||
PlayerGender = "male"
|
||||
elseif GetEntityModel(PlayerPedId()) == hashSkinFemale then
|
||||
PlayerGender = "female"
|
||||
end
|
||||
DebugPrint("Set gender as = ("..PlayerGender..")")
|
||||
if GetEntityModel(PlayerPedId()) == hashSkinMale then
|
||||
PlayerGender = "male"
|
||||
elseif GetEntityModel(PlayerPedId()) == hashSkinFemale then
|
||||
PlayerGender = "female"
|
||||
end
|
||||
DebugPrint("Set gender as = (" .. PlayerGender .. ")")
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
@@ -287,139 +309,143 @@ end
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
function OnEmotePlay(EmoteName)
|
||||
|
||||
InVehicle = IsPedInAnyVehicle(PlayerPedId(), true)
|
||||
if not Config.AllowedInCars and InVehicle == 1 then
|
||||
return
|
||||
end
|
||||
|
||||
if not DoesEntityExist(GetPlayerPed(-1)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if Config.DisarmPlayer then
|
||||
if IsPedArmed(GetPlayerPed(-1), 7) then
|
||||
SetCurrentPedWeapon(GetPlayerPed(-1), GetHashKey('WEAPON_UNARMED'), true)
|
||||
InVehicle = IsPedInAnyVehicle(PlayerPedId(), true)
|
||||
if not Config.AllowedInCars and InVehicle == 1 then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
ChosenDict,ChosenAnimation,ename = table.unpack(EmoteName)
|
||||
AnimationDuration = -1
|
||||
if not DoesEntityExist(PlayerPedId()) then
|
||||
return false
|
||||
end
|
||||
|
||||
if PlayerHasProp then
|
||||
DestroyAllProps()
|
||||
end
|
||||
if Config.DisarmPlayer then
|
||||
if IsPedArmed(PlayerPedId(), 7) then
|
||||
SetCurrentPedWeapon(PlayerPedId(), GetHashKey('WEAPON_UNARMED'), true)
|
||||
end
|
||||
end
|
||||
|
||||
if ChosenDict == "Expression" then
|
||||
SetFacialIdleAnimOverride(PlayerPedId(), ChosenAnimation, 0)
|
||||
return
|
||||
end
|
||||
ChosenDict, ChosenAnimation, ename = table.unpack(EmoteName)
|
||||
AnimationDuration = -1
|
||||
|
||||
if ChosenDict == "MaleScenario" or "Scenario" then
|
||||
CheckGender()
|
||||
if ChosenDict == "MaleScenario" then if InVehicle then return end
|
||||
if PlayerGender == "male" then
|
||||
ClearPedTasks(GetPlayerPed(-1))
|
||||
TaskStartScenarioInPlace(GetPlayerPed(-1), ChosenAnimation, 0, true)
|
||||
DebugPrint("Playing scenario = ("..ChosenAnimation..")")
|
||||
IsInAnimation = true
|
||||
else
|
||||
EmoteChatMessage(Config.Languages[lang]['maleonly'])
|
||||
end return
|
||||
elseif ChosenDict == "ScenarioObject" then if InVehicle then return end
|
||||
BehindPlayer = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 0 - 0.5, -0.5);
|
||||
ClearPedTasks(GetPlayerPed(-1))
|
||||
TaskStartScenarioAtPosition(GetPlayerPed(-1), ChosenAnimation, BehindPlayer['x'], BehindPlayer['y'], BehindPlayer['z'], GetEntityHeading(PlayerPedId()), 0, 1, false)
|
||||
DebugPrint("Playing scenario = ("..ChosenAnimation..")")
|
||||
IsInAnimation = true
|
||||
return
|
||||
elseif ChosenDict == "Scenario" then if InVehicle then return end
|
||||
ClearPedTasks(GetPlayerPed(-1))
|
||||
TaskStartScenarioInPlace(GetPlayerPed(-1), ChosenAnimation, 0, true)
|
||||
DebugPrint("Playing scenario = ("..ChosenAnimation..")")
|
||||
IsInAnimation = true
|
||||
return end
|
||||
end
|
||||
if PlayerHasProp then
|
||||
DestroyAllProps()
|
||||
end
|
||||
|
||||
LoadAnim(ChosenDict)
|
||||
if ChosenDict == "Expression" then
|
||||
SetFacialIdleAnimOverride(PlayerPedId(), ChosenAnimation, 0)
|
||||
return
|
||||
end
|
||||
|
||||
if EmoteName.AnimationOptions then
|
||||
if EmoteName.AnimationOptions.EmoteLoop then
|
||||
MovementType = 1
|
||||
if EmoteName.AnimationOptions.EmoteMoving then
|
||||
MovementType = 51
|
||||
end
|
||||
if ChosenDict == "MaleScenario" or "Scenario" then
|
||||
CheckGender()
|
||||
if ChosenDict == "MaleScenario" then if InVehicle then return end
|
||||
if PlayerGender == "male" then
|
||||
ClearPedTasks(PlayerPedId())
|
||||
TaskStartScenarioInPlace(PlayerPedId(), ChosenAnimation, 0, true)
|
||||
DebugPrint("Playing scenario = (" .. ChosenAnimation .. ")")
|
||||
IsInAnimation = true
|
||||
else
|
||||
EmoteChatMessage(Config.Languages[lang]['maleonly'])
|
||||
end
|
||||
return
|
||||
elseif ChosenDict == "ScenarioObject" then if InVehicle then return end
|
||||
BehindPlayer = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 0 - 0.5, -0.5);
|
||||
ClearPedTasks(PlayerPedId())
|
||||
TaskStartScenarioAtPosition(PlayerPedId(), ChosenAnimation, BehindPlayer['x'], BehindPlayer['y'], BehindPlayer['z'], GetEntityHeading(PlayerPedId()), 0, 1, false)
|
||||
DebugPrint("Playing scenario = (" .. ChosenAnimation .. ")")
|
||||
IsInAnimation = true
|
||||
return
|
||||
elseif ChosenDict == "Scenario" then if InVehicle then return end
|
||||
ClearPedTasks(PlayerPedId())
|
||||
TaskStartScenarioInPlace(PlayerPedId(), ChosenAnimation, 0, true)
|
||||
DebugPrint("Playing scenario = (" .. ChosenAnimation .. ")")
|
||||
IsInAnimation = true
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
elseif EmoteName.AnimationOptions.EmoteMoving then
|
||||
MovementType = 51
|
||||
elseif EmoteName.AnimationOptions.EmoteMoving == false then
|
||||
MovementType = 0
|
||||
elseif EmoteName.AnimationOptions.EmoteStuck then
|
||||
MovementType = 50
|
||||
end
|
||||
if not LoadAnim(ChosenDict) then
|
||||
EmoteChatMessage("'" .. ename .. "' " .. Config.Languages[lang]['notvalidemote'] .. "")
|
||||
return
|
||||
end
|
||||
|
||||
else
|
||||
MovementType = 0
|
||||
end
|
||||
if EmoteName.AnimationOptions then
|
||||
if EmoteName.AnimationOptions.EmoteLoop then
|
||||
MovementType = 1
|
||||
if EmoteName.AnimationOptions.EmoteMoving then
|
||||
MovementType = 51
|
||||
end
|
||||
|
||||
if InVehicle == 1 then
|
||||
MovementType = 51
|
||||
end
|
||||
elseif EmoteName.AnimationOptions.EmoteMoving then
|
||||
MovementType = 51
|
||||
elseif EmoteName.AnimationOptions.EmoteMoving == false then
|
||||
MovementType = 0
|
||||
elseif EmoteName.AnimationOptions.EmoteStuck then
|
||||
MovementType = 50
|
||||
end
|
||||
|
||||
if EmoteName.AnimationOptions then
|
||||
if EmoteName.AnimationOptions.EmoteDuration == nil then
|
||||
EmoteName.AnimationOptions.EmoteDuration = -1
|
||||
AttachWait = 0
|
||||
else
|
||||
AnimationDuration = EmoteName.AnimationOptions.EmoteDuration
|
||||
AttachWait = EmoteName.AnimationOptions.EmoteDuration
|
||||
MovementType = 0
|
||||
end
|
||||
|
||||
if EmoteName.AnimationOptions.PtfxAsset then
|
||||
PtfxAsset = EmoteName.AnimationOptions.PtfxAsset
|
||||
PtfxName = EmoteName.AnimationOptions.PtfxName
|
||||
if EmoteName.AnimationOptions.PtfxNoProp then
|
||||
PtfxNoProp = EmoteName.AnimationOptions.PtfxNoProp
|
||||
else
|
||||
PtfxNoProp = false
|
||||
end
|
||||
Ptfx1, Ptfx2, Ptfx3, Ptfx4, Ptfx5, Ptfx6, PtfxScale = table.unpack(EmoteName.AnimationOptions.PtfxPlacement)
|
||||
PtfxInfo = EmoteName.AnimationOptions.PtfxInfo
|
||||
PtfxWait = EmoteName.AnimationOptions.PtfxWait
|
||||
PtfxNotif = false
|
||||
PtfxPrompt = true
|
||||
PtfxThis(PtfxAsset)
|
||||
else
|
||||
DebugPrint("Ptfx = none")
|
||||
PtfxPrompt = false
|
||||
if InVehicle == 1 then
|
||||
MovementType = 51
|
||||
end
|
||||
end
|
||||
|
||||
TaskPlayAnim(GetPlayerPed(-1), ChosenDict, ChosenAnimation, 2.0, 2.0, AnimationDuration, MovementType, 0, false, false, false)
|
||||
RemoveAnimDict(ChosenDict)
|
||||
IsInAnimation = true
|
||||
MostRecentDict = ChosenDict
|
||||
MostRecentAnimation = ChosenAnimation
|
||||
|
||||
if EmoteName.AnimationOptions then
|
||||
if EmoteName.AnimationOptions.Prop then
|
||||
PropName = EmoteName.AnimationOptions.Prop
|
||||
PropBone = EmoteName.AnimationOptions.PropBone
|
||||
PropPl1, PropPl2, PropPl3, PropPl4, PropPl5, PropPl6 = table.unpack(EmoteName.AnimationOptions.PropPlacement)
|
||||
if EmoteName.AnimationOptions.SecondProp then
|
||||
SecondPropName = EmoteName.AnimationOptions.SecondProp
|
||||
SecondPropBone = EmoteName.AnimationOptions.SecondPropBone
|
||||
SecondPropPl1, SecondPropPl2, SecondPropPl3, SecondPropPl4, SecondPropPl5, SecondPropPl6 = table.unpack(EmoteName.AnimationOptions.SecondPropPlacement)
|
||||
SecondPropEmote = true
|
||||
if EmoteName.AnimationOptions then
|
||||
if EmoteName.AnimationOptions.EmoteDuration == nil then
|
||||
EmoteName.AnimationOptions.EmoteDuration = -1
|
||||
AttachWait = 0
|
||||
else
|
||||
SecondPropEmote = false
|
||||
AnimationDuration = EmoteName.AnimationOptions.EmoteDuration
|
||||
AttachWait = EmoteName.AnimationOptions.EmoteDuration
|
||||
end
|
||||
Wait(AttachWait)
|
||||
AddPropToPlayer(PropName, PropBone, PropPl1, PropPl2, PropPl3, PropPl4, PropPl5, PropPl6)
|
||||
if SecondPropEmote then
|
||||
AddPropToPlayer(SecondPropName, SecondPropBone, SecondPropPl1, SecondPropPl2, SecondPropPl3, SecondPropPl4, SecondPropPl5, SecondPropPl6)
|
||||
|
||||
if EmoteName.AnimationOptions.PtfxAsset then
|
||||
PtfxAsset = EmoteName.AnimationOptions.PtfxAsset
|
||||
PtfxName = EmoteName.AnimationOptions.PtfxName
|
||||
if EmoteName.AnimationOptions.PtfxNoProp then
|
||||
PtfxNoProp = EmoteName.AnimationOptions.PtfxNoProp
|
||||
else
|
||||
PtfxNoProp = false
|
||||
end
|
||||
Ptfx1, Ptfx2, Ptfx3, Ptfx4, Ptfx5, Ptfx6, PtfxScale = table.unpack(EmoteName.AnimationOptions.PtfxPlacement)
|
||||
PtfxInfo = EmoteName.AnimationOptions.PtfxInfo
|
||||
PtfxWait = EmoteName.AnimationOptions.PtfxWait
|
||||
PtfxNotif = false
|
||||
PtfxPrompt = true
|
||||
PtfxThis(PtfxAsset)
|
||||
else
|
||||
DebugPrint("Ptfx = none")
|
||||
PtfxPrompt = false
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
TaskPlayAnim(PlayerPedId(), ChosenDict, ChosenAnimation, 2.0, 2.0, AnimationDuration, MovementType, 0, false, false, false)
|
||||
RemoveAnimDict(ChosenDict)
|
||||
IsInAnimation = true
|
||||
MostRecentDict = ChosenDict
|
||||
MostRecentAnimation = ChosenAnimation
|
||||
|
||||
if EmoteName.AnimationOptions then
|
||||
if EmoteName.AnimationOptions.Prop then
|
||||
PropName = EmoteName.AnimationOptions.Prop
|
||||
PropBone = EmoteName.AnimationOptions.PropBone
|
||||
PropPl1, PropPl2, PropPl3, PropPl4, PropPl5, PropPl6 = table.unpack(EmoteName.AnimationOptions.PropPlacement)
|
||||
if EmoteName.AnimationOptions.SecondProp then
|
||||
SecondPropName = EmoteName.AnimationOptions.SecondProp
|
||||
SecondPropBone = EmoteName.AnimationOptions.SecondPropBone
|
||||
SecondPropPl1, SecondPropPl2, SecondPropPl3, SecondPropPl4, SecondPropPl5, SecondPropPl6 = table.unpack(EmoteName.AnimationOptions.SecondPropPlacement)
|
||||
SecondPropEmote = true
|
||||
else
|
||||
SecondPropEmote = false
|
||||
end
|
||||
Wait(AttachWait)
|
||||
AddPropToPlayer(PropName, PropBone, PropPl1, PropPl2, PropPl3, PropPl4, PropPl5, PropPl6)
|
||||
if SecondPropEmote then
|
||||
AddPropToPlayer(SecondPropName, SecondPropBone, SecondPropPl1, SecondPropPl2, SecondPropPl3, SecondPropPl4, SecondPropPl5, SecondPropPl6)
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
TriggerServerEvent("dp:CheckVersion")
|
||||
|
||||
rightPosition = {x = 1450, y = 100}
|
||||
leftPosition = {x = 0, y = 100}
|
||||
menuPosition = {x = 0, y = 200}
|
||||
rightPosition = { x = 1450, y = 100 }
|
||||
leftPosition = { x = 0, y = 100 }
|
||||
menuPosition = { x = 0, y = 200 }
|
||||
|
||||
if Config.MenuPosition then
|
||||
if Config.MenuPosition == "left" then
|
||||
menuPosition = leftPosition
|
||||
elseif Config.MenuPosition == "right" then
|
||||
menuPosition = rightPosition
|
||||
end
|
||||
if Config.MenuPosition == "left" then
|
||||
menuPosition = leftPosition
|
||||
elseif Config.MenuPosition == "right" then
|
||||
menuPosition = rightPosition
|
||||
end
|
||||
end
|
||||
|
||||
if Config.CustomMenuEnabled then
|
||||
local RuntimeTXD = CreateRuntimeTxd('Custom_Menu_Head')
|
||||
local Object = CreateDui(Config.MenuImage, 512, 128)
|
||||
_G.Object = Object
|
||||
local TextureThing = GetDuiHandle(Object)
|
||||
local Texture = CreateRuntimeTextureFromDuiHandle(RuntimeTXD, 'Custom_Menu_Head', TextureThing)
|
||||
Menuthing = "Custom_Menu_Head"
|
||||
local RuntimeTXD = CreateRuntimeTxd('Custom_Menu_Head')
|
||||
local Object = CreateDui(Config.MenuImage, 512, 128)
|
||||
_G.Object = Object
|
||||
local TextureThing = GetDuiHandle(Object)
|
||||
local Texture = CreateRuntimeTextureFromDuiHandle(RuntimeTXD, 'Custom_Menu_Head', TextureThing)
|
||||
Menuthing = "Custom_Menu_Head"
|
||||
else
|
||||
Menuthing = "shopui_title_sm_hangar"
|
||||
Menuthing = "shopui_title_sm_hangar"
|
||||
end
|
||||
|
||||
_menuPool = NativeUI.CreatePool()
|
||||
mainMenu = NativeUI.CreateMenu("dp Emotes", "", menuPosition["x"], menuPosition["y"], Menuthing, Menuthing)
|
||||
mainMenu = NativeUI.CreateMenu("", "", menuPosition["x"], menuPosition["y"], Menuthing, Menuthing)
|
||||
_menuPool:Add(mainMenu)
|
||||
|
||||
function ShowNotification(text)
|
||||
@@ -37,159 +37,174 @@ local EmoteTable = {}
|
||||
local FavEmoteTable = {}
|
||||
local KeyEmoteTable = {}
|
||||
local DanceTable = {}
|
||||
local AnimalTable = {}
|
||||
local PropETable = {}
|
||||
local WalkTable = {}
|
||||
local FaceTable = {}
|
||||
local ShareTable = {}
|
||||
local FavoriteEmote = ""
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
if Config.FavKeybindEnabled then
|
||||
if IsControlPressed(0, Config.FavKeybind) then
|
||||
if not IsPedSittingInAnyVehicle(PlayerPedId()) then
|
||||
if FavoriteEmote ~= "" then
|
||||
EmoteCommandStart(nil,{FavoriteEmote, 0})
|
||||
Wait(3000)
|
||||
end
|
||||
if Config.FavKeybindEnabled then
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
if IsControlPressed(0, Config.FavKeybind) then
|
||||
if not IsPedSittingInAnyVehicle(PlayerPedId()) then
|
||||
if FavoriteEmote ~= "" then
|
||||
EmoteCommandStart(nil, { FavoriteEmote, 0 })
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
end
|
||||
Citizen.Wait(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
Citizen.Wait(1)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
lang = Config.MenuLanguage
|
||||
|
||||
function AddEmoteMenu(menu)
|
||||
local submenu = _menuPool:AddSubMenu(menu, Config.Languages[lang]['emotes'], "", "", Menuthing, Menuthing)
|
||||
local dancemenu = _menuPool:AddSubMenu(submenu, Config.Languages[lang]['danceemotes'], "", "", Menuthing, Menuthing)
|
||||
local animalmenu = _menuPool:AddSubMenu(submenu, Config.Languages[lang]['animalemotes'], "", "", Menuthing, Menuthing)
|
||||
local propmenu = _menuPool:AddSubMenu(submenu, Config.Languages[lang]['propemotes'], "", "", Menuthing, Menuthing)
|
||||
table.insert(EmoteTable, Config.Languages[lang]['danceemotes'])
|
||||
table.insert(EmoteTable, Config.Languages[lang]['danceemotes'])
|
||||
table.insert(EmoteTable, Config.Languages[lang]['animalemotes'])
|
||||
|
||||
if Config.SharedEmotesEnabled then
|
||||
sharemenu = _menuPool:AddSubMenu(submenu, Config.Languages[lang]['shareemotes'], Config.Languages[lang]['shareemotesinfo'], "", Menuthing, Menuthing)
|
||||
shareddancemenu = _menuPool:AddSubMenu(sharemenu, Config.Languages[lang]['sharedanceemotes'], "", "", Menuthing, Menuthing)
|
||||
table.insert(ShareTable, 'none')
|
||||
table.insert(EmoteTable, Config.Languages[lang]['shareemotes'])
|
||||
sharemenu = _menuPool:AddSubMenu(submenu, Config.Languages[lang]['shareemotes'], Config.Languages[lang]['shareemotesinfo'], "", Menuthing, Menuthing)
|
||||
shareddancemenu = _menuPool:AddSubMenu(sharemenu, Config.Languages[lang]['sharedanceemotes'], "", "", Menuthing, Menuthing)
|
||||
table.insert(ShareTable, 'none')
|
||||
table.insert(EmoteTable, Config.Languages[lang]['shareemotes'])
|
||||
end
|
||||
|
||||
if not Config.SqlKeybinding then
|
||||
unbind2item = NativeUI.CreateItem(Config.Languages[lang]['rfavorite'], Config.Languages[lang]['rfavorite'])
|
||||
unbinditem = NativeUI.CreateItem(Config.Languages[lang]['prop2info'], "")
|
||||
favmenu = _menuPool:AddSubMenu(submenu, Config.Languages[lang]['favoriteemotes'], Config.Languages[lang]['favoriteinfo'], "", Menuthing, Menuthing)
|
||||
favmenu:AddItem(unbinditem)
|
||||
favmenu:AddItem(unbind2item)
|
||||
table.insert(FavEmoteTable, Config.Languages[lang]['rfavorite'])
|
||||
table.insert(FavEmoteTable, Config.Languages[lang]['rfavorite'])
|
||||
table.insert(EmoteTable, Config.Languages[lang]['favoriteemotes'])
|
||||
unbind2item = NativeUI.CreateItem(Config.Languages[lang]['rfavorite'], Config.Languages[lang]['rfavorite'])
|
||||
unbinditem = NativeUI.CreateItem(Config.Languages[lang]['prop2info'], "")
|
||||
favmenu = _menuPool:AddSubMenu(submenu, Config.Languages[lang]['favoriteemotes'], Config.Languages[lang]['favoriteinfo'], "", Menuthing, Menuthing)
|
||||
favmenu:AddItem(unbinditem)
|
||||
favmenu:AddItem(unbind2item)
|
||||
table.insert(FavEmoteTable, Config.Languages[lang]['rfavorite'])
|
||||
table.insert(FavEmoteTable, Config.Languages[lang]['rfavorite'])
|
||||
table.insert(EmoteTable, Config.Languages[lang]['favoriteemotes'])
|
||||
else
|
||||
table.insert(EmoteTable, "keybinds")
|
||||
keyinfo = NativeUI.CreateItem(Config.Languages[lang]['keybinds'], Config.Languages[lang]['keybindsinfo'].." /emotebind [~y~num4-9~w~] [~g~emotename~w~]")
|
||||
submenu:AddItem(keyinfo)
|
||||
table.insert(EmoteTable, "keybinds")
|
||||
keyinfo = NativeUI.CreateItem(Config.Languages[lang]['keybinds'], Config.Languages[lang]['keybindsinfo'] .. " /emotebind [~y~num4-9~w~] [~g~emotename~w~]")
|
||||
submenu:AddItem(keyinfo)
|
||||
end
|
||||
|
||||
for a,b in pairsByKeys(DP.Emotes) do
|
||||
x,y,z = table.unpack(b)
|
||||
emoteitem = NativeUI.CreateItem(z, "/e ("..a..")")
|
||||
submenu:AddItem(emoteitem)
|
||||
table.insert(EmoteTable, a)
|
||||
if not Config.SqlKeybinding then
|
||||
favemoteitem = NativeUI.CreateItem(z, Config.Languages[lang]['set']..z..Config.Languages[lang]['setboundemote'])
|
||||
favmenu:AddItem(favemoteitem)
|
||||
table.insert(FavEmoteTable, a)
|
||||
end
|
||||
for a, b in pairsByKeys(DP.Emotes) do
|
||||
x, y, z = table.unpack(b)
|
||||
emoteitem = NativeUI.CreateItem(z, "/e (" .. a .. ")")
|
||||
submenu:AddItem(emoteitem)
|
||||
table.insert(EmoteTable, a)
|
||||
if not Config.SqlKeybinding then
|
||||
favemoteitem = NativeUI.CreateItem(z, Config.Languages[lang]['set'] .. z .. Config.Languages[lang]['setboundemote'])
|
||||
favmenu:AddItem(favemoteitem)
|
||||
table.insert(FavEmoteTable, a)
|
||||
end
|
||||
end
|
||||
|
||||
for a,b in pairsByKeys(DP.Dances) do
|
||||
x,y,z = table.unpack(b)
|
||||
danceitem = NativeUI.CreateItem(z, "/e ("..a..")")
|
||||
sharedanceitem = NativeUI.CreateItem(z, "")
|
||||
dancemenu:AddItem(danceitem)
|
||||
if Config.SharedEmotesEnabled then
|
||||
shareddancemenu:AddItem(sharedanceitem)
|
||||
end
|
||||
table.insert(DanceTable, a)
|
||||
for a, b in pairsByKeys(DP.Dances) do
|
||||
x, y, z = table.unpack(b)
|
||||
danceitem = NativeUI.CreateItem(z, "/e (" .. a .. ")")
|
||||
sharedanceitem = NativeUI.CreateItem(z, "")
|
||||
dancemenu:AddItem(danceitem)
|
||||
if Config.SharedEmotesEnabled then
|
||||
shareddancemenu:AddItem(sharedanceitem)
|
||||
end
|
||||
table.insert(DanceTable, a)
|
||||
end
|
||||
|
||||
for a, b in pairsByKeys(DP.AnimalEmotes) do
|
||||
x, y, z = table.unpack(b)
|
||||
animalitem = NativeUI.CreateItem(z, "/e (" .. a .. ")")
|
||||
animalmenu:AddItem(animalitem)
|
||||
table.insert(AnimalTable, a)
|
||||
end
|
||||
|
||||
if Config.SharedEmotesEnabled then
|
||||
for a,b in pairsByKeys(DP.Shared) do
|
||||
x,y,z,otheremotename = table.unpack(b)
|
||||
if otheremotename == nil then
|
||||
shareitem = NativeUI.CreateItem(z, "/nearby (~g~"..a.."~w~)")
|
||||
else
|
||||
shareitem = NativeUI.CreateItem(z, "/nearby (~g~"..a.."~w~) "..Config.Languages[lang]['makenearby'].." (~y~"..otheremotename.."~w~)")
|
||||
for a, b in pairsByKeys(DP.Shared) do
|
||||
x, y, z, otheremotename = table.unpack(b)
|
||||
if otheremotename == nil then
|
||||
shareitem = NativeUI.CreateItem(z, "/nearby (~g~" .. a .. "~w~)")
|
||||
else
|
||||
shareitem = NativeUI.CreateItem(z, "/nearby (~g~" .. a .. "~w~) " .. Config.Languages[lang]['makenearby'] .. " (~y~" .. otheremotename .. "~w~)")
|
||||
end
|
||||
sharemenu:AddItem(shareitem)
|
||||
table.insert(ShareTable, a)
|
||||
end
|
||||
sharemenu:AddItem(shareitem)
|
||||
table.insert(ShareTable, a)
|
||||
end
|
||||
end
|
||||
|
||||
for a,b in pairsByKeys(DP.PropEmotes) do
|
||||
x,y,z = table.unpack(b)
|
||||
propitem = NativeUI.CreateItem(z, "/e ("..a..")")
|
||||
propmenu:AddItem(propitem)
|
||||
table.insert(PropETable, a)
|
||||
if not Config.SqlKeybinding then
|
||||
propfavitem = NativeUI.CreateItem(z, Config.Languages[lang]['set']..z..Config.Languages[lang]['setboundemote'])
|
||||
favmenu:AddItem(propfavitem)
|
||||
table.insert(FavEmoteTable, a)
|
||||
end
|
||||
for a, b in pairsByKeys(DP.PropEmotes) do
|
||||
x, y, z = table.unpack(b)
|
||||
propitem = NativeUI.CreateItem(z, "/e (" .. a .. ")")
|
||||
propmenu:AddItem(propitem)
|
||||
table.insert(PropETable, a)
|
||||
if not Config.SqlKeybinding then
|
||||
propfavitem = NativeUI.CreateItem(z, Config.Languages[lang]['set'] .. z .. Config.Languages[lang]['setboundemote'])
|
||||
favmenu:AddItem(propfavitem)
|
||||
table.insert(FavEmoteTable, a)
|
||||
end
|
||||
end
|
||||
|
||||
if not Config.SqlKeybinding then
|
||||
favmenu.OnItemSelect = function(sender, item, index)
|
||||
if FavEmoteTable[index] == Config.Languages[lang]['rfavorite'] then
|
||||
FavoriteEmote = ""
|
||||
ShowNotification(Config.Languages[lang]['rfavorite'], 2000)
|
||||
return end
|
||||
if Config.FavKeybindEnabled then
|
||||
FavoriteEmote = FavEmoteTable[index]
|
||||
ShowNotification("~o~"..firstToUpper(FavoriteEmote)..Config.Languages[lang]['newsetemote'])
|
||||
favmenu.OnItemSelect = function(sender, item, index)
|
||||
if FavEmoteTable[index] == Config.Languages[lang]['rfavorite'] then
|
||||
FavoriteEmote = ""
|
||||
ShowNotification(Config.Languages[lang]['rfavorite'], 2000)
|
||||
return
|
||||
end
|
||||
if Config.FavKeybindEnabled then
|
||||
FavoriteEmote = FavEmoteTable[index]
|
||||
ShowNotification("~o~" .. firstToUpper(FavoriteEmote) .. Config.Languages[lang]['newsetemote'])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
dancemenu.OnItemSelect = function(sender, item, index)
|
||||
EmoteMenuStart(DanceTable[index], "dances")
|
||||
EmoteMenuStart(DanceTable[index], "dances")
|
||||
end
|
||||
|
||||
animalmenu.OnItemSelect = function(sender, item, index)
|
||||
EmoteMenuStart(AnimalTable[index], "animals")
|
||||
end
|
||||
|
||||
if Config.SharedEmotesEnabled then
|
||||
sharemenu.OnItemSelect = function(sender, item, index)
|
||||
if ShareTable[index] ~= 'none' then
|
||||
target, distance = GetClosestPlayer()
|
||||
if(distance ~= -1 and distance < 3) then
|
||||
_,_,rename = table.unpack(DP.Shared[ShareTable[index]])
|
||||
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), ShareTable[index])
|
||||
SimpleNotify(Config.Languages[lang]['sentrequestto']..GetPlayerName(target))
|
||||
else
|
||||
SimpleNotify(Config.Languages[lang]['nobodyclose'])
|
||||
end
|
||||
sharemenu.OnItemSelect = function(sender, item, index)
|
||||
if ShareTable[index] ~= 'none' then
|
||||
target, distance = GetClosestPlayer()
|
||||
if (distance ~= -1 and distance < 3) then
|
||||
_, _, rename = table.unpack(DP.Shared[ShareTable[index]])
|
||||
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), ShareTable[index])
|
||||
SimpleNotify(Config.Languages[lang]['sentrequestto'] .. GetPlayerName(target))
|
||||
else
|
||||
SimpleNotify(Config.Languages[lang]['nobodyclose'])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
shareddancemenu.OnItemSelect = function(sender, item, index)
|
||||
target, distance = GetClosestPlayer()
|
||||
if(distance ~= -1 and distance < 3) then
|
||||
_,_,rename = table.unpack(DP.Dances[DanceTable[index]])
|
||||
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), DanceTable[index], 'Dances')
|
||||
SimpleNotify(Config.Languages[lang]['sentrequestto']..GetPlayerName(target))
|
||||
else
|
||||
SimpleNotify(Config.Languages[lang]['nobodyclose'])
|
||||
shareddancemenu.OnItemSelect = function(sender, item, index)
|
||||
target, distance = GetClosestPlayer()
|
||||
if (distance ~= -1 and distance < 3) then
|
||||
_, _, rename = table.unpack(DP.Dances[DanceTable[index]])
|
||||
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), DanceTable[index], 'Dances')
|
||||
SimpleNotify(Config.Languages[lang]['sentrequestto'] .. GetPlayerName(target))
|
||||
else
|
||||
SimpleNotify(Config.Languages[lang]['nobodyclose'])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
propmenu.OnItemSelect = function(sender, item, index)
|
||||
EmoteMenuStart(PropETable[index], "props")
|
||||
EmoteMenuStart(PropETable[index], "props")
|
||||
end
|
||||
|
||||
submenu.OnItemSelect = function(sender, item, index)
|
||||
if EmoteTable[index] ~= Config.Languages[lang]['favoriteemotes'] then
|
||||
EmoteMenuStart(EmoteTable[index], "emotes")
|
||||
if EmoteTable[index] ~= Config.Languages[lang]['favoriteemotes'] then
|
||||
EmoteMenuStart(EmoteTable[index], "emotes")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function AddCancelEmote(menu)
|
||||
@@ -197,8 +212,8 @@ function AddCancelEmote(menu)
|
||||
menu:AddItem(newitem)
|
||||
menu.OnItemSelect = function(sender, item, checked_)
|
||||
if item == newitem then
|
||||
EmoteCancel()
|
||||
DestroyAllProps()
|
||||
EmoteCancel()
|
||||
DestroyAllProps()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -214,19 +229,19 @@ function AddWalkMenu(menu)
|
||||
submenu:AddItem(WalkInjured)
|
||||
table.insert(WalkTable, "move_m@injured")
|
||||
|
||||
for a,b in pairsByKeys(DP.Walks) do
|
||||
x = table.unpack(b)
|
||||
walkitem = NativeUI.CreateItem(a, "")
|
||||
submenu:AddItem(walkitem)
|
||||
table.insert(WalkTable, x)
|
||||
for a, b in pairsByKeys(DP.Walks) do
|
||||
x = table.unpack(b)
|
||||
walkitem = NativeUI.CreateItem(a, "")
|
||||
submenu:AddItem(walkitem)
|
||||
table.insert(WalkTable, x)
|
||||
end
|
||||
|
||||
submenu.OnItemSelect = function(sender, item, index)
|
||||
if item ~= walkreset then
|
||||
WalkMenuStart(WalkTable[index])
|
||||
else
|
||||
ResetPedMovementClipset(PlayerPedId())
|
||||
end
|
||||
if item ~= walkreset then
|
||||
WalkMenuStart(WalkTable[index])
|
||||
else
|
||||
ResetPedMovementClipset(PlayerPedId())
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -237,34 +252,34 @@ function AddFaceMenu(menu)
|
||||
submenu:AddItem(facereset)
|
||||
table.insert(FaceTable, "")
|
||||
|
||||
for a,b in pairsByKeys(DP.Expressions) do
|
||||
x,y,z = table.unpack(b)
|
||||
faceitem = NativeUI.CreateItem(a, "")
|
||||
submenu:AddItem(faceitem)
|
||||
table.insert(FaceTable, a)
|
||||
for a, b in pairsByKeys(DP.Expressions) do
|
||||
x, y, z = table.unpack(b)
|
||||
faceitem = NativeUI.CreateItem(a, "")
|
||||
submenu:AddItem(faceitem)
|
||||
table.insert(FaceTable, a)
|
||||
end
|
||||
|
||||
submenu.OnItemSelect = function(sender, item, index)
|
||||
if item ~= facereset then
|
||||
EmoteMenuStart(FaceTable[index], "expression")
|
||||
else
|
||||
ClearFacialIdleAnimOverride(PlayerPedId())
|
||||
end
|
||||
if item ~= facereset then
|
||||
EmoteMenuStart(FaceTable[index], "expression")
|
||||
else
|
||||
ClearFacialIdleAnimOverride(PlayerPedId())
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function AddInfoMenu(menu)
|
||||
if not UpdateAvailable then
|
||||
infomenu = _menuPool:AddSubMenu(menu, Config.Languages[lang]['infoupdate'], "(1.7.3)", "", Menuthing, Menuthing)
|
||||
infomenu = _menuPool:AddSubMenu(menu, Config.Languages[lang]['infoupdate'], "Huge Thank You ❤️", "", Menuthing, Menuthing)
|
||||
else
|
||||
infomenu = _menuPool:AddSubMenu(menu, Config.Languages[lang]['infoupdateav'], Config.Languages[lang]['infoupdateavtext'], "", Menuthing, Menuthing)
|
||||
infomenu = _menuPool:AddSubMenu(menu, Config.Languages[lang]['infoupdateav'], Config.Languages[lang]['infoupdateavtext'], "", Menuthing, Menuthing)
|
||||
end
|
||||
contact = NativeUI.CreateItem(Config.Languages[lang]['suggestions'], Config.Languages[lang]['suggestionsinfo'])
|
||||
u170 = NativeUI.CreateItem("1.7.0", "Added /emotebind [key] [emote]!")
|
||||
u165 = NativeUI.CreateItem("1.6.5", "Updated camera/phone/pee/beg, added makeitrain/dance(glowstick/horse).")
|
||||
u160 = NativeUI.CreateItem("1.6.0", "Added shared emotes /nearby, or in menu, also fixed some emotes!")
|
||||
u151 = NativeUI.CreateItem("1.5.1", "Added /walk and /walks, for walking styles without menu")
|
||||
u150 = NativeUI.CreateItem("1.5.0", "Added Facial Expressions menu (if enabled by server owner)")
|
||||
u170 = NativeUI.CreateItem("Thanks", "DullPear for the original dpemotes ❤️")
|
||||
u165 = NativeUI.CreateItem("Thanks", "AvaN0x for assisting with the formatting of the code.")
|
||||
u160 = NativeUI.CreateItem("Thanks", "SMGMissy for the custom pride flags 🏳️🌈.")
|
||||
u151 = NativeUI.CreateItem("Thanks", "Kibook for the addition of Animal Emotes 🐩.")
|
||||
u150 = NativeUI.CreateItem("Thanks", "To you, the community for helping me keep this menu alive ❤️.")
|
||||
infomenu:AddItem(contact)
|
||||
infomenu:AddItem(u170)
|
||||
infomenu:AddItem(u165)
|
||||
@@ -284,10 +299,10 @@ end
|
||||
AddEmoteMenu(mainMenu)
|
||||
AddCancelEmote(mainMenu)
|
||||
if Config.WalkingStylesEnabled then
|
||||
AddWalkMenu(mainMenu)
|
||||
AddWalkMenu(mainMenu)
|
||||
end
|
||||
if Config.ExpressionsEnabled then
|
||||
AddFaceMenu(mainMenu)
|
||||
AddFaceMenu(mainMenu)
|
||||
end
|
||||
|
||||
_menuPool:RefreshIndex()
|
||||
@@ -308,5 +323,5 @@ end)
|
||||
|
||||
RegisterNetEvent("dp:RecieveMenu") -- For opening the emote menu from another resource.
|
||||
AddEventHandler("dp:RecieveMenu", function()
|
||||
OpenEmoteMenu()
|
||||
end)
|
||||
OpenEmoteMenu()
|
||||
end)
|
||||
|
||||
@@ -1,104 +1,126 @@
|
||||
if Config.SqlKeybinding then
|
||||
local emob1 = ""
|
||||
local emob2 = ""
|
||||
local emob3 = ""
|
||||
local emob4 = ""
|
||||
local emob5 = ""
|
||||
local emob6 = ""
|
||||
local keyb1 = ""
|
||||
local keyb2 = ""
|
||||
local keyb3 = ""
|
||||
local keyb4 = ""
|
||||
local keyb5 = ""
|
||||
local keyb6 = ""
|
||||
local Initialized = false
|
||||
local emob1 = ""
|
||||
local emob2 = ""
|
||||
local emob3 = ""
|
||||
local emob4 = ""
|
||||
local emob5 = ""
|
||||
local emob6 = ""
|
||||
local keyb1 = ""
|
||||
local keyb2 = ""
|
||||
local keyb3 = ""
|
||||
local keyb4 = ""
|
||||
local keyb5 = ""
|
||||
local keyb6 = ""
|
||||
local Initialized = false
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
-- Commands / Events --------------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
-- Commands / Events --------------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
|
||||
if NetworkIsPlayerActive(PlayerId()) and not Initialized then
|
||||
if not Initialized then
|
||||
TriggerServerEvent("dp:ServerKeybindExist")
|
||||
Wait(5000)
|
||||
end
|
||||
end
|
||||
|
||||
if not IsPedSittingInAnyVehicle(PlayerPedId()) then
|
||||
for k, v in pairs(Config.KeybindKeys) do
|
||||
if IsControlJustReleased(0, v) then
|
||||
if k == keyb1 then if emob1 ~= "" then EmoteCommandStart(nil,{emob1, 0}) end end
|
||||
if k == keyb2 then if emob2 ~= "" then EmoteCommandStart(nil,{emob2, 0}) end end
|
||||
if k == keyb3 then if emob3 ~= "" then EmoteCommandStart(nil,{emob3, 0}) end end
|
||||
if k == keyb4 then if emob4 ~= "" then EmoteCommandStart(nil,{emob4, 0}) end end
|
||||
if k == keyb5 then if emob5 ~= "" then EmoteCommandStart(nil,{emob5, 0}) end end
|
||||
if k == keyb6 then if emob6 ~= "" then EmoteCommandStart(nil,{emob6, 0}) end end
|
||||
Wait(1000)
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
if NetworkIsPlayerActive(PlayerId()) and not Initialized then
|
||||
if not Initialized then
|
||||
TriggerServerEvent("dp:ServerKeybindExist")
|
||||
Wait(5000)
|
||||
end
|
||||
end
|
||||
|
||||
if not IsPedSittingInAnyVehicle(PlayerPedId()) then
|
||||
for k, v in pairs(Config.KeybindKeys) do
|
||||
if IsControlJustReleased(0, v) then
|
||||
if k == keyb1 then if emob1 ~= "" then EmoteCommandStart(nil, { emob1, 0 }) end end
|
||||
if k == keyb2 then if emob2 ~= "" then EmoteCommandStart(nil, { emob2, 0 }) end end
|
||||
if k == keyb3 then if emob3 ~= "" then EmoteCommandStart(nil, { emob3, 0 }) end end
|
||||
if k == keyb4 then if emob4 ~= "" then EmoteCommandStart(nil, { emob4, 0 }) end end
|
||||
if k == keyb5 then if emob5 ~= "" then EmoteCommandStart(nil, { emob5, 0 }) end end
|
||||
if k == keyb6 then if emob6 ~= "" then EmoteCommandStart(nil, { emob6, 0 }) end end
|
||||
Wait(1000)
|
||||
end
|
||||
end
|
||||
end
|
||||
Citizen.Wait(1)
|
||||
end
|
||||
end
|
||||
Citizen.Wait(1)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("dp:ClientKeybindExist")
|
||||
AddEventHandler("dp:ClientKeybindExist", function(does)
|
||||
if does then
|
||||
TriggerServerEvent("dp:ServerKeybindGrab")
|
||||
else
|
||||
TriggerServerEvent("dp:ServerKeybindCreate")
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("dp:ClientKeybindGet")
|
||||
AddEventHandler("dp:ClientKeybindGet", function(k1, e1, k2, e2, k3, e3, k4, e4, k5, e5, k6, e6)
|
||||
keyb1 = k1 emob1 = e1 keyb2 = k2 emob2 = e2 keyb3 = k3 emob3 = e3 keyb4 = k4 emob4 = e4 keyb5 = k5 emob5 = e5 keyb6 = k6 emob6 = e6
|
||||
Initialized = true
|
||||
end)
|
||||
|
||||
RegisterNetEvent("dp:ClientKeybindGetOne")
|
||||
AddEventHandler("dp:ClientKeybindGetOne", function(key, e)
|
||||
SimpleNotify(Config.Languages[lang]['bound'].."~y~"..e.."~w~ "..Config.Languages[lang]['to'].." ~g~"..firstToUpper(key).."~w~")
|
||||
if key == "num4" then emob1 = e keyb1 = "num4" elseif key == "num5" then emob2 = e keyb2 = "num5" elseif key == "num6" then emob3 = e keyb3 = "num6" elseif key == "num7" then emob4 = e keyb4 = "num7" elseif key == "num8" then emob5 = e keyb5 = "num8" elseif key == "num9" then emob6 = e keyb6 = "num9" end
|
||||
end)
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
------ Functions and stuff --------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
function EmoteBindsStart()
|
||||
EmoteChatMessage(Config.Languages[lang]['currentlyboundemotes'].."\n"
|
||||
..firstToUpper(keyb1).." = '^2"..emob1.."^7'\n"
|
||||
..firstToUpper(keyb2).." = '^2"..emob2.."^7'\n"
|
||||
..firstToUpper(keyb3).." = '^2"..emob3.."^7'\n"
|
||||
..firstToUpper(keyb4).." = '^2"..emob4.."^7'\n"
|
||||
..firstToUpper(keyb5).." = '^2"..emob5.."^7'\n"
|
||||
..firstToUpper(keyb6).." = '^2"..emob6.."^7'\n")
|
||||
end
|
||||
|
||||
function EmoteBindStart(source, args, raw)
|
||||
if #args > 0 then
|
||||
local key = string.lower(args[1])
|
||||
local emote = string.lower(args[2])
|
||||
if (Config.KeybindKeys[key]) ~= nil then
|
||||
if DP.Emotes[emote] ~= nil then
|
||||
TriggerServerEvent("dp:ServerKeybindUpdate", key, emote)
|
||||
elseif DP.Dances[emote] ~= nil then
|
||||
TriggerServerEvent("dp:ServerKeybindUpdate", key, emote)
|
||||
elseif DP.PropEmotes[emote] ~= nil then
|
||||
TriggerServerEvent("dp:ServerKeybindUpdate", key, emote)
|
||||
else
|
||||
EmoteChatMessage("'"..emote.."' "..Config.Languages[lang]['notvalidemote'].."")
|
||||
end
|
||||
RegisterNetEvent("dp:ClientKeybindExist")
|
||||
AddEventHandler("dp:ClientKeybindExist", function(does)
|
||||
if does then
|
||||
TriggerServerEvent("dp:ServerKeybindGrab")
|
||||
else
|
||||
EmoteChatMessage("'"..key.."' "..Config.Languages[lang]['notvalidkey'])
|
||||
TriggerServerEvent("dp:ServerKeybindCreate")
|
||||
end
|
||||
else
|
||||
print("invalid")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
end
|
||||
RegisterNetEvent("dp:ClientKeybindGet")
|
||||
AddEventHandler("dp:ClientKeybindGet", function(k1, e1, k2, e2, k3, e3, k4, e4, k5, e5, k6, e6)
|
||||
keyb1 = k1
|
||||
emob1 = e1
|
||||
keyb2 = k2
|
||||
emob2 = e2
|
||||
keyb3 = k3
|
||||
emob3 = e3
|
||||
keyb4 = k4
|
||||
emob4 = e4
|
||||
keyb5 = k5
|
||||
emob5 = e5
|
||||
keyb6 = k6
|
||||
emob6 = e6
|
||||
Initialized = true
|
||||
end)
|
||||
|
||||
RegisterNetEvent("dp:ClientKeybindGetOne")
|
||||
AddEventHandler("dp:ClientKeybindGetOne", function(key, e)
|
||||
SimpleNotify(Config.Languages[lang]['bound'] .. "~y~" .. e .. "~w~ " .. Config.Languages[lang]['to'] .. " ~g~" .. firstToUpper(key) .. "~w~")
|
||||
if key == "num4" then emob1 = e
|
||||
keyb1 = "num4"
|
||||
elseif key == "num5" then emob2 = e
|
||||
keyb2 = "num5"
|
||||
elseif key == "num6" then emob3 = e
|
||||
keyb3 = "num6"
|
||||
elseif key == "num7" then emob4 = e
|
||||
keyb4 = "num7"
|
||||
elseif key == "num8" then emob5 = e
|
||||
keyb5 = "num8"
|
||||
elseif key == "num9" then emob6 = e
|
||||
keyb6 = "num9"
|
||||
end
|
||||
end)
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
------ Functions and stuff --------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
function EmoteBindsStart()
|
||||
EmoteChatMessage(Config.Languages[lang]['currentlyboundemotes'] .. "\n"
|
||||
.. firstToUpper(keyb1) .. " = '^2" .. emob1 .. "^7'\n"
|
||||
.. firstToUpper(keyb2) .. " = '^2" .. emob2 .. "^7'\n"
|
||||
.. firstToUpper(keyb3) .. " = '^2" .. emob3 .. "^7'\n"
|
||||
.. firstToUpper(keyb4) .. " = '^2" .. emob4 .. "^7'\n"
|
||||
.. firstToUpper(keyb5) .. " = '^2" .. emob5 .. "^7'\n"
|
||||
.. firstToUpper(keyb6) .. " = '^2" .. emob6 .. "^7'\n")
|
||||
end
|
||||
|
||||
function EmoteBindStart(source, args, raw)
|
||||
if #args > 0 then
|
||||
local key = string.lower(args[1])
|
||||
local emote = string.lower(args[2])
|
||||
if (Config.KeybindKeys[key]) ~= nil then
|
||||
if DP.Emotes[emote] ~= nil then
|
||||
TriggerServerEvent("dp:ServerKeybindUpdate", key, emote)
|
||||
elseif DP.Dances[emote] ~= nil then
|
||||
TriggerServerEvent("dp:ServerKeybindUpdate", key, emote)
|
||||
elseif DP.PropEmotes[emote] ~= nil then
|
||||
TriggerServerEvent("dp:ServerKeybindUpdate", key, emote)
|
||||
else
|
||||
EmoteChatMessage("'" .. emote .. "' " .. Config.Languages[lang]['notvalidemote'] .. "")
|
||||
end
|
||||
else
|
||||
EmoteChatMessage("'" .. key .. "' " .. Config.Languages[lang]['notvalidkey'])
|
||||
end
|
||||
else
|
||||
print("invalid")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
local isInRagdoll = false
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Citizen.Wait(10)
|
||||
if isInRagdoll then
|
||||
SetPedToRagdoll(GetPlayerPed(-1), 1000, 1000, 0, 0, 0, 0)
|
||||
while true do
|
||||
Citizen.Wait(10)
|
||||
if isInRagdoll then
|
||||
SetPedToRagdoll(PlayerPedId(), 1000, 1000, 0, 0, 0, 0)
|
||||
end
|
||||
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)
|
||||
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
|
||||
end)
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
local isRequestAnim = false
|
||||
local requestedemote = ''
|
||||
local targetPlayerId = ''
|
||||
|
||||
-- Some of the work here was done by Super.Cool.Ninja / rubbertoe98
|
||||
-- https://forum.fivem.net/t/release-nanimstarget/876709
|
||||
@@ -12,19 +13,20 @@ if Config.SharedEmotesEnabled then
|
||||
if #args > 0 then
|
||||
local emotename = string.lower(args[1])
|
||||
target, distance = GetClosestPlayer()
|
||||
if(distance ~= -1 and distance < 3) then
|
||||
if (distance ~= -1 and distance < 3) then
|
||||
if DP.Shared[emotename] ~= nil then
|
||||
dict, anim, ename = table.unpack(DP.Shared[emotename])
|
||||
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), emotename)
|
||||
SimpleNotify(Config.Languages[lang]['sentrequestto']..GetPlayerName(target).." ~w~(~g~"..ename.."~w~)")
|
||||
SimpleNotify(Config.Languages[lang]['sentrequestto'] ..
|
||||
GetPlayerName(target) .. " ~w~(~g~" .. ename .. "~w~)")
|
||||
else
|
||||
EmoteChatMessage("'"..emotename.."' "..Config.Languages[lang]['notvalidsharedemote'].."")
|
||||
EmoteChatMessage("'" .. emotename .. "' " .. Config.Languages[lang]['notvalidsharedemote'] .. "")
|
||||
end
|
||||
else
|
||||
SimpleNotify(Config.Languages[lang]['nobodyclose'])
|
||||
end
|
||||
else
|
||||
MearbysOnCommand()
|
||||
MearbysOnCommand()
|
||||
end
|
||||
end, false)
|
||||
end
|
||||
@@ -33,62 +35,119 @@ RegisterNetEvent("SyncPlayEmote")
|
||||
AddEventHandler("SyncPlayEmote", function(emote, player)
|
||||
EmoteCancel()
|
||||
Wait(300)
|
||||
targetPlayerId = player
|
||||
-- wait a little to make sure animation shows up right on both clients after canceling any previous emote
|
||||
if DP.Shared[emote] ~= nil then
|
||||
if OnEmotePlay(DP.Shared[emote]) then end return
|
||||
if DP.Shared[emote].AnimationOptions and DP.Shared[emote].AnimationOptions.Attachto then
|
||||
-- We do not want to attach the player if the target emote already is attached to player
|
||||
-- this would cause issue where both player would be attached to each other and fall under the map
|
||||
local targetEmote = DP.Shared[emote][4]
|
||||
if not targetEmote or not DP.Shared[targetEmote] or not DP.Shared[targetEmote].AnimationOptions or
|
||||
not DP.Shared[targetEmote].AnimationOptions.Attachto then
|
||||
local plyServerId = GetPlayerFromServerId(player)
|
||||
local pedInFront = GetPlayerPed(plyServerId ~= 0 and plyServerId or GetClosestPlayer())
|
||||
local bone = DP.Shared[emote].AnimationOptions.bone or 11816 -- SKEL_Pelvis
|
||||
local xPos = DP.Shared[emote].AnimationOptions.xPos or 0.0
|
||||
local yPos = DP.Shared[emote].AnimationOptions.yPos or 0.0
|
||||
local zPos = DP.Shared[emote].AnimationOptions.zPos or 0.0
|
||||
local xRot = DP.Shared[emote].AnimationOptions.xRot or 0.0
|
||||
local yRot = DP.Shared[emote].AnimationOptions.yRot or 0.0
|
||||
local zRot = DP.Shared[emote].AnimationOptions.zRot or 0.0
|
||||
AttachEntityToEntity(PlayerPedId(), pedInFront, bone, xPos, yPos, zPos, xRot, yRot, zRot, false, false,
|
||||
false, false, 2, false)
|
||||
end
|
||||
end
|
||||
|
||||
if OnEmotePlay(DP.Shared[emote]) then end
|
||||
return
|
||||
elseif DP.Dances[emote] ~= nil then
|
||||
if OnEmotePlay(DP.Dances[emote]) then end return
|
||||
if OnEmotePlay(DP.Dances[emote]) then end
|
||||
return
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("SyncPlayEmoteSource")
|
||||
AddEventHandler("SyncPlayEmoteSource", function(emote, player)
|
||||
-- Thx to Poggu for this part!
|
||||
local pedInFront = GetPlayerPed(GetClosestPlayer())
|
||||
local ply = PlayerPedId()
|
||||
local plyServerId = GetPlayerFromServerId(player)
|
||||
local pedInFront = GetPlayerPed(plyServerId ~= 0 and plyServerId or GetClosestPlayer())
|
||||
|
||||
local heading = GetEntityHeading(pedInFront)
|
||||
local coords = GetOffsetFromEntityInWorldCoords(pedInFront, 0.0, 1.0, 0.0)
|
||||
if (DP.Shared[emote]) and (DP.Shared[emote].AnimationOptions) then
|
||||
local SyncOffsetFront = DP.Shared[emote].AnimationOptions.SyncOffsetFront
|
||||
if SyncOffsetFront then
|
||||
coords = GetOffsetFromEntityInWorldCoords(pedInFront, 0.0, SyncOffsetFront, 0.0)
|
||||
end
|
||||
if (DP.Shared[emote] and DP.Shared[emote].AnimationOptions) then
|
||||
local SyncOffsetFront = DP.Shared[emote].AnimationOptions.SyncOffsetFront
|
||||
if SyncOffsetFront then
|
||||
coords = GetOffsetFromEntityInWorldCoords(pedInFront, 0.0, SyncOffsetFront, 0.0)
|
||||
end
|
||||
|
||||
-- There is a priority to the source attached, if it is not set, it will use the target
|
||||
if (DP.Shared[emote].AnimationOptions.Attachto) then
|
||||
local bone = DP.Shared[emote].AnimationOptions.bone or 11816 -- SKEL_Pelvis
|
||||
local xPos = DP.Shared[emote].AnimationOptions.xPos or 0.0
|
||||
local yPos = DP.Shared[emote].AnimationOptions.yPos or 0.0
|
||||
local zPos = DP.Shared[emote].AnimationOptions.zPos or 0.0
|
||||
local xRot = DP.Shared[emote].AnimationOptions.xRot or 0.0
|
||||
local yRot = DP.Shared[emote].AnimationOptions.yRot or 0.0
|
||||
local zRot = DP.Shared[emote].AnimationOptions.zRot or 0.0
|
||||
AttachEntityToEntity(ply, pedInFront, bone, xPos, yPos, zPos, xRot, yRot, zRot, false, false, false, false,
|
||||
2, false)
|
||||
end
|
||||
end
|
||||
SetEntityHeading(PlayerPedId(), heading - 180.1)
|
||||
SetEntityCoordsNoOffset(PlayerPedId(), coords.x, coords.y, coords.z, 0)
|
||||
SetEntityHeading(ply, heading - 180.1)
|
||||
SetEntityCoordsNoOffset(ply, coords.x, coords.y, coords.z, 0)
|
||||
EmoteCancel()
|
||||
Wait(300)
|
||||
targetPlayerId = player
|
||||
if DP.Shared[emote] ~= nil then
|
||||
if OnEmotePlay(DP.Shared[emote]) then end return
|
||||
if OnEmotePlay(DP.Shared[emote]) then end
|
||||
return
|
||||
elseif DP.Dances[emote] ~= nil then
|
||||
if OnEmotePlay(DP.Dances[emote]) then end return
|
||||
if OnEmotePlay(DP.Dances[emote]) then end
|
||||
return
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("SyncCancelEmote")
|
||||
AddEventHandler("SyncCancelEmote", function(player)
|
||||
if targetPlayerId and targetPlayerId == player then
|
||||
targetPlayerId = nil
|
||||
EmoteCancel()
|
||||
end
|
||||
end)
|
||||
|
||||
function CancelSharedEmote(ply)
|
||||
if targetPlayerId then
|
||||
TriggerServerEvent("ServerEmoteCancel", targetPlayerId)
|
||||
targetPlayerId = nil
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent("ClientEmoteRequestReceive")
|
||||
AddEventHandler("ClientEmoteRequestReceive", function(emotename, etype)
|
||||
isRequestAnim = true
|
||||
requestedemote = emotename
|
||||
|
||||
if etype == 'Dances' then
|
||||
_,_,remote = table.unpack(DP.Dances[requestedemote])
|
||||
_, _, remote = table.unpack(DP.Dances[requestedemote])
|
||||
else
|
||||
_,_,remote = table.unpack(DP.Shared[requestedemote])
|
||||
_, _, remote = table.unpack(DP.Shared[requestedemote])
|
||||
end
|
||||
|
||||
PlaySound(-1, "NAV", "HUD_AMMO_SHOP_SOUNDSET", 0, 0, 1)
|
||||
SimpleNotify(Config.Languages[lang]['doyouwanna']..remote.."~w~)")
|
||||
SimpleNotify(Config.Languages[lang]['doyouwanna'] .. remote .. "~w~)")
|
||||
end)
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Citizen.Wait(5)
|
||||
if IsControlJustPressed(1, 246) and isRequestAnim then
|
||||
target, distance = GetClosestPlayer()
|
||||
if(distance ~= -1 and distance < 3) then
|
||||
target, distance = GetClosestPlayer()
|
||||
if (distance ~= -1 and distance < 3) then
|
||||
if DP.Shared[requestedemote] ~= nil then
|
||||
_,_,_,otheremote = table.unpack(DP.Shared[requestedemote])
|
||||
_, _, _, otheremote = table.unpack(DP.Shared[requestedemote])
|
||||
elseif DP.Dances[requestedemote] ~= nil then
|
||||
_,_,_,otheremote = table.unpack(DP.Dances[requestedemote])
|
||||
_, _, _, otheremote = table.unpack(DP.Dances[requestedemote])
|
||||
end
|
||||
if otheremote == nil then otheremote = requestedemote end
|
||||
TriggerServerEvent("ServerValidEmote", GetPlayerServerId(target), requestedemote, otheremote)
|
||||
@@ -108,7 +167,7 @@ end)
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
function GetPlayerFromPed(ped)
|
||||
for _,player in ipairs(GetActivePlayers()) do
|
||||
for _, player in ipairs(GetActivePlayers()) do
|
||||
if GetPlayerPed(player) == ped then
|
||||
return player
|
||||
end
|
||||
@@ -121,39 +180,41 @@ function GetPedInFront()
|
||||
local plyPed = GetPlayerPed(player)
|
||||
local plyPos = GetEntityCoords(plyPed, false)
|
||||
local plyOffset = GetOffsetFromEntityInWorldCoords(plyPed, 0.0, 1.3, 0.0)
|
||||
local rayHandle = StartShapeTestCapsule(plyPos.x, plyPos.y, plyPos.z, plyOffset.x, plyOffset.y, plyOffset.z, 10.0, 12, plyPed, 7)
|
||||
local rayHandle = StartShapeTestCapsule(plyPos.x, plyPos.y, plyPos.z, plyOffset.x, plyOffset.y, plyOffset.z, 10.0, 12
|
||||
, plyPed, 7)
|
||||
local _, _, _, _, ped2 = GetShapeTestResult(rayHandle)
|
||||
return ped2
|
||||
end
|
||||
|
||||
function MearbysOnCommand(source, args, raw)
|
||||
local NearbysCommand = ""
|
||||
for a in pairsByKeys(DP.Shared) do
|
||||
NearbysCommand = NearbysCommand .. ""..a..", "
|
||||
end
|
||||
EmoteChatMessage(NearbysCommand)
|
||||
EmoteChatMessage(Config.Languages[lang]['emotemenucmd'])
|
||||
local NearbysCommand = ""
|
||||
for a in pairsByKeys(DP.Shared) do
|
||||
NearbysCommand = NearbysCommand .. "" .. a .. ", "
|
||||
end
|
||||
EmoteChatMessage(NearbysCommand)
|
||||
EmoteChatMessage(Config.Languages[lang]['emotemenucmd'])
|
||||
end
|
||||
|
||||
function SimpleNotify(message)
|
||||
SetNotificationTextEntry("STRING")
|
||||
AddTextComponentString(message)
|
||||
DrawNotification(0,1)
|
||||
DrawNotification(0, 1)
|
||||
end
|
||||
|
||||
function GetClosestPlayer()
|
||||
local players = GetPlayers()
|
||||
local closestDistance = -1
|
||||
local closestPlayer = -1
|
||||
local ply = GetPlayerPed(-1)
|
||||
local ply = PlayerPedId()
|
||||
local plyCoords = GetEntityCoords(ply, 0)
|
||||
|
||||
for index,value in ipairs(players) do
|
||||
for index, value in ipairs(players) do
|
||||
local target = GetPlayerPed(value)
|
||||
if(target ~= ply) then
|
||||
if (target ~= ply) then
|
||||
local targetCoords = GetEntityCoords(GetPlayerPed(value), 0)
|
||||
local distance = GetDistanceBetweenCoords(targetCoords["x"], targetCoords["y"], targetCoords["z"], plyCoords["x"], plyCoords["y"], plyCoords["z"], true)
|
||||
if(closestDistance == -1 or closestDistance > distance) then
|
||||
local distance = GetDistanceBetweenCoords(targetCoords["x"], targetCoords["y"], targetCoords["z"],
|
||||
plyCoords["x"], plyCoords["y"], plyCoords["z"], true)
|
||||
if (closestDistance == -1 or closestDistance > distance) then
|
||||
closestPlayer = value
|
||||
closestDistance = distance
|
||||
end
|
||||
@@ -172,4 +233,4 @@ function GetPlayers()
|
||||
end
|
||||
|
||||
return players
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,36 +1,41 @@
|
||||
function WalkMenuStart(name)
|
||||
RequestWalking(name)
|
||||
SetPedMovementClipset(PlayerPedId(), name, 0.2)
|
||||
RemoveAnimSet(name)
|
||||
RequestWalking(name)
|
||||
SetPedMovementClipset(PlayerPedId(), name, 0.2)
|
||||
RemoveAnimSet(name)
|
||||
end
|
||||
|
||||
function RequestWalking(set)
|
||||
RequestAnimSet(set)
|
||||
while not HasAnimSetLoaded(set) do
|
||||
Citizen.Wait(1)
|
||||
end
|
||||
RequestAnimSet(set)
|
||||
while not HasAnimSetLoaded(set) do
|
||||
Citizen.Wait(1)
|
||||
end
|
||||
end
|
||||
|
||||
function WalksOnCommand(source, args, raw)
|
||||
local WalksCommand = ""
|
||||
for a in pairsByKeys(DP.Walks) do
|
||||
WalksCommand = WalksCommand .. ""..string.lower(a)..", "
|
||||
end
|
||||
EmoteChatMessage(WalksCommand)
|
||||
EmoteChatMessage("To reset do /walk reset")
|
||||
local WalksCommand = ""
|
||||
for a in pairsByKeys(DP.Walks) do
|
||||
WalksCommand = WalksCommand .. "" .. string.lower(a) .. ", "
|
||||
end
|
||||
EmoteChatMessage(WalksCommand)
|
||||
EmoteChatMessage("To reset do /walk reset")
|
||||
end
|
||||
|
||||
function WalkCommandStart(source, args, raw)
|
||||
local name = firstToUpper(args[1])
|
||||
local name = firstToUpper(args[1])
|
||||
|
||||
if name == "Reset" then
|
||||
ResetPedMovementClipset(PlayerPedId()) return
|
||||
end
|
||||
if name == "Reset" then
|
||||
ResetPedMovementClipset(PlayerPedId())
|
||||
return
|
||||
end
|
||||
|
||||
local name2 = table.unpack(DP.Walks[name])
|
||||
if name2 ~= nil then
|
||||
WalkMenuStart(name2)
|
||||
else
|
||||
EmoteChatMessage("'"..name.."' is not a valid walk")
|
||||
end
|
||||
end
|
||||
if tableHasKey(DP.Walks, name) then
|
||||
local name2 = table.unpack(DP.Walks[name])
|
||||
WalkMenuStart(name2)
|
||||
else
|
||||
EmoteChatMessage("'" .. name .. "' is not a valid walk")
|
||||
end
|
||||
end
|
||||
|
||||
function tableHasKey(table, key)
|
||||
return table[key] ~= nil
|
||||
end
|
||||
|
||||
@@ -1,40 +1,44 @@
|
||||
Config = {
|
||||
-- Change the language of the menu here!.
|
||||
-- Note fr and de are google translated, if you would like to help out with translation / just fix it for your server check below and change translations yourself
|
||||
-- try en, fr, de or sv.
|
||||
MenuLanguage = 'en',
|
||||
-- Set this to true to enable some extra prints
|
||||
DebugDisplay = false,
|
||||
-- Set this to false if you have something else on X, and then just use /e c to cancel emotes.
|
||||
EnableXtoCancel = true,
|
||||
-- Set this to true if you want to disarm the player when they play an emote.
|
||||
DisarmPlayer= false,
|
||||
-- Set this if you really wanna disable emotes in cars, as of 1.7.2 they only play the upper body part if in vehicle
|
||||
-- Change the language of the menu here!.
|
||||
-- Note fr and de are google translated, if you would like to help out with translations, feel free to send me an 'issue' on Github.
|
||||
-- Thank you to those who provided translations.
|
||||
--
|
||||
|
||||
MenuLanguage = 'en',
|
||||
-- Set this to true to enable some extra prints
|
||||
DebugDisplay = false,
|
||||
-- Set this to false if you have something else on X, and then just use /e c to cancel emotes.
|
||||
EnableXtoCancel = true,
|
||||
-- Set this to true if you want to disarm the player when they play an emote.
|
||||
DisarmPlayer = false,
|
||||
-- Set this if you really wanna disable emotes in cars, as of 1.7.2 they only play the upper body part if in vehicle
|
||||
AllowedInCars = true,
|
||||
-- You can disable the (F3) menu here / change the keybind.
|
||||
MenuKeybindEnabled = true,
|
||||
MenuKeybind = 167, -- Get the button number here https://docs.fivem.net/game-references/controls/
|
||||
-- You can disable the Favorite emote keybinding here.
|
||||
FavKeybindEnabled = false,
|
||||
FavKeybind = 171, -- Get the button number here https://docs.fivem.net/game-references/controls/
|
||||
-- You can change the header image for the f3 menu here
|
||||
-- Use a 512 x 128 image!
|
||||
-- NOte this might cause an issue of the image getting stuck on peoples screens
|
||||
CustomMenuEnabled = false,
|
||||
MenuImage = "https://i.imgur.com/kgzvDwQ.png",
|
||||
-- You can change the menu position here
|
||||
MenuPosition = "right", -- (left, right)
|
||||
-- You can disable the Ragdoll keybinding here.
|
||||
RagdollEnabled = true,
|
||||
RagdollKeybind = 303, -- Get the button number here https://docs.fivem.net/game-references/controls/
|
||||
-- You can disable the Facial Expressions menu here.
|
||||
ExpressionsEnabled = true,
|
||||
-- You can disable the Walking Styles menu here.
|
||||
WalkingStylesEnabled = true,
|
||||
-- You can disable the Shared Emotes here.
|
||||
-- You can disable the menu here / change the keybind. It is currently set to F3
|
||||
MenuKeybindEnabled = false,
|
||||
MenuKeybind = 'DELETE', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
||||
-- You can disable the Favorite emote keybinding here.
|
||||
FavKeybindEnabled = false,
|
||||
FavKeybind = 256, -- Get the button number here https://docs.fivem.net/game-references/controls/
|
||||
-- You can change the header image for the menu here
|
||||
-- Use a 512 x 128 image!
|
||||
-- Note this might cause an issue of the image getting stuck on peoples screens
|
||||
CustomMenuEnabled = true,
|
||||
MenuImage = "https://i.imgur.com/SLuIdBo.png", ----[Custom banner imgur URLs go here ]---
|
||||
-- You can change the menu image by pasting a link above. It must be the same width and length
|
||||
--
|
||||
-- You can change the menu position here
|
||||
MenuPosition = "right", -- (left, right)
|
||||
-- You can enable or disable the Ragdoll keybinding here.
|
||||
RagdollEnabled = true,
|
||||
RagdollKeybind = 303, -- Get the button number here https://docs.fivem.net/game-references/controls/
|
||||
-- You can disable the Facial Expressions menu here.
|
||||
ExpressionsEnabled = true,
|
||||
-- You can disable the Walking Styles menu here.
|
||||
WalkingStylesEnabled = true,
|
||||
-- You can disable the Shared Emotes here.
|
||||
SharedEmotesEnabled = true,
|
||||
CheckForUpdates = true,
|
||||
-- If you have the SQL imported enable this to turn on keybinding.
|
||||
CheckForUpdates = false,
|
||||
-- If you have the SQL imported enable this to turn on keybinding.
|
||||
SqlKeybinding = false,
|
||||
}
|
||||
|
||||
@@ -48,9 +52,10 @@ Config.KeybindKeys = {
|
||||
}
|
||||
|
||||
Config.Languages = {
|
||||
['en'] = {
|
||||
['emotes'] = 'Emotes',
|
||||
['en'] = { -- English 🇬🇧
|
||||
['emotes'] = 'Emotes 🎬',
|
||||
['danceemotes'] = "🕺 Dance Emotes",
|
||||
['animalemotes'] = "🐩 Animal Emotes",
|
||||
['propemotes'] = "📦 Prop Emotes",
|
||||
['favoriteemotes'] = "🌟 Favorite",
|
||||
['favoriteinfo'] = "Select an emote here to set it as your favorite.",
|
||||
@@ -59,17 +64,17 @@ Config.Languages = {
|
||||
['set'] = "Set (",
|
||||
['setboundemote'] = ") to be your bound emote?",
|
||||
['newsetemote'] = "~w~ is now your bound emote, press ~g~CapsLock~w~ to use it.",
|
||||
['cancelemote'] = "Cancel Emote",
|
||||
['cancelemote'] = "Cancel Emote 🚷",
|
||||
['cancelemoteinfo'] = "~r~X~w~ Cancels the currently playing emote",
|
||||
['walkingstyles'] = "Walking Styles",
|
||||
['walkingstyles'] = "Walking Styles 🚶🏻♂️",
|
||||
['resetdef'] = "Reset to default",
|
||||
['normalreset'] = "Normal (Reset)",
|
||||
['moods'] = "Moods",
|
||||
['infoupdate'] = "Information",
|
||||
['moods'] = "Moods 😒",
|
||||
['infoupdate'] = "Credits & Suggestions 🙏🏻",
|
||||
['infoupdateav'] = "Information (Update available)",
|
||||
['infoupdateavtext'] = "An update is available, get the latest version from ~y~https://github.com/andristum/dpemotes~w~",
|
||||
['infoupdateavtext'] = "An update is available, get the latest version from ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
||||
['suggestions'] = "Suggestions?",
|
||||
['suggestionsinfo'] = "'dullpear_dev' on FiveM forums for any feature/emote suggestions! ✉️",
|
||||
['suggestionsinfo'] = "'TayMcKenzieNZ' on FiveM forums for any feature/emote suggestions! ✉️",
|
||||
['notvaliddance'] = "is not a valid dance.",
|
||||
['notvalidemote'] = "is not a valid emote.",
|
||||
['nocancel'] = "No emote to cancel.",
|
||||
@@ -88,63 +93,115 @@ Config.Languages = {
|
||||
['makeitrain'] = "Press ~y~G~w~ to make it rain.",
|
||||
['pee'] = "Hold ~y~G~w~ to pee.",
|
||||
['spraychamp'] = "Hold ~y~G~w~ to spray champagne",
|
||||
['stun'] = "Press ~y~G~w~ to 'use' stun gun.",
|
||||
['bound'] = "Bound ",
|
||||
['to'] = "to",
|
||||
['currentlyboundemotes'] = " Currently bound emotes:",
|
||||
['notvalidkey'] = "is not a valid key.",
|
||||
['keybinds'] = "🔢 Keybinds",
|
||||
['keybindsinfo'] = "Use"
|
||||
},
|
||||
['fr'] = {
|
||||
['emotes'] = 'Emotes',
|
||||
['danceemotes'] = "🕺 Emotes de danse",
|
||||
['propemotes'] = "📦 Em Prop Emotes",
|
||||
},
|
||||
['cs'] = { -- Czech 🇨🇿
|
||||
['emotes'] = 'Animace 🎬',
|
||||
['danceemotes'] = "🕺 Taneční Animace",
|
||||
['animalemotes'] = "🐩 zvířecí Animace",
|
||||
['propemotes'] = "📦 Animace s předměty",
|
||||
['favoriteemotes'] = "🌟 Oblíbené",
|
||||
['favoriteinfo'] = "Vyberte si animaci a nastavte ji jako svou oblíbenou.",
|
||||
['rfavorite'] = "Obnovit oblíbené",
|
||||
['prop2info'] = "❓ Pomůcky se mohou nacházet na konci",
|
||||
['set'] = "Nastavit",
|
||||
['setboundemote'] = "Nastavit jako vaši animaci?",
|
||||
['newsetemote'] = "~w~ je nyní vaší novou nastavenou animací. Chcete-li jej použít, stiskněte ~g~CapsLock~w~.",
|
||||
['cancelemote'] = "Zrušit animaci 🚷",
|
||||
['cancelemoteinfo'] = "~r~X~w~ Zruší aktuálně přehrávanou animaci",
|
||||
['walkingstyles'] = "Styly chůze 🚶🏻♂️",
|
||||
['resetdef'] = "Obnovit do základního nastavení",
|
||||
['normalreset'] = "Neutrální výraz",
|
||||
['moods'] = "Výrazy 😒",
|
||||
['infoupdate'] = "Kredity a nápady 🙏🏻",
|
||||
['infoupdateav'] = "Informace (aktualizace dostupná)",
|
||||
['infoupdateavtext'] = "Je k dispozici aktualizace, stáhněte si nejnovější verzi z ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
||||
['suggestions'] = "Nápady?",
|
||||
['suggestionsinfo'] = "'TayMcKenzieNZ' na FiveM forums je pro jakýkoliv návrh! ✉️",
|
||||
['notvaliddance'] = "Není platný tanec.",
|
||||
['notvalidemote'] = "Není platná animace.",
|
||||
['nocancel'] = "Žádné animace ke zrušení.",
|
||||
['maleonly'] = "Tato emoce je pouze pro muže, omlouvám se!",
|
||||
['emotemenucmd'] = "Použíj /emotemenu pro otevření menu.",
|
||||
['shareemotes'] = "👫 Sdílené animace",
|
||||
['shareemotesinfo'] = "Pozvěte osobu v okolí, k tanci",
|
||||
['sharedanceemotes'] = "🕺 Sdílený tanece",
|
||||
['notvalidsharedemote'] = "Není platný Sdílený tanec.",
|
||||
['sentrequestto'] = "Odeslal jsi ~y~ žádost o tanec ",
|
||||
['nobodyclose'] = "Nikdo ~r~není~w~ v dostatečné blízkosti.",
|
||||
['doyouwanna'] = "~y~Y~w~ pro příjmutí, ~r~L~w~ pro odmitnutí (~g~",
|
||||
['refuseemote'] = "Emote odmítnut.",
|
||||
['makenearby'] = "nechat hráče poblíž hrát",
|
||||
['camera'] = "Stiskni ~y~G~w~ pro použítí blesku u fotoaparátu.",
|
||||
['makeitrain'] = "Stiskni ~y~G~w~ pro spuštení deště.",
|
||||
['pee'] = "Podrž ~y~G~w~ pro čůraní.",
|
||||
['spraychamp'] = "Podrž ~y~G~w~ pro stříkaní šampaňského",
|
||||
['stun'] = "Stiskni ~y~G~w~ pro 'použití' paralyzéru.",
|
||||
['bound'] = "Bound ",
|
||||
['to'] = "na",
|
||||
['currentlyboundemotes'] = "Momentálně nastavené animace:",
|
||||
['notvalidkey'] = "Není platná klávesa.",
|
||||
['keybinds'] = "🔢 Klávesové Zkratky",
|
||||
['keybindsinfo'] = "Use"
|
||||
},
|
||||
['fr'] = { -- French 🇫🇷
|
||||
['emotes'] = 'Emotes 🎬',
|
||||
['danceemotes'] = "🕺 Danses",
|
||||
['animalemotes'] = "🐩 Emotes d'animaux",
|
||||
['propemotes'] = "📦 Emotes objet",
|
||||
['favoriteemotes'] = "🌟 Favori",
|
||||
['favoriteinfo'] = "Définir un emote comme favori.",
|
||||
['rfavorite'] = "réinitialiser le favori.",
|
||||
['prop2info'] = "❓ Prop Emotes peuvent être situés à la fin",
|
||||
['set'] = "Set (",
|
||||
['setboundemote'] = ") pour être votre emote lié?",
|
||||
['newsetemote'] = "~w~ est maintenant votre emote liée, appuyez sur ~g~CapsLock~w~ pour l'utiliser.",
|
||||
['cancelemote'] = "Annuler Emote",
|
||||
['cancelemoteinfo'] = "~r~X~w~ Annule l'emote en cours de lecture",
|
||||
['walkingstyles'] = "Styles de marche",
|
||||
['favoriteinfo'] = "Définir une emote comme favori.",
|
||||
['rfavorite'] = "Réinitialiser le favori.",
|
||||
['prop2info'] = "❓ Les emotes d'objet peuvent être à la fin",
|
||||
['set'] = "Mettre (",
|
||||
['setboundemote'] = ") en emote favorite?",
|
||||
['newsetemote'] = "~w~ est maintenant votre emote favorite, appuyez sur ~g~CapsLock~w~ pour l'utiliser.",
|
||||
['cancelemote'] = "Annuler Emote 🚷",
|
||||
['cancelemoteinfo'] = "~r~X~w~ Annule l'emote en cours",
|
||||
['walkingstyles'] = "Styles de marche 🚶🏻♂️",
|
||||
['resetdef'] = "Réinitialiser aux valeurs par défaut",
|
||||
['normalreset'] = "Normal (réinitialiser)",
|
||||
['moods'] = "Humeurs",
|
||||
['infoupdate'] = "Information",
|
||||
['moods'] = "Humeurs 😒",
|
||||
['infoupdate'] = "Crédits et suggestions 🙏🏻",
|
||||
['infoupdateav'] = "Information (Mise à jour disponible)",
|
||||
['infoupdateavtext'] = "Une mise à jour est disponible ~y~https://github.com/andristum/dpemotes~w~",
|
||||
['infoupdateavtext'] = "Une mise à jour est disponible ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
||||
['suggestions'] = "Suggestions?",
|
||||
['suggestionsinfo'] = "'dullpear_dev' sur les forums FiveM pour toutes les suggestions de fonction / emote! ✉️",
|
||||
['notvaliddance'] = "n'est pas une danse valide",
|
||||
['notvalidemote'] = "n'est pas un emote valide",
|
||||
['suggestionsinfo'] = "'TayMcKenzieNZ' sur les forums FiveM pour toutes les suggestions! ✉️",
|
||||
['notvaliddance'] = "n'est pas une danse valide",
|
||||
['notvalidemote'] = "n'est pas une emote valide",
|
||||
['nocancel'] = "Pas d'emote à annuler",
|
||||
['maleonly'] = "Cet emote est réservé aux hommes, désolé!",
|
||||
['emotemenucmd'] = "Do /emotemenu pour un menu",
|
||||
['shareemotes'] = "👫 Em Emotes partagées",
|
||||
['shareemotesinfo'] = "Inviter une personne proche à emoter",
|
||||
['emotemenucmd'] = "Fait /emotemenu pour ouvrir le menu",
|
||||
['shareemotes'] = "👫 Emotes partagées",
|
||||
['shareemotesinfo'] = "Invite une personne proche à faire une emote avec toi",
|
||||
['sharedanceemotes'] = "🕺 Dances partagées",
|
||||
['notvalidsharedemote'] = "n'est pas un emote partagé valide.",
|
||||
['notvalidsharedemote'] = "n'est pas un emote partagée valide.",
|
||||
['sentrequestto'] = "Demande envoyée à ~g~",
|
||||
['nobodyclose'] = "Personne assez proche.",
|
||||
['nobodyclose'] = "Personne n'esst assez proche.",
|
||||
['doyouwanna'] = "~y~Y~w~ accepter, ~r~L~w~ refuser (~g~",
|
||||
['refuseemote'] = "Emote refusée.",
|
||||
['makenearby'] = "fait jouer le joueur à proximité",
|
||||
['camera'] = "Presse ~y~G~w~ utiliser le flash de l'appareil.",
|
||||
['makeitrain'] = "Presse ~y~G~w~ jeter de l'argent.",
|
||||
['pee'] = "Tenir ~y~G~w~ faire pipi.",
|
||||
['spraychamp'] = "Tenir ~y~G~w~ vaporiser du champagne.",
|
||||
['camera'] = "Presse ~y~G~w~ pour utiliser le flash de l'appareil.",
|
||||
['makeitrain'] = "Presse ~y~G~w~ pour jeter de l'argent.",
|
||||
['pee'] = "Tenir ~y~G~w~ pour faire pipi.",
|
||||
['spraychamp'] = "Tenir ~y~G~w~ pour vaporiser du champagne.",
|
||||
['bound'] = "Liée ",
|
||||
['to'] = "à",
|
||||
['currentlyboundemotes'] = " Emotes actuellement liés:",
|
||||
['currentlyboundemotes'] = " Emotes actuellement liées:",
|
||||
['notvalidkey'] = "n'est pas une clé valide.",
|
||||
['keybinds'] = "🔢 Liens Clés",
|
||||
['keybindsinfo'] = "Use"
|
||||
},
|
||||
['de'] = {
|
||||
['emotes'] = 'Emotes',
|
||||
['keybinds'] = "🔢 Raccourcis clavier",
|
||||
['keybindsinfo'] = "Utilise"
|
||||
},
|
||||
['de'] = { -- German 🇩🇪
|
||||
['emotes'] = 'Emotes 🎬',
|
||||
['danceemotes'] = "🕺 Tanz-Emotes",
|
||||
['animalemotes'] = "🐩 Animal Emotes",
|
||||
['propemotes'] = "📦 Prop-Emotes",
|
||||
['favoriteemotes'] = "🌟 Favorit",
|
||||
['favoriteinfo'] = "Wählen Sie hier ein Emote aus, um es als gebundenes Emote festzulegen.",
|
||||
@@ -153,17 +210,17 @@ Config.Languages = {
|
||||
['set'] = "Set (",
|
||||
['setboundemote'] = ") soll dein gebundenes Emote sein?",
|
||||
['newsetemote'] = "~w~ ist jetzt dein gebundenes Emote, drücke ~g~CapsLock~w~, um es zu verwenden.",
|
||||
['cancelemote'] = "Emote abbrechen",
|
||||
['cancelemote'] = "Emote abbrechen 🚷",
|
||||
['cancelemoteinfo'] = "~r~ X ~w~ Bricht das aktuell wiedergegebene Emote ab",
|
||||
['walkingstyles'] = "Gehstile",
|
||||
['walkingstyles'] = "Gehstile 🚶🏻♂️",
|
||||
['resetdef'] = "Auf Standard zurücksetzen",
|
||||
['normalreset'] = "Normal (Zurücksetzen)",
|
||||
['moods'] = "Stimmungen",
|
||||
['infoupdate'] = "Information",
|
||||
['moods'] = "Stimmungen 😒",
|
||||
['infoupdate'] = "Credits und Dank 🙏🏻",
|
||||
['infoupdateav'] = "Information (Update verfügbar)",
|
||||
['infoupdateavtext'] = "Eine Aktualisierung ist verfügbar ~y~https://github.com/andristum/dpemotes~w~",
|
||||
['infoupdateavtext'] = "Eine Aktualisierung ist verfügbar ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
||||
['suggestions'] = "Vorschläge?",
|
||||
['suggestionsinfo'] = "'dullpear_dev' in FiveM-Foren für alle Feature- / Emote-Vorschläge! ✉️",
|
||||
['suggestionsinfo'] = "'TayMcKenzieNZ' in FiveM-Foren für alle Feature- / Emote-Vorschläge! ✉️",
|
||||
['notvaliddance'] = "ist kein gültiger Tanz",
|
||||
['notvalidemote'] = "ist kein gültiges Emote",
|
||||
['nocancel'] = "Kein Emote zum Abbrechen",
|
||||
@@ -175,7 +232,7 @@ Config.Languages = {
|
||||
['notvalidsharedemote'] = "ist kein gültiges geteiltes Emote.",
|
||||
['sentrequestto'] = "Gesendete Anfrage an ~g~",
|
||||
['nobodyclose'] = "Niemand ist nah genug dran.",
|
||||
['doyouwanna'] = "~y~Y~w~ zu akzeptieren, ~r~L~w~ zu verweigern (~g~",
|
||||
['doyouwanna'] = "~y~Z~w~ zu akzeptieren, ~r~L~w~ zu verweigern (~g~",
|
||||
['refuseemote'] = "Emote abgelehnt.",
|
||||
['makenearby'] = "Lässt den Spieler in der Nähe spielen",
|
||||
['camera'] = "Drücken ~y~G~w~ Kamerablitz verwenden.",
|
||||
@@ -188,10 +245,11 @@ Config.Languages = {
|
||||
['notvalidkey'] = "ist kein gültiger schlüssel.",
|
||||
['keybinds'] = "🔢 Tastenkombinationen",
|
||||
['keybindsinfo'] = "verwenden"
|
||||
},
|
||||
['sv'] = {
|
||||
['emotes'] = 'Emotes',
|
||||
},
|
||||
['sv'] = { -- Swedish 🇸🇪
|
||||
['emotes'] = 'Emotes 🎬',
|
||||
['danceemotes'] = "🕺 Dans Emotes",
|
||||
['animalemotes'] = "🐩 Animal Emotes",
|
||||
['propemotes'] = "📦 Objekt Emotes",
|
||||
['favoriteemotes'] = "🌟 Favorit",
|
||||
['favoriteinfo'] = "Välj en emote här för att ställa in den som din favorit emote.",
|
||||
@@ -200,17 +258,17 @@ Config.Languages = {
|
||||
['set'] = "Sätt (",
|
||||
['setboundemote'] = ") till din favorit emote?",
|
||||
['newsetemote'] = "~w~ är nu din favorit emote, tryck ~g~CapsLock~w~ för att använda den.",
|
||||
['cancelemote'] = "Avbryt Emote",
|
||||
['cancelemote'] = "Avbryt Emote 🚷",
|
||||
['cancelemoteinfo'] = "~r~X~w~ Avbryter det emote som för närvarande används.",
|
||||
['walkingstyles'] = "Walking Stil",
|
||||
['walkingstyles'] = "Walking Stil 🚶🏻♂️",
|
||||
['resetdef'] = "Återställ till standard",
|
||||
['normalreset'] = "Normal (Återställ)",
|
||||
['moods'] = "Humör",
|
||||
['infoupdate'] = "Information",
|
||||
['moods'] = "Humör 😒",
|
||||
['infoupdate'] = "Krediter Och Förslag 🙏🏻",
|
||||
['infoupdateav'] = "Information (Uppdatering tillgänglig)",
|
||||
['infoupdateavtext'] = "En uppdatering är tillgänglig ~y~https://github.com/andristum/dpemotes~w~",
|
||||
['infoupdateavtext'] = "En uppdatering är tillgänglig ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
||||
['suggestions'] = "Förslag?",
|
||||
['suggestionsinfo'] = "'dullpear_dev' på FiveM-forum för alla funktioner/emote-förslag! ✉️",
|
||||
['suggestionsinfo'] = "'TayMcKenzieNZ' på FiveM-forum för alla funktioner/emote-förslag! ✉️",
|
||||
['notvaliddance'] = "är inte en giltig dans",
|
||||
['notvalidemote'] = "är inte en giltig emote",
|
||||
['nocancel'] = "Ingen emote att avbryta",
|
||||
@@ -235,29 +293,30 @@ Config.Languages = {
|
||||
['notvalidkey'] = "är inte en giltig tangent.",
|
||||
['keybinds'] = "🔢 Keybinds",
|
||||
['keybindsinfo'] = "Använd"
|
||||
},
|
||||
['es'] = {
|
||||
['emotes'] = "Animaciones",
|
||||
},
|
||||
['es'] = { -- Spanish 🇪🇸
|
||||
['emotes'] = "Animaciones 🎬",
|
||||
['danceemotes'] = "🕺 Bailes",
|
||||
['animalemotes'] = "🐩 Emotes de animales",
|
||||
['propemotes'] = "📦 Objetos",
|
||||
['keybindemotes'] = "🌟 Favorita",
|
||||
['keybindinfo'] = "Selecciona una animacion como su favorita.",
|
||||
['rkeybind'] = "Reiniciar favorito",
|
||||
['prop2info'] = "❓ Animaciones de objetos al final.",
|
||||
['favoriteemotes'] = "🌟 Favoritos",
|
||||
['favoriteinfo'] = "Seleccione un emoticón aquí para configurarlo como su favorito.",
|
||||
['rfavorite'] = "Restablecer favorito",
|
||||
['prop2info'] = "❓ Prop Emotes se pueden ubicar al final",
|
||||
['set'] = "Elegir (",
|
||||
['setboundemote'] = ") como tu animacion favorita?",
|
||||
['newsetemote'] = "~w~ es ahora tu animacion favorita, presiona ~g~[CapsLock]~w~ para usarla.",
|
||||
['cancelemote'] = "Cancelar animacion",
|
||||
['cancelemote'] = "Cancelar animacion 🚷",
|
||||
['cancelemoteinfo'] = "~r~X~w~ Cancela la animacion actual.",
|
||||
['walkingstyles'] = "Formas de caminar",
|
||||
['walkingstyles'] = "Formas de caminar 🚶🏻♂️",
|
||||
['resetdef'] = "Reiniciar a por defecto",
|
||||
['normalreset'] = "Normal (Reiniciar)",
|
||||
['moods'] = "Estados de animo",
|
||||
['infoupdate'] = "Informacion",
|
||||
['moods'] = "Estados de animo 😒",
|
||||
['infoupdate'] = "Créditos Y Sugerencias 🙏🏻",
|
||||
['infoupdateav'] = "Informacion (Actualizacion disponible)",
|
||||
['infoupdateavtext'] = "Una actualizacion esta disponible, para conseguir la ultima version ingresa a ~y~https://github.com/andristum/dpemotes~w~",
|
||||
['infoupdateavtext'] = "Una actualizacion esta disponible, para conseguir la ultima version ingresa a ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
||||
['suggestions'] = "Sugerencias?",
|
||||
['suggestionsinfo'] = "dullpear_dev' en el foro de FiveM para cualquier sugerencia! ✉️",
|
||||
['suggestionsinfo'] = "TayMcKenzieNZ' en el foro de FiveM para cualquier sugerencia! ✉️",
|
||||
['notvaliddance'] = "no es un baile valido.",
|
||||
['notvalidemote'] = "no es una animacion valida.",
|
||||
['nocancel'] = "No hay animacion para cancelar.",
|
||||
@@ -282,5 +341,249 @@ Config.Languages = {
|
||||
['notvalidkey'] = "no es una clave válida.",
|
||||
['keybinds'] = "🔢 Keybinds",
|
||||
['keybindsinfo'] = "Utilizar"
|
||||
}
|
||||
}
|
||||
},
|
||||
['nl'] = { -- Dutch 🇳🇱
|
||||
['emotes'] = 'Animaties 🎬',
|
||||
['danceemotes'] = "🕺 Dans Animaties",
|
||||
['animalemotes'] = "🐩 Dier Animaties",
|
||||
['propemotes'] = "📦 Prop Animaties",
|
||||
['favoriteemotes'] = "🌟 Favorieten",
|
||||
['favoriteinfo'] = "Selecteer hier een animatie om deze als favoriete in te stellen.",
|
||||
['rfavorite'] = "Reset Favorieten",
|
||||
['prop2info'] = "❓ Prop animaties staan aan het einde.",
|
||||
['set'] = "Maak (",
|
||||
['setboundemote'] = ") je toegewezen animatie?",
|
||||
['newsetemote'] = "~w~ is nu je toegewezen animatie, druk op ~g~CapsLock~w~ om hem te gebruiken.",
|
||||
['cancelemote'] = "Stop Animatie 🚷",
|
||||
['cancelemoteinfo'] = "~r~X~w~ Stopt je huidige animatie",
|
||||
['walkingstyles'] = "Loopjes 🚶🏻♂️",
|
||||
['resetdef'] = "Reset naar standaard",
|
||||
['normalreset'] = "Normaal (Reset)",
|
||||
['moods'] = "Stemmingen 😒",
|
||||
['infoupdate'] = "Credits en bedankt 🙏🏻",
|
||||
['infoupdateav'] = "Informatie (Update beschikbaar)",
|
||||
['infoupdateavtext'] = "Een update is beschikbaar, download de laatste versie via ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
||||
['suggestions'] = "Suggesties?",
|
||||
['suggestionsinfo'] = "'TayMcKenzieNZ' op de FiveM forums om suggesties in te dienen! ✉️",
|
||||
['notvaliddance'] = "Is geen geldige dans.",
|
||||
['notvalidemote'] = "Is geen geldige animatie.",
|
||||
['nocancel'] = "Er is geen animatie om te annuleren.",
|
||||
['maleonly'] = "Deze animatie is alleen voor mannen, sorry!",
|
||||
['emotemenucmd'] = "Doe /emotemenu voor het animatiemenu.",
|
||||
['shareemotes'] = "👫 Gedeelde Animaties",
|
||||
['shareemotesinfo'] = "Nodig een persoon in de buurt uit om een animatie te doen.",
|
||||
['sharedanceemotes'] = "🕺 Gedeelde Dansjes",
|
||||
['notvalidsharedemote'] = "Is geen geldige gedeelde animatie.",
|
||||
['sentrequestto'] = "Verzoek gestuurd naar ~y~",
|
||||
['nobodyclose'] = "Er is niemand ~r~dichtbij~w~ genoeg.",
|
||||
['doyouwanna'] = "~y~Y~w~ om te accepteren, ~r~L~w~ om te weigeren (~g~",
|
||||
['refuseemote'] = "Animatie geweigerd.",
|
||||
['makenearby'] = "laat de dichtstbijzijnde persoon de animatie doen",
|
||||
['camera'] = "Druk op ~y~G~w~ om de flitser te gebruiken..",
|
||||
['makeitrain'] = "Druk op ~y~G~w~ om geld te gooien.",
|
||||
['pee'] = "Druk op ~y~G~w~ om te plassen.",
|
||||
['spraychamp'] = "Druk op ~y~G~w~ om batra's te spuiten.",
|
||||
['stun'] = "Druk op ~y~G~w~ om de taser te 'gebruiken'.",
|
||||
['bound'] = "Gebonden ",
|
||||
['to'] = "aan",
|
||||
['currentlyboundemotes'] = " Huidig gebonden animaties:",
|
||||
['notvalidkey'] = "Is geen geldige knop.",
|
||||
['keybinds'] = "🔢 Keybinds",
|
||||
['keybindsinfo'] = "Gebruik"
|
||||
},
|
||||
['pt'] = { -- Brazilian Portuguese 🇧🇷
|
||||
['emotes'] = 'Emotes 🎬',
|
||||
['danceemotes'] = "🕺 Emotes de Danças",
|
||||
['animalemotes'] = "🐩 Emotes de Animais",
|
||||
['propemotes'] = "📦 Emotes com Props",
|
||||
['favoriteemotes'] = "🌟 Favoritos",
|
||||
['favoriteinfo'] = "Selecione um emote para colocá-lo nos seus favoritos",
|
||||
['rfavorite'] = "Limpar favoritos",
|
||||
['prop2info'] = "❓ Emotes de props podem ser localizados no fim",
|
||||
['set'] = "Set (",
|
||||
['setboundemote'] = ") para ser seu emote vinculado?",
|
||||
['newsetemote'] = "~w~ é o seu emote vinculado, pressione ~g~CapsLock~w~ para usá-lo",
|
||||
['cancelemote'] = "Cancelar emote 🚷",
|
||||
['cancelemoteinfo'] = "~r~X~w~ Cancela os emotes rodando atualmente",
|
||||
['walkingstyles'] = "Estilos de Caminhada 🚶🏻♂️",
|
||||
['resetdef'] = "Resetar para o padrão",
|
||||
['normalreset'] = "Normal (Resetar)",
|
||||
['moods'] = "Humores 😒",
|
||||
['infoupdate'] = "Crédito e agradecimento 🙏🏻",
|
||||
['infoupdateav'] = "Informação (Atualização disponível)",
|
||||
['infoupdateavtext'] = "Uma atualização disponível, veja ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~ para pegar",
|
||||
['suggestions'] = "Sugestões?",
|
||||
['suggestionsinfo'] = "'TayMcKenzieNZ' no fórum do FiveM para qualquer sugestão de recurso/emotes! ✉️",
|
||||
['notvaliddance'] = "não é uma dança válida.",
|
||||
['notvalidemote'] = "não é um emote válido.",
|
||||
['nocancel'] = "Nenhum emote para cancelar",
|
||||
['maleonly'] = "Este emote é para homens, desculpe!",
|
||||
['emotemenucmd'] = "Faça /emotemenu para abrir o menu.",
|
||||
['shareemotes'] = "👫 Emotes compartilhados",
|
||||
['shareemotesinfo'] = "Convide uma pessoa próxima para para realizar a animação",
|
||||
['sharedanceemotes'] = "🕺 Danças compartilhadas",
|
||||
['notvalidsharedemote'] = "não é um emote compartilhado válido.",
|
||||
['sentrequestto'] = "Enviar solicitação para ~y~",
|
||||
['nobodyclose'] = "Ninguém próximo o ~r~rsuficiente~w~.",
|
||||
['doyouwanna'] = "~y~Y~w~ para aceitar, ~r~L~w~ para recursar (~g~",
|
||||
['refuseemote'] = "Emote recursado",
|
||||
['makenearby'] = "Faz o jogador próximo participar",
|
||||
['camera'] = "Pressione ~y~G~w~ para usar o flash da câmera",
|
||||
['makeitrain'] = "Pressione ~y~G~w~ para fazer chover.",
|
||||
['pee'] = "Mantenha pressionado ~y~G~w~ para fazer xixi.",
|
||||
['spraychamp'] = "Mantenha pressionado ~y~G~w~ jogar champagne",
|
||||
['stun'] = "Press ~y~G~w~ to 'use' stun gun.",
|
||||
['bound'] = "Vinculado ",
|
||||
['to'] = "para",
|
||||
['currentlyboundemotes'] = "Emotes atualmente vinculados: ",
|
||||
['notvalidkey'] = "isto não é uma chave válida",
|
||||
['keybinds'] = "🔢 Keybinds",
|
||||
['keybindsinfo'] = "Usar"
|
||||
},
|
||||
['it'] = { -- Italian 🇮🇹
|
||||
['emotes'] = 'Animazioni 🎬',
|
||||
['danceemotes'] = "🕺 Animazioni Di Danza",
|
||||
['animalemotes'] = "🐩 Animazioni Di Animali",
|
||||
['propemotes'] = "📦 Animazioni Prop",
|
||||
['favoriteemotes'] = "🌟 Emote preferite",
|
||||
['favoriteinfo'] = "Seleziona un'animazione per metterla nei preferiti.",
|
||||
['rfavorite'] = "Rimuovi preferito",
|
||||
['prop2info'] = "❓ Le animazioni Prop possono essere trovate in fondo.",
|
||||
['set'] = "Imposta (",
|
||||
['setboundemote'] = ") come tua animazione corrente?",
|
||||
['newsetemote'] = "~w~ è ora la tua animazione corrente, premi ~g~CapsLock~w~ per usarla.",
|
||||
['cancelemote'] = "Annulla animazione 🚷",
|
||||
['cancelemoteinfo'] = "~r~X~w~ Cancella l'animazione in corso.",
|
||||
['walkingstyles'] = "Stili di camminata 🚶🏻♂️",
|
||||
['resetdef'] = "Ripristina predefiniti",
|
||||
['normalreset'] = "Normale (Reset)",
|
||||
['moods'] = "Umori 😒",
|
||||
['infoupdate'] = "Crediti e grazie 🙏🏻",
|
||||
['infoupdateav'] = "Informazioni (Aggiornamento disponibile)",
|
||||
['infoupdateavtext'] = "Un aggiornamento è disponibile, ottieni l'ulima versione qui ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
||||
['suggestions'] = "Suggerimenti?",
|
||||
['suggestionsinfo'] = "'TayMcKenzieNZ' nei forum di FiveM per suggerimenti su funzionalitá/animazioni! ✉️",
|
||||
['notvaliddance'] = "non è un ballo valido.",
|
||||
['notvalidemote'] = "non è un'animazione valida.",
|
||||
['nocancel'] = "Nessun'animazione da cancellare.",
|
||||
['maleonly'] = "Quest'animazione è solo maschile!",
|
||||
['emotemenucmd'] = "Esegui /emotemenu per aprire il menù.",
|
||||
['shareemotes'] = "👫 Animazioni di coppia",
|
||||
['shareemotesinfo'] = "Invita un giocatore vicino ad un'animazione",
|
||||
['sharedanceemotes'] = "🕺 Balli di coppia",
|
||||
['notvalidsharedemote'] = "non è un'animazione di coppia valida.",
|
||||
['sentrequestto'] = "Richiesta mandata a ~y~",
|
||||
['nobodyclose'] = "Nessun giocatore abbastanza ~r~vicino~w~.",
|
||||
['doyouwanna'] = "~y~Y~w~ per accettare, ~r~L~w~ per rifiutare (~g~",
|
||||
['refuseemote'] = "Animazione rifiutata.",
|
||||
['makenearby'] = "fa eseguire l'animazione al giocatore vicino",
|
||||
['camera'] = "Premi ~y~G~w~ per usare il flash della fotocamera.",
|
||||
['makeitrain'] = "Premi ~y~G~w~ per far piovere.",
|
||||
['pee'] = "Tieni premuto ~y~G~w~ per urinare.",
|
||||
['spraychamp'] = "Tieni premuto ~y~G~w~ per spruzzare champagne",
|
||||
['stun'] = "Premi ~y~G~w~ per 'usare' la pistola stordente.",
|
||||
['bound'] = "É stato impostato ",
|
||||
['to'] = "per",
|
||||
['currentlyboundemotes'] = " Animazioni correnti:",
|
||||
['notvalidkey'] = "non è una chiave valida.",
|
||||
['keybinds'] = "🔢 Tasti",
|
||||
['keybindsinfo'] = "Utilizza"
|
||||
},
|
||||
['da'] = { -- Danish 🇩🇰
|
||||
['emotes'] = 'Animationer',
|
||||
['danceemotes'] = "🕺 Danse Animationer",
|
||||
['animalemotes'] = "🐩 Dyr Animationer",
|
||||
['propemotes'] = "📦 Rekvisit Animationer",
|
||||
['favoriteemotes'] = "🌟 Favorit",
|
||||
['favoriteinfo'] = "Vælge en animationer her for at sætte den som din favorit.",
|
||||
['rfavorite'] = "Nulstil Favorit",
|
||||
['prop2info'] = "❓ Rekvisit emotes findes i slutningen",
|
||||
['set'] = "Sæt (",
|
||||
['setboundemote'] = ") til din favorit animationer?",
|
||||
['newsetemote'] = "~w~ Er nu din favorit animationer, tryk ~g~CapsLock~w~ for at anvende den.",
|
||||
['cancelemote'] = "Afbryd animationer",
|
||||
['cancelemoteinfo'] = "~r~X~w~ Anullere din igangværende animationer.",
|
||||
['walkingstyles'] = "Gågange",
|
||||
['resetdef'] = "Nulstil til standard",
|
||||
['normalreset'] = "Normal (Nulstil)",
|
||||
['moods'] = "Humør 😒",
|
||||
['infoupdate'] = "Info / opdateringer",
|
||||
['infoupdateav'] = "Information (Opdatering available)",
|
||||
['infoupdateavtext'] = "En opdatering er tilgænglig, hent den nyeste version fra ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
||||
['suggestions'] = "Forslag?",
|
||||
['suggestionsinfo'] = "'TayMcKenzieNZ' på FiveM-forum for alle funktioner/emote-forslag! ✉️",
|
||||
['notvaliddance'] = "er ikke en gyldig dans",
|
||||
['notvalidemote'] = "er ikke en gyldig emote",
|
||||
['nocancel'] = "Ingen animationer afspilles lige nu",
|
||||
['maleonly'] = "Denne animationer virker desværre kun til mænd!",
|
||||
['emotemenucmd'] = "Skriv /emotemenu for animationer menuen",
|
||||
['shareemotes'] = "👫 Delte animationer",
|
||||
['shareemotesinfo'] = "Invitere en spillere i nærheden for afspille animationer",
|
||||
['sharedanceemotes'] = "🕺 Delete Danse",
|
||||
['notvalidsharedemote'] = "er ikke en gyldig delt animationer.",
|
||||
['sentrequestto'] = "Anmodning sendt til ~y~",
|
||||
['nobodyclose'] = "Ingen ~r~tæt~w~ nok.",
|
||||
['doyouwanna'] = "~y~Y~w~ for at acceptere, ~r~L~w~ for at nægte (~g~",
|
||||
['refuseemote'] = "Animationer nægtede.",
|
||||
['makenearby'] = "får den nærliggende spiller til at spille",
|
||||
['camera'] = "Tryk ~y~G~w~ for at bruge kamera kameraets blitz.",
|
||||
['makeitrain'] = "Tryk ~y~G~w~ for at regne med penge.",
|
||||
['pee'] = "Hold ~y~G~w~ for at tisse.",
|
||||
['spraychamp'] = "Hold ~y~G~w~ for at sprøjte med champagnen",
|
||||
['stun'] = "tryk på ~y~G~w~ for at bruge elektrisk pistol.",
|
||||
['bound'] = "Bundet ",
|
||||
['to'] = "til",
|
||||
['currentlyboundemotes'] = " Keybind animationer:",
|
||||
['notvalidkey'] = "er ikke en gyldigt nøgle.",
|
||||
['keybinds'] = "🔢 Keybinds",
|
||||
['keybindsinfo'] = "Brug"
|
||||
},
|
||||
['fi'] = { -- Finnish 🇫🇮
|
||||
['emotes'] = 'Emotet 🎬',
|
||||
['danceemotes'] = "🕺 Tanssi Emotet",
|
||||
['animalemotes'] = "🐩 Eläin Emotet",
|
||||
['propemotes'] = "📦 Esine Emotet",
|
||||
['favoriteemotes'] = "🌟 Suosikit",
|
||||
['favoriteinfo'] = " Valitse emote täältä laittaaksesi sen suosikiksi.",
|
||||
['rfavorite'] = "Resettaa Suosikin.",
|
||||
['prop2info'] = "❓ Esine Emotet voivat sijaita lopussa",
|
||||
['set'] = "Aseta (",
|
||||
['setboundemote'] = ") on sinun bindattu emote ?",
|
||||
['newsetemote'] = "w on nyt bindattuna emotesi, paina gCapsLockw käyttääksesi",
|
||||
['cancelemote'] = "Peru emote 🚷",
|
||||
['cancelemoteinfo'] = "rXw Peruu meneillään olevan emoten ",
|
||||
['walkingstyles'] = "Kävelytyylit🚶🏻♂️",
|
||||
['resetdef'] = "Resettaa oletuksen",
|
||||
['normalreset'] = "Normaali (Reseettaa)",
|
||||
['moods'] = "Mielitilat😒",
|
||||
['infoupdate'] = "Krediitit & Ehdotukset 🙏🏻",
|
||||
['infoupdateav'] = "Informaatio (Päivitys Saatavilla)",
|
||||
['infoupdateavtext'] = " Uusin versio saatavilla täältä yhttps://github.com/TayMcKenzieNZ/dpemotes~w~",
|
||||
['suggestions'] = "Ehdotukset?",
|
||||
['suggestionsinfo'] = "'TayMcKenzieNZ' Fivem foormueilta mitä vain fiituria/emote ehdotusta! ✉️",
|
||||
['notvaliddance'] = "Ei ole tanssi.",
|
||||
['notvalidemote'] = "Ei ole emote.",
|
||||
['nocancel'] = "Ei ole emotea peruutettavaksi.",
|
||||
['maleonly'] = "Tämä emote on miehille ainostaan, anteeksi!",
|
||||
['emotemenucmd'] = "Tee /emotemenu avataksesi emote menun",
|
||||
['shareemotes'] = "👫 Yhteiset Emotet",
|
||||
['shareemotesinfo'] = "Kutsu lähin hahmo emoteen ",
|
||||
['sharedanceemotes'] = "🕺 Yhteiset Tanssit",
|
||||
['notvalidsharedemote'] = "Ei ole yhteinen tanssi emote.",
|
||||
['sentrequestto'] = "Lähetä kutsu y",
|
||||
['nobodyclose'] = "Ei ketään rlähelläw sinua.",
|
||||
['doyouwanna'] = "yYw hyväksyyksesi, rLw kieltäytyäksesi (g",
|
||||
['refuseemote'] = "Emote peruutettu.",
|
||||
['makenearby'] = "tekee lähimmän pelaaja osallistumaan ",
|
||||
['camera'] = "Paina yGw käyttääksesi kameran salamaa.",
|
||||
['makeitrain'] = "Paina yGw heittääksesi rahaa.",
|
||||
['pee'] = "Pidä yGw pissaksesi.",
|
||||
['spraychamp'] = "Pidä yGw suihkutaaksesi shamppaniaa",
|
||||
['stun'] = "Paina yGw to 'käytä' etälamautinta.",
|
||||
['bound'] = "Bindata",
|
||||
['to'] = 'lle',
|
||||
['currentlyboundemotes'] = " On jo bindattuna emotehin :",
|
||||
['notvalidkey'] = "Ei ole käytettävä näppäin.",
|
||||
['keybinds'] = "🔢 Pikanäppäimet",
|
||||
['keybindsinfo'] = "Käytä",
|
||||
}}
|
||||
|
||||
@@ -1,12 +1,215 @@
|
||||
# dpemotes
|
||||
Emotes / Animations for fiveM with Prop support.
|
||||
# DpEmotes 🏋️
|
||||
|
||||
Installation Instructions:
|
||||
Emotes / Animations for FiveM with human, animal and prop support 🐩
|
||||
|
||||
add dpemotes to your server.cfg
|
||||
# Available in:
|
||||
|
||||
start dpemotes
|
||||
* Brazilian Portuguese 🇧🇷
|
||||
|
||||
* Czech 🇨🇿
|
||||
|
||||
* Danish 🇩🇰
|
||||
|
||||
* Dutch 🇳🇱
|
||||
|
||||
* English 🇬🇧
|
||||
|
||||
* Finnish 🇫🇮
|
||||
|
||||
* French 🇫🇷
|
||||
|
||||
* German 🇩🇪
|
||||
|
||||
* Italian 🇮🇹
|
||||
|
||||
* Spanish 🇪🇸
|
||||
|
||||
* Swedish 🇸🇪
|
||||
|
||||
All languages were either translated using Google Translate or contributed by you, the community.
|
||||
|
||||
If you happen to find any incorrect translations or would like to add more languages, please feel free to provide an "issue" with the correct / additional translations.
|
||||
|
||||
Languages can be selected and/or added in config.lua.
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Ragdoll 🥴
|
||||
|
||||
* To enable ragdoll, change `RagdollEnabled = false,` to true in config.lua.
|
||||
|
||||
* To change which key is responsible for ragdoll, `RagdollKeybind = 303` is currently set to `U` by default., -- Get the button number [here](https://docs.fivem.net/game-references/controls/)
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Menu Keybind 🎛️
|
||||
|
||||
**Important Note:**
|
||||
|
||||
The keybind uses RegisterKeyMapping. By default, the server owner configured keybind in the *initial* config.lua will be the default key, however once the keybind is set for a user, it'll stay with this new value. Editing the config keybind will change it for new players only.
|
||||
|
||||
* Menu key:* F5
|
||||
|
||||
F3 and F4 clash with [Menyoo](https://github.com/MAFINS/MenyooSP) and controllers 🎮
|
||||
|
||||
Server owners can change this in the `config.lua`;
|
||||
|
||||
```lua
|
||||
MenuKeybind = 'F5', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
||||
```
|
||||
|
||||
Alternatively, the player base can set their own menu keybind to open DpEmotes
|
||||
|
||||
```lua
|
||||
Esc > settings > keybinds > fivem > dpemotes
|
||||
```
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Keybinds and SQL 🎛️
|
||||
|
||||
The original dpemotes uses mysql-async which was then changed to ghmattimysql. Unfortunately, they are no longer maintained.
|
||||
|
||||
To use the SQL features, install the [oxmysql](https://github.com/overextended/oxmysql) resource. If you do not want to use the SQL features, comment out the `oxmysql` region in fxmanifest.lua.
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Screenshots 📸
|
||||
|
||||
|
||||
|
||||
| | | |
|
||||
|-|-|-|
|
||||
| <img src="screenshots/menu.jpg" width="250"> | <img src="screenshots/umbrella.jpg" width="250"> | <img src="screenshots/flag1.jpg" width="250"> |
|
||||
| <img src="screenshots/flag2.jpg" width="250"> | <img src="screenshots/flag3.jpg" width="250"> | <img src="screenshots/flag4.jpg" width="250"> |
|
||||
| <img src="screenshots/flag5.jpg" width="250"> | <img src="screenshots/flag6.jpg" width="250"> | <img src="screenshots/flag7.jpg" width="250"> |
|
||||
| <img src="screenshots/flag8.jpg" width="250"> | <img src="screenshots/flag9.jpg" width="250"> | <img src="screenshots/boop.jpg" width="250">
|
||||
| <img src="screenshots/cb_before.jpg" width="250"> | <img src="screenshots/cp_after.jpg" width="250">
|
||||
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Installation Instructions ⚙️:
|
||||
|
||||
* add DpEmotes to your `server.cfg`
|
||||
|
||||
* [Enforce gamebuild to latest build](https://forum.cfx.re/t/tutorial-forcing-gamebuild-to-casino-cayo-perico-or-tuners-update/4784977) for all emotes and props to work correctly
|
||||
|
||||
* start dpemotes
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Shared emotes 👩🏻❤️💋👨🏼
|
||||
|
||||
Emotes will work with either `SyncOffsetFront` or `Attachto`.
|
||||
|
||||
- If it is with `SyncOffsetFront`, then the offset used is the one of the emote the player started.<br/>
|
||||
For example, if player one starts the emote `handshake`, then player one will have the SyncOffsetFront but not the other player.
|
||||
|
||||
|
||||
- If it is with `Attachto`, then it'll either be player one's data used for attaching, or the player two's data.<br/>
|
||||
For example, if player one start the emote carry, then the other player will be attached but not the player one because Attachto is set in `carry2` and not `carry`.<br/>
|
||||
- If player one starts the emote `carry2`, then player one will be attached and not the other player.
|
||||
it's the player who start the animation who will in most cases be moved
|
||||
|
||||
|
||||
*Special case, if both emote have the `Attachto` then only the player who started the emote will be attached.*
|
||||
|
||||
You can find a list of ped bones to attach the other player here: [Ped Bones](https://wiki.rage.mp/index.php?title=Bones)
|
||||
|
||||
Using the website provided above, enter the bone ID, ie `1356` and not 111, which is the Bone Index.
|
||||
|
||||
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Add-Ons 🛠️
|
||||
|
||||
* Fixed an issue with the clipboard and adds textures to paper (/e clipboard)
|
||||
|
||||
* Changes umbrella texture to black (/e umbrella)
|
||||
|
||||
# Optional Add-Ons 🛠️
|
||||
|
||||
* Adds textures to the mugshot prop (/e mugshot)
|
||||
|
||||
* Retextured protest sign (can be changed using Texture Toolkit: https://www.gta5-mods.com/tools/texture-toolkit)
|
||||
|
||||
**Grab it here:**
|
||||
|
||||
[Add-Ons For DpEmotes](https://github.com/TayMcKenzieNZ/addonsfordpemotes)
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
|
||||
|
||||
# Additional Instructions ⚙️
|
||||
|
||||
[Please check the fivem forum thread](https://forum.fivem.net/t/dpemotes-356ish-emotes-usable-while-walking-props-and-more/843105)
|
||||
|
||||
|
||||
|
||||
----------------------
|
||||
|
||||
# Police Badge 👮
|
||||
|
||||
- Custom LSPD police badge by [LSPDFR member Sam](https://www.lcpdfr.com/downloads/gta5mods/misc/23386-lspd-police-badge/)
|
||||
|
||||
- LSPD reskinned badge by [GTA5Mods user Sladus_Slawonkus](https://www.gta5-mods.com/misc/lspd-police-badge-replace-sladus_slawonkus)
|
||||
|
||||
|
||||
----------------------
|
||||
|
||||
# FAQs 🗨️
|
||||
|
||||
**Q: Why do some emotes not work with females?**
|
||||
|
||||
**A:** Blame Rockstar Games. I've done my best to replicate animations to work with females, however some male scenarios have sound effects and particles, of which I am unfamiliar with and syncing particles is out of my expertise.
|
||||
|
||||
----------------------
|
||||
|
||||
**Q: Why do some emotes not work at all?**
|
||||
|
||||
**A:** Check the Installation Instructions above as you need to be on the highest FiveM gamebuild.
|
||||
|
||||
----------------------
|
||||
|
||||
**Q: Why do I see particle effects but other players don't?**
|
||||
|
||||
**A:** Dullpear and I can't figure out how to sync particles. If you know how, feel free to inform me.
|
||||
|
||||
----------------------
|
||||
|
||||
**Q: I bought this script off someone and notice it had a lot of the same animations. Can you help me?**
|
||||
|
||||
**A:** You got scammed and that's your fault. Dpemotes is and always will be **FREE**.
|
||||
|
||||
----------------------
|
||||
|
||||
**Q: Can I add my own emotes to this?**
|
||||
|
||||
**A:** Of course, see my in depth [tutorial](https://forum.cfx.re/t/how-to-menyoo-to-dpemotes-conversion/4775018) for using Menyoo and converting them to work with dpemotes.
|
||||
|
||||
You may sell ***custom made*** animations, however the menu must remain free.
|
||||
|
||||
----------------------
|
||||
|
||||
**Q: I bought a pack of custom animations, how can I add them to your fork of dpemotes?**
|
||||
|
||||
**A:** Usually the person who created them will provide code snippets for adding animations to dpemotes. If for whatever reason they haven't, you should contact them.
|
||||
|
||||
----------------------
|
||||
|
||||
**Q: How do I reset the SQL keybinds?**
|
||||
|
||||
**A:** No idea, but apparently only the server owner can 🤷🏻♂️ Google exist; Maybe contact the creator.
|
||||
|
||||
----------------------
|
||||
|
||||
Other instructions please check the fivem forum thread
|
||||
|
||||
https://forum.fivem.net/t/dpemotes-356ish-emotes-usable-while-walking-props-and-more/843105
|
||||
|
||||
@@ -1,80 +1,125 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
-- Shared Emotes Syncing ---------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
RegisterServerEvent("ServerEmoteRequest")
|
||||
AddEventHandler("ServerEmoteRequest", function(target, emotename, etype)
|
||||
TriggerClientEvent("ClientEmoteRequestReceive", target, emotename, etype)
|
||||
TriggerClientEvent("ClientEmoteRequestReceive", target, emotename, etype)
|
||||
end)
|
||||
|
||||
RegisterServerEvent("ServerValidEmote")
|
||||
RegisterServerEvent("ServerValidEmote")
|
||||
AddEventHandler("ServerValidEmote", function(target, requestedemote, otheremote)
|
||||
TriggerClientEvent("SyncPlayEmote", source, otheremote, source)
|
||||
TriggerClientEvent("SyncPlayEmoteSource", target, requestedemote)
|
||||
TriggerClientEvent("SyncPlayEmote", source, otheremote, target)
|
||||
TriggerClientEvent("SyncPlayEmoteSource", target, requestedemote, source)
|
||||
end)
|
||||
|
||||
RegisterServerEvent("ServerEmoteCancel")
|
||||
AddEventHandler("ServerEmoteCancel", function(target)
|
||||
TriggerClientEvent("SyncCancelEmote", target, source)
|
||||
end)
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
-- Keybinding --------------------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
if Config.SqlKeybinding then
|
||||
MySQL.ready(function()
|
||||
local function addKeybindEventHandlers()
|
||||
RegisterServerEvent("dp:ServerKeybindExist")
|
||||
AddEventHandler('dp:ServerKeybindExist', function()
|
||||
local src = source
|
||||
local srcid = GetPlayerIdentifier(source)
|
||||
MySQL.query('SELECT * FROM dpkeybinds WHERE `id`=@id;', { id = srcid }, function(dpkeybinds)
|
||||
if dpkeybinds[1] then
|
||||
TriggerClientEvent("dp:ClientKeybindExist", src, true)
|
||||
else
|
||||
TriggerClientEvent("dp:ClientKeybindExist", src, false)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterServerEvent("dp:ServerKeybindExist")
|
||||
AddEventHandler('dp:ServerKeybindExist', function()
|
||||
local src = source local srcid = GetPlayerIdentifier(source)
|
||||
MySQL.Async.fetchAll('SELECT * FROM dpkeybinds WHERE `id`=@id;', {id = srcid}, function(dpkeybinds)
|
||||
if dpkeybinds[1] then
|
||||
TriggerClientEvent("dp:ClientKeybindExist", src, true)
|
||||
else
|
||||
TriggerClientEvent("dp:ClientKeybindExist", src, false)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
-- This is my first time doing SQL stuff, and after i finished everything i realized i didnt have to store the keybinds in the database at all.
|
||||
-- But remaking it now is a little pointless since it does it job just fine!
|
||||
|
||||
-- This is my first time doing SQL stuff, and after i finished everything i realized i didnt have to store the keybinds in the database at all.
|
||||
-- But remaking it now is a little pointless since it does it job just fine!
|
||||
RegisterServerEvent("dp:ServerKeybindCreate")
|
||||
AddEventHandler("dp:ServerKeybindCreate", function()
|
||||
local src = source
|
||||
local srcid = GetPlayerIdentifier(source)
|
||||
MySQL.insert('INSERT INTO dpkeybinds (`id`, `keybind1`, `emote1`, `keybind2`, `emote2`, `keybind3`, `emote3`, `keybind4`, `emote4`, `keybind5`, `emote5`, `keybind6`, `emote6`) VALUES (@id, @keybind1, @emote1, @keybind2, @emote2, @keybind3, @emote3, @keybind4, @emote4, @keybind5, @emote5, @keybind6, @emote6);',
|
||||
{ id = srcid, keybind1 = "num4", emote1 = "", keybind2 = "num5", emote2 = "", keybind3 = "num6", emote3 = "", keybind4 = "num7", emote4 = "", keybind5 = "num8", emote5 = "", keybind6 = "num9", emote6 = "" }, function(created) print("[dp] ^2" .. GetPlayerName(src) .. "^7 got created!") TriggerClientEvent("dp:ClientKeybindGet", src, "num4", "", "num5", "", "num6", "", "num7", "", "num8", "", "num8", "") end)
|
||||
end)
|
||||
|
||||
RegisterServerEvent("dp:ServerKeybindCreate")
|
||||
AddEventHandler("dp:ServerKeybindCreate", function()
|
||||
local src = source local srcid = GetPlayerIdentifier(source)
|
||||
MySQL.Async.execute('INSERT INTO dpkeybinds (`id`, `keybind1`, `emote1`, `keybind2`, `emote2`, `keybind3`, `emote3`, `keybind4`, `emote4`, `keybind5`, `emote5`, `keybind6`, `emote6`) VALUES (@id, @keybind1, @emote1, @keybind2, @emote2, @keybind3, @emote3, @keybind4, @emote4, @keybind5, @emote5, @keybind6, @emote6);',
|
||||
{id = srcid, keybind1 = "num4", emote1 = "", keybind2 = "num5", emote2 = "", keybind3 = "num6", emote3 = "", keybind4 = "num7", emote4 = "", keybind5 = "num8", emote5 = "", keybind6 = "num9", emote6 = ""}, function(created) print("[dp] ^2"..GetPlayerName(src).."^7 got created!") TriggerClientEvent("dp:ClientKeybindGet", src, "num4", "", "num5", "", "num6", "", "num7", "", "num8", "", "num8", "") end)
|
||||
end)
|
||||
RegisterServerEvent("dp:ServerKeybindGrab")
|
||||
AddEventHandler("dp:ServerKeybindGrab", function()
|
||||
local src = source
|
||||
local srcid = GetPlayerIdentifier(source)
|
||||
MySQL.query('SELECT keybind1, emote1, keybind2, emote2, keybind3, emote3, keybind4, emote4, keybind5, emote5, keybind6, emote6 FROM `dpkeybinds` WHERE `id` = @id'
|
||||
,
|
||||
{ ['@id'] = srcid }, function(kb)
|
||||
if kb[1].keybind1 ~= nil then
|
||||
TriggerClientEvent("dp:ClientKeybindGet", src, kb[1].keybind1, kb[1].emote1, kb[1].keybind2, kb[1].emote2 , kb[1].keybind3, kb[1].emote3, kb[1].keybind4, kb[1].emote4, kb[1].keybind5, kb[1].emote5, kb[1].keybind6, kb[1].emote6)
|
||||
else
|
||||
TriggerClientEvent("dp:ClientKeybindGet", src, "num4", "", "num5", "", "num6", "", "num7", "", "num8", "", "num8", "")
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterServerEvent("dp:ServerKeybindGrab")
|
||||
AddEventHandler("dp:ServerKeybindGrab", function()
|
||||
local src = source local srcid = GetPlayerIdentifier(source)
|
||||
MySQL.Async.fetchAll('SELECT keybind1, emote1, keybind2, emote2, keybind3, emote3, keybind4, emote4, keybind5, emote5, keybind6, emote6 FROM `dpkeybinds` WHERE `id` = @id',
|
||||
{['@id'] = srcid}, function(kb)
|
||||
if kb[1].keybind1 ~= nil then
|
||||
TriggerClientEvent("dp:ClientKeybindGet", src, kb[1].keybind1, kb[1].emote1, kb[1].keybind2, kb[1].emote2, kb[1].keybind3, kb[1].emote3, kb[1].keybind4, kb[1].emote4, kb[1].keybind5, kb[1].emote5, kb[1].keybind6, kb[1].emote6)
|
||||
else
|
||||
TriggerClientEvent("dp:ClientKeybindGet", src, "num4", "", "num5", "", "num6", "", "num7", "", "num8", "", "num8", "")
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterServerEvent("dp:ServerKeybindUpdate")
|
||||
AddEventHandler("dp:ServerKeybindUpdate", function(key, emote)
|
||||
local src = source local myid = GetPlayerIdentifier(source)
|
||||
if key == "num4" then chosenk = "keybind1" elseif key == "num5" then chosenk = "keybind2" elseif key == "num6" then chosenk = "keybind3" elseif key == "num7" then chosenk = "keybind4" elseif key == "num8" then chosenk = "keybind5" elseif key == "num9" then chosenk = "keybind6" end
|
||||
if chosenk == "keybind1" then
|
||||
MySQL.Async.execute("UPDATE dpkeybinds SET emote1=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
elseif chosenk == "keybind2" then
|
||||
MySQL.Async.execute("UPDATE dpkeybinds SET emote2=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
elseif chosenk == "keybind3" then
|
||||
MySQL.Async.execute("UPDATE dpkeybinds SET emote3=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
elseif chosenk == "keybind4" then
|
||||
MySQL.Async.execute("UPDATE dpkeybinds SET emote4=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
elseif chosenk == "keybind5" then
|
||||
MySQL.Async.execute("UPDATE dpkeybinds SET emote5=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
elseif chosenk == "keybind6" then
|
||||
MySQL.Async.execute("UPDATE dpkeybinds SET emote6=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
else
|
||||
print("[dp] ^3Sql Keybinding^7 is turned ^1off^7, if you want to enable /emotebind, import dpkeybinding.sql and set ^3SqlKeybinding = ^2true^7 in config.lua.")
|
||||
RegisterServerEvent("dp:ServerKeybindUpdate")
|
||||
AddEventHandler("dp:ServerKeybindUpdate", function(key, emote)
|
||||
local src = source
|
||||
local myid = GetPlayerIdentifier(source)
|
||||
if key == "num4" then chosenk = "keybind1"
|
||||
elseif key == "num5" then chosenk = "keybind2"
|
||||
elseif key == "num6" then chosenk = "keybind3"
|
||||
elseif key == "num7" then chosenk = "keybind4"
|
||||
elseif key == "num8" then chosenk = "keybind5"
|
||||
elseif key == "num9" then chosenk = "keybind6"
|
||||
end
|
||||
if chosenk == "keybind1" then
|
||||
MySQL.update("UPDATE dpkeybinds SET emote1=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
elseif chosenk == "keybind2" then
|
||||
MySQL.update("UPDATE dpkeybinds SET emote2=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
elseif chosenk == "keybind3" then
|
||||
MySQL.update("UPDATE dpkeybinds SET emote3=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
elseif chosenk == "keybind4" then
|
||||
MySQL.update("UPDATE dpkeybinds SET emote4=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
elseif chosenk == "keybind5" then
|
||||
MySQL.update("UPDATE dpkeybinds SET emote5=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
elseif chosenk == "keybind6" then
|
||||
MySQL.update("UPDATE dpkeybinds SET emote6=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
if Config.SqlKeybinding and MySQL then
|
||||
MySQL.update(
|
||||
[[
|
||||
CREATE TABLE IF NOT EXISTS `dpkeybinds` (
|
||||
`id` varchar(50) NULL DEFAULT NULL,
|
||||
`keybind1` varchar(50) NULL DEFAULT "num4",
|
||||
`emote1` varchar(255) NULL DEFAULT "",
|
||||
`keybind2` varchar(50) NULL DEFAULT "num5",
|
||||
`emote2` varchar(255) NULL DEFAULT "",
|
||||
`keybind3` varchar(50) NULL DEFAULT "num6",
|
||||
`emote3` varchar(255) NULL DEFAULT "",
|
||||
`keybind4` varchar(50) NULL DEFAULT "num7",
|
||||
`emote4` varchar(255) NULL DEFAULT "",
|
||||
`keybind5` varchar(50) NULL DEFAULT "num8",
|
||||
`emote5` varchar(255) NULL DEFAULT "",
|
||||
`keybind6` varchar(50) NULL DEFAULT "num9",
|
||||
`emote6` varchar(255) NULL DEFAULT ""
|
||||
) ENGINE=InnoDB COLLATE=latin1_swedish_ci;
|
||||
]], {}, function(success)
|
||||
if success then
|
||||
addKeybindEventHandlers()
|
||||
else
|
||||
print("[dp] ^3Error connecting to DB^7")
|
||||
end
|
||||
end)
|
||||
else
|
||||
print("[dp] ^3Sql Keybinding^7 is turned ^1off^7, if you want to enable /emotebind, set ^3SqlKeybinding = ^2true^7 in config.lua and uncomment oxmysql lines in fxmanifest.lua.")
|
||||
end
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
if Config.CheckForUpdates then
|
||||
Citizen.CreateThread( function()
|
||||
updatePath = "/andristum/dpemotes"
|
||||
resourceName = "dp Emotes ("..GetCurrentResourceName()..")"
|
||||
PerformHttpRequest("https://raw.githubusercontent.com"..updatePath.."/master/version", checkVersion, "GET")
|
||||
Citizen.CreateThread(function()
|
||||
updatePath = "/TayMcKenzieNZ/dpemotes"
|
||||
resourceName = "dp Emotes (" .. GetCurrentResourceName() .. ")"
|
||||
PerformHttpRequest("https://raw.githubusercontent.com" .. updatePath .. "/master/version", checkVersion, "GET")
|
||||
end)
|
||||
end
|
||||
|
||||
RegisterServerEvent("dp:CheckVersion")
|
||||
RegisterServerEvent("dp:CheckVersion")
|
||||
AddEventHandler("dp:CheckVersion", function()
|
||||
if updateavail then
|
||||
TriggerClientEvent("dp:Update", source, true)
|
||||
@@ -15,19 +15,19 @@ AddEventHandler("dp:CheckVersion", function()
|
||||
end
|
||||
end)
|
||||
|
||||
function checkVersion(err,responseText, headers)
|
||||
function checkVersion(err, responseText, headers)
|
||||
curVersion = LoadResourceFile(GetCurrentResourceName(), "version")
|
||||
|
||||
if curVersion ~= responseText and tonumber(curVersion) < tonumber(responseText) then
|
||||
updateavail = true
|
||||
print("\n^1----------------------------------------------------------------------------------^7")
|
||||
print(resourceName.." is outdated, latest version is: ^2"..responseText.."^7, installed version: ^1"..curVersion.."^7!\nupdate from https://github.com"..updatePath.."")
|
||||
print(resourceName .. " is outdated, latest version is: ^2" .. responseText .. "^7, installed version: ^1" .. curVersion .. "^7!\nupdate from https://github.com" .. updatePath .. "")
|
||||
print("^1----------------------------------------------------------------------------------^7")
|
||||
elseif tonumber(curVersion) > tonumber(responseText) then
|
||||
print("\n^3----------------------------------------------------------------------------------^7")
|
||||
print(resourceName.." git version is: ^2"..responseText.."^7, installed version: ^1"..curVersion.."^7!")
|
||||
print(resourceName .. " git version is: ^2" .. responseText .. "^7, installed version: ^1" .. curVersion .. "^7!")
|
||||
print("^3----------------------------------------------------------------------------------^7")
|
||||
else
|
||||
print("\n"..resourceName.." is up to date. (^2"..curVersion.."^7)")
|
||||
print("\n" .. resourceName .. " is up to date. (^2" .. curVersion .. "^7)")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9'
|
||||
|
||||
client_scripts {
|
||||
'NativeUI.lua',
|
||||
'Config.lua',
|
||||
'Client/*.lua'
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'Config.lua',
|
||||
'@mysql-async/lib/MySQL.lua',
|
||||
'Server/*.lua'
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `dpkeybinds` (
|
||||
`id` varchar(50) NULL DEFAULT NULL,
|
||||
`keybind1` varchar(50) NULL DEFAULT "num4",
|
||||
`emote1` varchar(255) NULL DEFAULT "",
|
||||
`keybind2` varchar(50) NULL DEFAULT "num5",
|
||||
`emote2` varchar(255) NULL DEFAULT "",
|
||||
`keybind3` varchar(50) NULL DEFAULT "num6",
|
||||
`emote3` varchar(255) NULL DEFAULT "",
|
||||
`keybind4` varchar(50) NULL DEFAULT "num7",
|
||||
`emote4` varchar(255) NULL DEFAULT "",
|
||||
`keybind5` varchar(50) NULL DEFAULT "num8",
|
||||
`emote5` varchar(255) NULL DEFAULT "",
|
||||
`keybind6` varchar(50) NULL DEFAULT "num9",
|
||||
`emote6` varchar(255) NULL DEFAULT ""
|
||||
) ENGINE=InnoDB COLLATE=latin1_swedish_ci;
|
||||
|
Before Width: | Height: | Size: 391 KiB After Width: | Height: | Size: 391 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 267 KiB After Width: | Height: | Size: 267 KiB |
|
Before Width: | Height: | Size: 268 KiB After Width: | Height: | Size: 268 KiB |
|
Before Width: | Height: | Size: 263 KiB After Width: | Height: | Size: 263 KiB |
|
Before Width: | Height: | Size: 265 KiB After Width: | Height: | Size: 265 KiB |
|
Before Width: | Height: | Size: 265 KiB After Width: | Height: | Size: 265 KiB |
|
Before Width: | Height: | Size: 265 KiB After Width: | Height: | Size: 265 KiB |
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 264 KiB |
|
Before Width: | Height: | Size: 265 KiB After Width: | Height: | Size: 265 KiB |
|
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 269 KiB |
|
Before Width: | Height: | Size: 315 KiB After Width: | Height: | Size: 315 KiB |
|
Before Width: | Height: | Size: 248 KiB After Width: | Height: | Size: 248 KiB |