Skip to content

Commit

Permalink
Merge pull request #14 from alberttheprince/master
Browse files Browse the repository at this point in the history
PR #7
  • Loading branch information
enzo2991 authored Jul 26, 2024
2 parents 2cfd227 + 2fe3d82 commit 2588554
Show file tree
Hide file tree
Showing 41 changed files with 280 additions and 253 deletions.
2 changes: 1 addition & 1 deletion client/AnimationList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11400,7 +11400,7 @@ RP.PropEmotes = {
Prop = 'pprp_icefishing_box_01',
PropBone = 28422,
PropPlacement = {
-0.8,
0.8,
0.03,
0.04,
0.0,
Expand Down
4 changes: 2 additions & 2 deletions client/Crouch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ end
-- Commands & KeyMapping --
if Config.CrouchEnabled then
if Config.CrouchKeybindEnabled then
RegisterKeyMapping('+crouch', "Crouch", "keyboard", Config.CrouchKeybind)
RegisterKeyMapping('+crouch', Translate('crouch'), "keyboard", Config.CrouchKeybind)
RegisterCommand('+crouch', function() CrouchKeyPressed() end, false)
RegisterCommand('-crouch', function() end, false) -- This needs to be here to prevent errors/warnings
end
Expand All @@ -460,7 +460,7 @@ end

if Config.CrawlEnabled then
if Config.CrawlKeybindEnabled then
RegisterKeyMapping('crawl', "Crawl", "keyboard", Config.CrawlKeybind)
RegisterKeyMapping('crawl', Translate('crawl'), "keyboard", Config.CrawlKeybind)
end
RegisterCommand('crawl', function() CrawlKeyPressed() end, false)
end
Expand Down
4 changes: 2 additions & 2 deletions client/Emote.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ if Config.SqlKeybinding then
end
if Config.MenuKeybindEnabled then
RegisterCommand('emoteui', function() OpenEmoteMenu() end, false)
RegisterKeyMapping("emoteui", "Open animations menu", "keyboard", Config.MenuKeybind)
RegisterKeyMapping("emoteui", Translate("register_open_menu"), "keyboard", Config.MenuKeybind)
else
RegisterCommand('emotemenu', function() OpenEmoteMenu() end, false)
end
Expand Down Expand Up @@ -514,7 +514,7 @@ AddStateBagChangeHandler('ptfx', nil, function(bagName, key, value, _unused, rep
end
end
PtfxThis(asset)
PlayerParticles[plyId] = StartNetworkedParticleFxLoopedOnEntityBone(name, entityTarget, offset.x, offset.y, offset.z, rot.x, rot.y, rot.z, boneIndex, scale + 0.0, 0, 0, 0)
PlayerParticles[plyId] = StartNetworkedParticleFxLoopedOnEntityBone(name, entityTarget, offset.x, offset.y, offset.z, rot.x, rot.y, rot.z, boneIndex, scale + 0.0, false, false, false)
if color then
if color[1] and type(color[1]) == 'table' then
local randomIndex = math.random(1, #color)
Expand Down
6 changes: 3 additions & 3 deletions client/EmoteMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ local ShareTable = {}
local FavoriteEmote = ""

if Config.FavKeybindEnabled then
RegisterCommand('emotefav', function() FavKeybind() end)
RegisterKeyMapping("emotefav", "Execute your favorite emote", "keyboard", Config.FavKeybind)
RegisterCommand('emotefav', function() FavKeybind() end, false)
RegisterKeyMapping("emotefav", Translate("register_fav_anim"), "keyboard", Config.FavKeybind)

local doingFavoriteEmote = false

Expand Down Expand Up @@ -316,7 +316,7 @@ if Config.Search then
if #results > 0 then
InSearch = true

local searchMenu = _menuPool:AddSubMenu(lastMenu, string.format('%s'..Translate('searchmenudesc')..' ~r~%s~w~', #results, input), "", true, true)
local searchMenu = _menuPool:AddSubMenu(lastMenu, string.format('%s '..Translate('searchmenudesc')..' ~r~%s~w~', #results, input), "", true, true)
local sharedDanceMenu
if favEnabled then
local rFavorite = NativeUI.CreateItem(Translate('rfavorite'), Translate('rfavorite'))
Expand Down
2 changes: 1 addition & 1 deletion client/Keybinds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if Config.SqlKeybinding then

RegisterNetEvent("rp:ClientKeybindGetOne")
AddEventHandler("rp:ClientKeybindGetOne", function(key, e)
SimpleNotify(Translate('bound') .. "<b>" .. e .. "</b> " .. Translate('to') .. " <b>" .. firstToUpper(key) .. "</b>")
SimpleNotify(Translate('boundto', e, firstToUpper(key)))
if key == "num4" then emob1 = e
keyb1 = "num4"
elseif key == "num5" then emob2 = e
Expand Down
2 changes: 1 addition & 1 deletion client/Pointing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ if Config.PointingEnabled then
end, false)

if Config.PointingKeybindEnabled then
RegisterKeyMapping("pointing", "Finger pointing", "keyboard", Config.PointingKeybind)
RegisterKeyMapping("pointing", Translate('pointing'), "keyboard", Config.PointingKeybind)
end

TriggerEvent('chat:addSuggestion', '/pointing', 'Finger pointing.')
Expand Down
5 changes: 4 additions & 1 deletion client/Ragdoll.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ if Config.RagdollEnabled then
end

while not stop do
SetPedToRagdoll(ped, 1000, 1000, 0, false, false, false)
SetPedRagdollForceFall(PlayerPedId())
ResetPedRagdollTimer(PlayerPedId())
SetPedToRagdoll(PlayerPedId(), 1000, 1000, 3, 0, 0, 0)
ResetPedRagdollTimer(PlayerPedId())
Wait(0)
end
end
Expand Down
22 changes: 16 additions & 6 deletions client/Utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ end
----------------------------------------------------------------------
ShowPed = false

ShowPedMenu = function(zoom)
function ShowPedMenu(zoom)
if not Config.PreviewPed then return end

if not ShowPed then
Expand All @@ -232,7 +232,11 @@ ShowPedMenu = function(zoom)

if not zoom then
while ShowPed do
local world, normal = GetWorldCoordFromScreenCoord(0.65135417461395, 0.77) -- GetWorldCoordFromScreenCoord(0.67135417461395, 0.7787036895752)
local screencoordsX, screencoordsY = 0.65135417461395, 0.77
if Config.MenuPosition == "left" then
screencoordsX = 1.0 - screencoordsX
end
local world, normal = GetWorldCoordFromScreenCoord(screencoordsX, screencoordsY) -- GetWorldCoordFromScreenCoord(0.67135417461395, 0.7787036895752)
local depth = 3.5
local target = world + normal * depth
local camRot = GetGameplayCamRot(2)
Expand All @@ -249,13 +253,18 @@ ShowPedMenu = function(zoom)
averagedTarget = averagedTarget / #positionBuffer

SetEntityCoords(clonedPed, averagedTarget.x, averagedTarget.y, averagedTarget.z, false, false, false, true)
SetEntityHeading(clonedPed, camRot.z + 170.0)
local heading_offset = Config.MenuPosition == "left" and 170.0 or 190.0
SetEntityHeading(clonedPed, camRot.z + heading_offset)
SetEntityRotation(clonedPed, camRot.x*(-1), 0, camRot.z + 170.0, 2, false)

Wait(4)
end
else
while ShowPed do
local screencoordsX, screencoordsY = 0.6, 1.9
if Config.MenuPosition == "left" then
screencoordsX = 1.0 - screencoordsX
end
local world, normal = GetWorldCoordFromScreenCoord(0.6, 1.9)
local depth = 2.0
local target = world + normal * depth
Expand All @@ -273,7 +282,8 @@ ShowPedMenu = function(zoom)
averagedTarget = averagedTarget / #positionBuffer

SetEntityCoords(clonedPed, averagedTarget.x, averagedTarget.y, averagedTarget.z, false, false, false, true)
SetEntityHeading(clonedPed, camRot.z + 170.0)
local heading_offset = Config.MenuPosition == "left" and 170.0 or 190.0
SetEntityHeading(clonedPed, camRot.z + heading_offset)
SetEntityRotation(clonedPed, camRot.x*(-1), 0, camRot.z + 170.0, 2, false)

Wait(4)
Expand All @@ -283,7 +293,7 @@ ShowPedMenu = function(zoom)
end
end

ClosePedMenu = function()
function ClosePedMenu()
if not Config.PreviewPed then return end

if clonedPed then
Expand All @@ -293,7 +303,7 @@ ClosePedMenu = function()
end
end

ClearPedTaskPreview = function()
function ClearPedTaskPreview()
if not Config.PreviewPed then return end

if clonedPed then
Expand Down
3 changes: 2 additions & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fx_version 'cerulean'
game 'gta5'
description 'rpemotes-reborn'
version '1.5.6'
version '1.6.0'

lua54 'yes'
use_experimental_fxv2_oal 'yes'
Expand Down Expand Up @@ -35,6 +35,7 @@ shared_scripts{

server_scripts{
'server/Server.lua',
'server/Updates.lua',
'server/frameworks/*.lua'
}

Expand Down
5 changes: 2 additions & 3 deletions locales/ar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ Locales['ar'] = {
['stun'] = "اضغط ~y~G~w~ لاستخدام بندقية حصرية",
['smoke'] = "Press ~y~G~w~ to smoke.",
['vape'] = "اضغط ~y~G~w~ لتدخين الفيب.",
['bound'] = "مرتبط بـ ",
['to'] = "لـ",
['boundto'] = "%s مرتبط إلى (%s)"
['currentlyboundemotes'] = " الحركات المشغلة حاليا:",
['notvalidkey'] = "كبسة غير صالحة",
['keybinds'] = "🔢 كبسات الفاتيح",
Expand All @@ -60,7 +59,7 @@ Locales['ar'] = {
['firework'] = "اضغط ~y~G~w~ لاستخدام الالعاب النارية",
['poop'] = "اضغط ~y~G~w~ لقضاء الحاجة 2",
['puke'] = "اضغط ~y~G~w~ للتقيؤ",
['cut'] = "Press ~y~G~w~ to cut",
['cut'] = "Press ~y~G~w~ to cut",
['btn_select'] = "اختيار",
['btn_back'] = "العودة",
['btn_switch'] = "حركة",
Expand Down
5 changes: 2 additions & 3 deletions locales/cs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ Locales['cs'] = {
['stun'] = "Stiskni ~y~G~w~ pro použití paralyzéru.",
['smoke'] = "Press ~y~G~w~ to smoke.",
['vape'] = "Stiskni ~y~G~w~ pro použití vapky.",
['bound'] = "Bound ",
['to'] = "na",
['boundto'] = "Bound (%s) to %s",
['currentlyboundemotes'] = "Momentálně nastavené animace:",
['notvalidkey'] = "Není platná klávesa.",
['keybinds'] = "🔢 Klávesové Zkratky",
Expand All @@ -60,7 +59,7 @@ Locales['cs'] = {
['firework'] = "Stiskni ~y~G~w~ pro použití ohňostroje",
['poop'] = "Stisknutím ~y~G~w~ se vykakáte",
['puke'] = "Stiskni ~y~G~w~ pro zvracení",
['cut'] = "Press ~y~G~w~ to cut",
['cut'] = "Press ~y~G~w~ to cut",
['btn_select'] = "Vybrat",
['btn_back'] = "Zpět",
['btn_switch'] = "Pohyb",
Expand Down
5 changes: 2 additions & 3 deletions locales/da.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ Locales['da'] = {
['stun'] = "Tryk på ~y~G~w~ for at bruge elektrisk pistol.",
['smoke'] = "Press ~y~G~w~ to smoke.",
['vape'] = "Press ~y~G~w~ to vape.",
['bound'] = "Bundet ",
['to'] = "til",
['boundto'] = "Bound (%s) to %s",
['currentlyboundemotes'] = " Keybind animationer:",
['notvalidkey'] = "er ikke en gyldigt nøgle.",
['keybinds'] = "🔢 Keybinds",
Expand All @@ -60,7 +59,7 @@ Locales['da'] = {
['firework'] = "Tryk på ~y~G~w~ for at bruge fyrværkeri",
['poop'] = "Tryk på ~y~G~w~ for at skide",
['puke'] = "Tryk ~y~G~w~ for at kaste op", ---- Translated via smodin.io
['cut'] = "Press ~y~G~w~ to cut",
['cut'] = "Press ~y~G~w~ to cut",
['btn_select'] = "Vælg",
['btn_back'] = "Tilbage",
['btn_switch'] = "Bevægelse",
Expand Down
5 changes: 2 additions & 3 deletions locales/de.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ Locales['de'] = {
['spraychamp'] = "Halte ~y~G~w~ um Champagner zu sprühen",
['smoke'] = "Halte ~y~G~w~ um zu rauchen.",
['vape'] = "Halte ~y~G~w~ um zu vapen.",
['bound'] = "Gebunden ",
['to'] = "zu",
['boundto'] = "Bound (%s) to %s",
['currentlyboundemotes'] = " Derzeit gebundene Emotes:",
['notvalidkey'] = "ist kein gültiger Schlüssel.",
['keybinds'] = "🔢 Tastenkombinationen",
Expand All @@ -59,7 +58,7 @@ Locales['de'] = {
['firework'] = "Drücke ~y~G~w~, um das Feuerwerk zu benutzen",
['poop'] = "Drücke ~y~G~w~, um zu kacken", --Translated using smodin.io
['puke'] = "Drücke ~y~G~w~ um dich zu übergeben",
['cut'] = "Press ~y~G~w~ to cut",
['cut'] = "Press ~y~G~w~ to cut",
['btn_select'] = "Auswählen",
['btn_back'] = "Zurück",
['btn_switch'] = "Bewegung",
Expand Down
9 changes: 4 additions & 5 deletions locales/el.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,22 @@ Locales['el'] = {
['stun'] = "Πάτησε ~y~G~w~ για να 'χρησιμοποιήσεις' πιστόλι ακινητοποίησης.",
['smoke'] = "Press ~y~G~w~ to smoke.",
['vape'] = "Πάτησε ~y~G~w~ για να ατμίσεις.",
['bound'] = "Σύνδεση ",
['to'] = "στο",
['bound'] = "Σύνδεση (%s) στο %s",
['currentlyboundemotes'] = " Τωρινές συντομεύσεις κινήσεων:",
['notvalidkey'] = "δεν είναι σωστό κουμπί.",
['keybinds'] = "🔢 Συντομεύσεις Πλήκτρων",
['keybindsinfo'] = "Χρήση",
['searchemotes'] = "~h~~y~ 🔍 Αναζήτηση Κινήσεων",
['searchinputtitle'] = "Αναζήτηση:",
['searchmenudesc'] = "%s αποτέλεσμα(ατα) για",
['searchmenudesc'] = "αποτέλεσμα(ατα) για",
['searchnoresult'] = "Κανένα απότέλεσμα για την αναζήτηση",
['searchshifttofav'] = "Κράτησε L-Shift και πάτησε enter για να το αποθηκεύσεις ως αγαπημένο.",
['searchcantsetfav'] = "Οι κινήσεις που μοιράζοντε με παίκτες δεν μπορούν να μπούν στα αγαπημένα.",
['invalidvariation'] = "Μη έγκυρη επιλογή. Σωστές επιλογές είναι: %s",
['firework'] = "Πάτησε ~y~G~w~ για να χρησιμοποιήσεις βεγγαλικό",
['poop'] = "Πάτησε ~y~G~w~ για χέσιμο",
['puke'] = "Πάτησε ~y~G~w~ για εμετό",
['cut'] = "Press ~y~G~w~ to cut",
['cut'] = "Press ~y~G~w~ to cut",
['btn_select'] = "Επιλογή",
['btn_back'] = "Πίσω",
['btn_switch'] = "Κίνηση",
Expand All @@ -80,5 +79,5 @@ Locales['el'] = {
['in_a_vehicle'] = "Μπορείς να κάνεις αυτή τη κίνηση μόνο ενώ είσαι σε όχημα 🚷",
['no_anim_crawling'] = "Δεν μπορείς να κάνεις κάποια κίνηση ενώ σέρνεσαι",
['no_anim_right_now'] = "You can't play an animation right now",

}
16 changes: 9 additions & 7 deletions locales/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Locales['en'] = {
['normalreset'] = "~h~~r~ Normal (Reset)",
['moods'] = "Moods 😒",
['infoupdate'] = "Credits 🤝🏻",
['emotemenu'] = 'See the list of possible emotes',
['remove_emote_keybind'] = 'Delete an emote from keybinds',
['show_emote_keybind'] = 'view emotes on keybinds',
['play_emote'] = 'play an animation',
Expand Down Expand Up @@ -53,10 +52,9 @@ Locales['en'] = {
['stun'] = "Press ~y~G~w~ to 'use' stun gun.",
['smoke'] = "Press ~y~G~w~ to smoke.",
['vape'] = "Press ~y~G~w~ to vape.",
['bound'] = "Bound ",
['to'] = "to",
['handsup'] = "hands up",
['currentlyboundemotes'] = " Currently bound emotes:",
['boundto'] = "Bound (~y~%s~w~) to ~g~%s~w~",
['handsup'] = "Hands up",
['currentlyboundemotes'] = "Currently bound emotes:",
['notvalidkey'] = "is not a valid key.",
['keybinds'] = "🔢 Keybinds",
['keybindsinfo'] = "Use",
Expand All @@ -70,10 +68,9 @@ Locales['en'] = {
['firework'] = "Press ~y~G~w~ to use the firework",
['poop'] = "Press ~y~G~w~ to poop",
['puke'] = "Press ~y~G~w~ to puke",
['cut'] = "Press ~y~G~w~ to cut",
['cut'] = "Press ~y~G~w~ to cut",
['btn_select'] = "Select",
['btn_back'] = "Back",
['btn_switch'] = "Movement",
['btn_increment'] = "Increment",
['dead'] = "You can't use emotes while dead!",
['swimming'] = "You can't use emotes while swimming",
Expand All @@ -91,5 +88,10 @@ Locales['en'] = {
['no_anim_crawling'] = "You can't play animations while crawling",
['no_anim_right_now'] = "You can't play an animation right now",
['register_cancel_emote'] = "Cancel current emote",
['register_open_menu'] = "Open animation menu",
['register_fav_anim'] = "Play your favorite emote",
['crouch'] = "Crouch",
['crawl'] = "Crawl",
['pointing'] = "Finger pointing",

}
5 changes: 2 additions & 3 deletions locales/es.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ Locales['es'] = {
['spraychamp'] = "Mantén la ~y~G~w~ para rociar champán.",
['smoke'] = "Press ~y~G~w~ to smoke.",
['vape'] = "Presione ~y~G~w~ para vapear.",
['bound'] = "Unida ",
['to'] = "a",
['boundto'] = "Unida (%s) a %s",
['currentlyboundemotes'] = " Emotes vinculados actualmente:",
['notvalidkey'] = "no es una clave válida.",
['keybinds'] = "🔢 Keybinds",
Expand All @@ -59,7 +58,7 @@ Locales['es'] = {
['firework'] = "Presione ~y~G~w~ para usar los fuegos artificiales",
['poop'] = "Presione ~y~G~w~ para hacer caca",
['puke'] = "Presiona ~y~G~w~ para vomitar", ---- Translated via smodin.io
['cut'] = "Press ~y~G~w~ to cut",
['cut'] = "Press ~y~G~w~ to cut",
['btn_select'] = "Seleccionar",
['btn_back'] = "Atrás ",
['btn_switch'] = "Movimiento ",
Expand Down
3 changes: 1 addition & 2 deletions locales/fa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ Locales['fa'] = {
['stun'] = "Press ~y~G~w~ baray 'use' tofang bihoshi.",
['smoke'] = "Press ~y~G~w~ to smoke.",
['vape'] = "entekhab ~y~G~w~ to vape.",
['bound'] = "Bound ",
['to'] = "baray",
['boundto'] = "Bound (%s) baray %s",
['currentlyboundemotes'] = " emote mahdod ast:",
['notvalidkey'] = "vojod nadarad.",
['keybinds'] = "🔢 kilid sari",
Expand Down
5 changes: 2 additions & 3 deletions locales/fi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ Locales['fi'] = {
['stun'] = "Paina ~y~G~w~ 'käyttääksesi' etälamautinta.",
['smoke'] = "Press ~y~G~w~ to smoke.",
['vape'] = "Paina ~y~G~w~ käyttääksesi vapea.",
['bound'] = "Bindata",
['to'] = ' Näppäimeen',
['boundto'] = "Bindata (%s) näppäimeen %s",
['currentlyboundemotes'] = "Bindatut animaatiot:",
['notvalidkey'] = "ei ole käytettävä näppäin.",
['keybinds'] = "🔢 Pikanäppäimet",
Expand All @@ -60,7 +59,7 @@ Locales['fi'] = {
['firework'] = "Käytä ilotulitteita painamalla ~y~G~w~",
['poop'] = "Paina ~y~G~w~ kakataksesi.",
['puke'] = "Paina ~y~G~w~ oksentaaksesi.",
['cut'] = "Press ~y~G~w~ to cut",
['cut'] = "Press ~y~G~w~ to cut",
['btn_select'] = "Valitse",
['btn_back'] = "Takaisin",
['btn_switch'] = "Liike",
Expand Down
3 changes: 1 addition & 2 deletions locales/fr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ Locales['fr'] = {
['spraychamp'] = "Appuyez sur <b>G</b> pour vaporiser du champagne.",
['smoke'] = "Appuyez sur <b>G</b> pour fumer.",
['vape'] = "Appuyez sur <b>G</b> pour vapoter.",
['bound'] = "Liée ",
['to'] = "à",
['boundto'] = "Liée (%s) à %s",
['currentlyboundemotes'] = " Emotes actuellement liées:",
['notvalidkey'] = "n'est pas une clé valide.",
['keybinds'] = "🔢 Raccourcis clavier",
Expand Down
Loading

0 comments on commit 2588554

Please sign in to comment.