diff --git a/client/main.lua b/client/main.lua index b9b6581..649d6eb 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,37 +1,37 @@ local PersonalMenu = { - ItemSelected = {}, - ItemIndex = {}, - WeaponData = {}, - WalletIndex = {}, - WalletList = {i18nU('wallet_option_give'), i18nU('wallet_option_drop')}, - BillData = {}, - ClothesButtons = {'torso', 'pants', 'shoes', 'bag', 'bproof'}, - AccessoriesButtons = {'ears', 'glasses', 'helmet', 'mask'}, - DoorState = { - FrontLeft = false, - FrontRight = false, - BackLeft = false, - BackRight = false, - Hood = false, - Trunk = false - }, - DoorIndex = 1, - DoorList = {i18nU('vehicle_door_frontleft'), i18nU('vehicle_door_frontright'), i18nU('vehicle_door_backleft'), i18nU('vehicle_door_backright')}, - GPSIndex = 1, - GPSList = {} + ItemSelected = {}, + ItemIndex = {}, + WeaponData = {}, + WalletIndex = {}, + WalletList = {i18nU('wallet_option_give'), i18nU('wallet_option_drop')}, + BillData = {}, + ClothesButtons = {'torso', 'pants', 'shoes', 'bag', 'bproof'}, + AccessoriesButtons = {'ears', 'glasses', 'helmet', 'mask'}, + DoorState = { + FrontLeft = false, + FrontRight = false, + BackLeft = false, + BackRight = false, + Hood = false, + Trunk = false + }, + DoorIndex = 1, + DoorList = {i18nU('vehicle_door_frontleft'), i18nU('vehicle_door_frontright'), i18nU('vehicle_door_backleft'), i18nU('vehicle_door_backright')}, + GPSIndex = 1, + GPSList = {} } PlayerVars = { - isDead = false, - crouched = false, - handsup = false, - pointing = false, - noclip = false, - godmode = false, - ghostmode = false, - showCoords = false, - showName = false, - group = 'user' + isDead = false, + crouched = false, + handsup = false, + pointing = false, + noclip = false, + godmode = false, + ghostmode = false, + showCoords = false, + showName = false, + group = 'user' } local drawContentOptions = { header = true, instructionalButton = true } @@ -42,48 +42,48 @@ local function firstToUpper(str) end local adminGroups = { - ['mod'] = true, - ['admin'] = true, - ['superadmin'] = true, - ['owner'] = true, - ['_dev'] = true + ['mod'] = true, + ['admin'] = true, + ['superadmin'] = true, + ['owner'] = true, + ['_dev'] = true } CreateThread(function() - if Config.Framework == 'esx' then - while not ESX do - Wait(100) - end - - local weaponsData = ESX.GetWeaponList() - - for i = #weaponsData, 1, -1 do - local weaponData = weaponsData[i] - - if weaponData.name == 'WEAPON_UNARMED' then - table.remove(weaponsData, i) - else - weaponData.hash = GetHashKey(weaponData.name) - end - end - - PersonalMenu.WeaponData = weaponsData - end + if Config.Framework == 'esx' then + while not ESX do + Wait(100) + end + + local weaponsData = ESX.GetWeaponList() + + for i = #weaponsData, 1, -1 do + local weaponData = weaponsData[i] + + if weaponData.name == 'WEAPON_UNARMED' then + table.remove(weaponsData, i) + else + weaponData.hash = GetHashKey(weaponData.name) + end + end + + PersonalMenu.WeaponData = weaponsData + end end) for i = 1, #Config.GPS do - PersonalMenu.GPSList[i] = Config.GPS[i].name + PersonalMenu.GPSList[i] = Config.GPS[i].name end for i = 1, #Config.AdminCommands do - local adminCommandCfg = Config.AdminCommands[i] - local groupsById = {} + local adminCommandCfg = Config.AdminCommands[i] + local groupsById = {} - for j = 1, #adminCommandCfg.groups do - groupsById[adminCommandCfg.groups[j]] = true - end + for j = 1, #adminCommandCfg.groups do + groupsById[adminCommandCfg.groups[j]] = true + end - adminCommandCfg.groupsById = groupsById + adminCommandCfg.groupsById = groupsById end local mainMenu = RageUI.CreateMenu(Config.MenuTitle, i18nU('mainmenu_subtitle'), 0, 0, 'commonmenu', 'interaction_bgd', 255, 255, 255, 255) @@ -92,15 +92,15 @@ local personalMenuCategories = {} local personalMenuCategoriesById = {} local function addPersonalMenuCategory(id, name, restriction) - local menu = RageUI.CreateSubMenu(mainMenu, name) - local pmCategory = { id = id, name = name, menu = menu, restriction = restriction } - personalMenuCategories[#personalMenuCategories + 1] = pmCategory - personalMenuCategoriesById[id] = pmCategory - return pmCategory + local menu = RageUI.CreateSubMenu(mainMenu, name) + local pmCategory = { id = id, name = name, menu = menu, restriction = restriction } + personalMenuCategories[#personalMenuCategories + 1] = pmCategory + personalMenuCategoriesById[id] = pmCategory + return pmCategory end local function getPersonalMenuCategory(id) - return personalMenuCategoriesById[id] + return personalMenuCategoriesById[id] end local inventoryCategory = addPersonalMenuCategory('inventory', i18nU('inventory_title')) @@ -112,961 +112,961 @@ addPersonalMenuCategory('accessories', i18nU('accessories_title')) local animationCategory = addPersonalMenuCategory('animation', i18nU('animation_title')) addPersonalMenuCategory('vehicle', i18nU('vehicle_title'), function() - return IsPedSittingInAnyVehicle(plyPed) and GetPedInVehicleSeat(GetVehiclePedIsIn(plyPed, false), -1) == plyPed + return IsPedSittingInAnyVehicle(plyPed) and GetPedInVehicleSeat(GetVehiclePedIsIn(plyPed, false), -1) == plyPed end) addPersonalMenuCategory('boss', i18nU('bossmanagement_title'), function() - return GetPlayerJob().isBoss + return GetPlayerJob().isBoss end) if Config.DoubleJob then - addPersonalMenuCategory('boss2', i18nU('bossmanagement2_title'), function() - return GetPlayerJob2().isBoss - end) + addPersonalMenuCategory('boss2', i18nU('bossmanagement2_title'), function() + return GetPlayerJob2().isBoss + end) end addPersonalMenuCategory('admin', i18nU('admin_title'), function() - return adminGroups[PlayerVars.group] ~= nil + return adminGroups[PlayerVars.group] ~= nil end) local inventoryActionsMenu = RageUI.CreateSubMenu(inventoryCategory.menu, i18nU('inventory_actions_title')) inventoryActionsMenu.Closed = function() - PersonalMenu.ItemSelected = nil + PersonalMenu.ItemSelected = nil end local loadoutActionsMenu = RageUI.CreateSubMenu(loadoutCategory.menu, i18nU('loadout_actions_title')) loadoutActionsMenu.Closed = function() - PersonalMenu.ItemSelected = nil + PersonalMenu.ItemSelected = nil end for i = 1, #Config.Animations do - local animationCfg = Config.Animations[i] - animationCfg.menu = RageUI.CreateSubMenu(animationCategory.menu, animationCfg.name) + local animationCfg = Config.Animations[i] + animationCfg.menu = RageUI.CreateSubMenu(animationCategory.menu, animationCfg.name) end if Config.Framework == 'esx' then - AddEventHandler('esx:onPlayerDeath', function() - PlayerVars.isDead = true - RageUI.CloseAll() - ESX.UI.Menu.CloseAll() - end) + AddEventHandler('esx:onPlayerDeath', function() + PlayerVars.isDead = true + RageUI.CloseAll() + ESX.UI.Menu.CloseAll() + end) end AddEventHandler('playerSpawned', function() - PlayerVars.isDead = false + PlayerVars.isDead = false end) -- Weapon Menu -- RegisterNetEvent('krz_personalmenu:Weapon_addAmmoToPedC', function(value, quantity) - local weaponHash = GetHashKey(value) + local weaponHash = GetHashKey(value) - if HasPedGotWeapon(plyPed, weaponHash, false) and value ~= 'WEAPON_UNARMED' then - AddAmmoToPed(plyPed, value, quantity) - end + if HasPedGotWeapon(plyPed, weaponHash, false) and value ~= 'WEAPON_UNARMED' then + AddAmmoToPed(plyPed, value, quantity) + end end) -- Admin Menu -- RegisterNetEvent('krz_personalmenu:Admin_BringC', function(plyCoords) - SetEntityCoords(plyPed, plyCoords) + SetEntityCoords(plyPed, plyCoords) end) --Message text joueur local function Text(text) - SetTextColour(186, 186, 186, 255) - SetTextFont(0) - SetTextScale(0.378, 0.378) - SetTextWrap(0.0, 1.0) - SetTextCentre(false) - SetTextDropshadow(0, 0, 0, 0, 255) - SetTextEdge(1, 0, 0, 0, 205) - BeginTextCommandDisplayText('STRING') - AddTextComponentSubstringPlayerName(text) - EndTextCommandDisplayText(0.5, 0.03) + SetTextColour(186, 186, 186, 255) + SetTextFont(0) + SetTextScale(0.378, 0.378) + SetTextWrap(0.0, 1.0) + SetTextCentre(false) + SetTextDropshadow(0, 0, 0, 0, 255) + SetTextEdge(1, 0, 0, 0, 205) + BeginTextCommandDisplayText('STRING') + AddTextComponentSubstringPlayerName(text) + EndTextCommandDisplayText(0.5, 0.03) end function KeyboardInput(entryTitle, textEntry, inputText, maxLength) - AddTextEntry(entryTitle, textEntry) - DisplayOnscreenKeyboard(1, entryTitle, '', inputText, '', '', '', maxLength) - - while UpdateOnscreenKeyboard() ~= 1 and UpdateOnscreenKeyboard() ~= 2 do - Wait(0) - end - - if UpdateOnscreenKeyboard() ~= 2 then - local result = GetOnscreenKeyboardResult() - Wait(500) - return result - else - Wait(500) - return nil - end + AddTextEntry(entryTitle, textEntry) + DisplayOnscreenKeyboard(1, entryTitle, '', inputText, '', '', '', maxLength) + + while UpdateOnscreenKeyboard() ~= 1 and UpdateOnscreenKeyboard() ~= 2 do + Wait(0) + end + + if UpdateOnscreenKeyboard() ~= 2 then + local result = GetOnscreenKeyboardResult() + Wait(500) + return result + else + Wait(500) + return nil + end end function getCamDirection() - local heading = GetGameplayCamRelativeHeading() + GetEntityPhysicsHeading(plyPed) - local pitch = GetGameplayCamRelativePitch() - local coords = vector3(-math.sin(heading * math.pi / 180.0), math.cos(heading * math.pi / 180.0), math.sin(pitch * math.pi / 180.0)) - local len = math.sqrt((coords.x * coords.x) + (coords.y * coords.y) + (coords.z * coords.z)) + local heading = GetGameplayCamRelativeHeading() + GetEntityPhysicsHeading(plyPed) + local pitch = GetGameplayCamRelativePitch() + local coords = vector3(-math.sin(heading * math.pi / 180.0), math.cos(heading * math.pi / 180.0), math.sin(pitch * math.pi / 180.0)) + local len = math.sqrt((coords.x * coords.x) + (coords.y * coords.y) + (coords.z * coords.z)) - if len ~= 0 then - coords = coords / len - end + if len ~= 0 then + coords = coords / len + end - return coords + return coords end function startAttitude(animSet) - if not animSet then - ResetPedMovementClipset(plyPed, 1.0) - return - end + if not animSet then + ResetPedMovementClipset(plyPed, 1.0) + return + end - LoadAnimSet(animSet) + LoadAnimSet(animSet) - SetPedMotionBlur(plyPed, false) - SetPedMovementClipset(plyPed, animSet, 1.0) + SetPedMotionBlur(plyPed, false) + SetPedMovementClipset(plyPed, animSet, 1.0) - RemoveAnimSet(animSet) + RemoveAnimSet(animSet) end function startAnim(animDict, animName) - LoadAnimDict(animDict) - TaskPlayAnim(plyPed, animDict, animName, 8.0, 8.0, -1, 48, 0, false, false, false) - RemoveAnimDict(animDict) + LoadAnimDict(animDict) + TaskPlayAnim(plyPed, animDict, animName, 8.0, 8.0, -1, 48, 0, false, false, false) + RemoveAnimDict(animDict) end function startAnimAction(animDict, animName) - LoadAnimDict(animDict) - TaskPlayAnim(plyPed, animDict, animName, 8.0, 1.0, -1, 48, 0, false, false, false) - RemoveAnimDict(animDict) + LoadAnimDict(animDict) + TaskPlayAnim(plyPed, animDict, animName, 8.0, 1.0, -1, 48, 0, false, false, false) + RemoveAnimDict(animDict) end function setClothes(clotheId) - TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) - TriggerEvent('skinchanger:getSkin', function(currentSkin) - local clothes = nil - - if clotheId == 'torso' then - startAnimAction('clothingtie', 'try_tie_neutral_a') - Wait(1000) - PlayerVars.handsup, PlayerVars.pointing = false, false - ClearPedTasks(plyPed) - - if skin.torso_1 ~= currentSkin.torso_1 then - clothes = {['torso_1'] = skin.torso_1, ['torso_2'] = skin.torso_2, ['tshirt_1'] = skin.tshirt_1, ['tshirt_2'] = skin.tshirt_2, ['arms'] = skin.arms} - else - clothes = {['torso_1'] = 15, ['torso_2'] = 0, ['tshirt_1'] = 15, ['tshirt_2'] = 0, ['arms'] = 15} - end - elseif clotheId == 'pants' then - if skin.pants_1 ~= currentSkin.pants_1 then - clothes = {['pants_1'] = skin.pants_1, ['pants_2'] = skin.pants_2} - else - if skin.sex == 0 then - clothes = {['pants_1'] = 61, ['pants_2'] = 1} - else - clothes = {['pants_1'] = 15, ['pants_2'] = 0} - end - end - elseif clotheId == 'shoes' then - if skin.shoes_1 ~= currentSkin.shoes_1 then - clothes = {['shoes_1'] = skin.shoes_1, ['shoes_2'] = skin.shoes_2} - else - if skin.sex == 0 then - clothes = {['shoes_1'] = 34, ['shoes_2'] = 0} - else - clothes = {['shoes_1'] = 35, ['shoes_2'] = 0} - end - end - elseif clotheId == 'bag' then - if skin.bags_1 ~= currentSkin.bags_1 then - clothes = {['bags_1'] = skin.bags_1, ['bags_2'] = skin.bags_2} - else - clothes = {['bags_1'] = 0, ['bags_2'] = 0} - end - elseif clotheId == 'bproof' then - startAnimAction('clothingtie', 'try_tie_neutral_a') - Wait(1000) - PlayerVars.handsup, PlayerVars.pointing = false, false - ClearPedTasks(plyPed) - - if skin.bproof_1 ~= currentSkin.bproof_1 then - clothes = {['bproof_1'] = skin.bproof_1, ['bproof_2'] = skin.bproof_2} - else - clothes = {['bproof_1'] = 0, ['bproof_2'] = 0} - end - end - - TriggerEvent('skinchanger:loadClothes', currentSkin, clothes) - end) - end) + TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:getSkin', function(currentSkin) + local clothes = nil + + if clotheId == 'torso' then + startAnimAction('clothingtie', 'try_tie_neutral_a') + Wait(1000) + PlayerVars.handsup, PlayerVars.pointing = false, false + ClearPedTasks(plyPed) + + if skin.torso_1 ~= currentSkin.torso_1 then + clothes = {['torso_1'] = skin.torso_1, ['torso_2'] = skin.torso_2, ['tshirt_1'] = skin.tshirt_1, ['tshirt_2'] = skin.tshirt_2, ['arms'] = skin.arms} + else + clothes = {['torso_1'] = 15, ['torso_2'] = 0, ['tshirt_1'] = 15, ['tshirt_2'] = 0, ['arms'] = 15} + end + elseif clotheId == 'pants' then + if skin.pants_1 ~= currentSkin.pants_1 then + clothes = {['pants_1'] = skin.pants_1, ['pants_2'] = skin.pants_2} + else + if skin.sex == 0 then + clothes = {['pants_1'] = 61, ['pants_2'] = 1} + else + clothes = {['pants_1'] = 15, ['pants_2'] = 0} + end + end + elseif clotheId == 'shoes' then + if skin.shoes_1 ~= currentSkin.shoes_1 then + clothes = {['shoes_1'] = skin.shoes_1, ['shoes_2'] = skin.shoes_2} + else + if skin.sex == 0 then + clothes = {['shoes_1'] = 34, ['shoes_2'] = 0} + else + clothes = {['shoes_1'] = 35, ['shoes_2'] = 0} + end + end + elseif clotheId == 'bag' then + if skin.bags_1 ~= currentSkin.bags_1 then + clothes = {['bags_1'] = skin.bags_1, ['bags_2'] = skin.bags_2} + else + clothes = {['bags_1'] = 0, ['bags_2'] = 0} + end + elseif clotheId == 'bproof' then + startAnimAction('clothingtie', 'try_tie_neutral_a') + Wait(1000) + PlayerVars.handsup, PlayerVars.pointing = false, false + ClearPedTasks(plyPed) + + if skin.bproof_1 ~= currentSkin.bproof_1 then + clothes = {['bproof_1'] = skin.bproof_1, ['bproof_2'] = skin.bproof_2} + else + clothes = {['bproof_1'] = 0, ['bproof_2'] = 0} + end + end + + TriggerEvent('skinchanger:loadClothes', currentSkin, clothes) + end) + end) end function setAccessory(accessoryId) - TriggerServerCallback('esx_accessories:get', function(hasAccessory, accessorySkin) - if not hasAccessory then - local localeKey = ('accessories_no_%s'):format(accessoryId) - GameNotification(i18nU(localeKey)) - return - end - - TriggerEvent('skinchanger:getSkin', function(currentSkin) - local propIdx = -1 - local propTex = 0 - - if accessoryId == 'ears' then - startAnimAction('mini@ears_defenders', 'takeoff_earsdefenders_idle') - Wait(250) - PlayerVars.handsup, PlayerVars.pointing = false, false - ClearPedTasks(plyPed) - elseif accessoryId == 'glasses' then - startAnimAction('clothingspecs', 'try_glasses_positive_a') - Wait(1000) - PlayerVars.handsup, PlayerVars.pointing = false, false - ClearPedTasks(plyPed) - elseif accessoryId == 'helmet' then - startAnimAction('missfbi4', 'takeoff_mask') - Wait(1000) - PlayerVars.handsup, PlayerVars.pointing = false, false - ClearPedTasks(plyPed) - elseif accessoryId == 'mask' then - propIdx = 0 - startAnimAction('missfbi4', 'takeoff_mask') - Wait(850) - PlayerVars.handsup, PlayerVars.pointing = false, false - ClearPedTasks(plyPed) - end - - local accessoryIdxKey = ('%s_1'):format(accessoryId) - local accessoryTexKey = ('%s_2'):format(accessoryId) - - if currentSkin[accessoryIdxKey] == 0 then - propIdx = accessorySkin[accessoryIdxKey] - propTex = accessorySkin[accessoryTexKey] - end - - TriggerEvent('skinchanger:loadClothes', currentSkin, { - [accessoryIdxKey] = propIdx, - [accessoryTexKey] = propTex - }) - end) - end, firstToUpper(accessoryId)) + TriggerServerCallback('esx_accessories:get', function(hasAccessory, accessorySkin) + if not hasAccessory then + local localeKey = ('accessories_no_%s'):format(accessoryId) + GameNotification(i18nU(localeKey)) + return + end + + TriggerEvent('skinchanger:getSkin', function(currentSkin) + local propIdx = -1 + local propTex = 0 + + if accessoryId == 'ears' then + startAnimAction('mini@ears_defenders', 'takeoff_earsdefenders_idle') + Wait(250) + PlayerVars.handsup, PlayerVars.pointing = false, false + ClearPedTasks(plyPed) + elseif accessoryId == 'glasses' then + startAnimAction('clothingspecs', 'try_glasses_positive_a') + Wait(1000) + PlayerVars.handsup, PlayerVars.pointing = false, false + ClearPedTasks(plyPed) + elseif accessoryId == 'helmet' then + startAnimAction('missfbi4', 'takeoff_mask') + Wait(1000) + PlayerVars.handsup, PlayerVars.pointing = false, false + ClearPedTasks(plyPed) + elseif accessoryId == 'mask' then + propIdx = 0 + startAnimAction('missfbi4', 'takeoff_mask') + Wait(850) + PlayerVars.handsup, PlayerVars.pointing = false, false + ClearPedTasks(plyPed) + end + + local accessoryIdxKey = ('%s_1'):format(accessoryId) + local accessoryTexKey = ('%s_2'):format(accessoryId) + + if currentSkin[accessoryIdxKey] == 0 then + propIdx = accessorySkin[accessoryIdxKey] + propTex = accessorySkin[accessoryTexKey] + end + + TriggerEvent('skinchanger:loadClothes', currentSkin, { + [accessoryIdxKey] = propIdx, + [accessoryTexKey] = propTex + }) + end) + end, firstToUpper(accessoryId)) end function CheckQuantity(number) - number = tonumber(number) - if type(number) ~= 'number' then - return false, number - end + number = tonumber(number) + if type(number) ~= 'number' then + return false, number + end - number = MathRound(number) - if number <= 0 then - return false, number - end + number = MathRound(number) + if number <= 0 then + return false, number + end - return true, number + return true, number end function DrawPersonalMenu() - ruiDrawContent(drawContentOptions, function() - for i = 1, #personalMenuCategories do - local pmCategory = personalMenuCategories[i] - local canOpen = not pmCategory.restriction or pmCategory.restriction() - RageUI.Button(pmCategory.name, nil, canOpen and { RightLabel = "→→→" } or { RightBadge = RageUI.BadgeStyle.Lock }, canOpen, nil, pmCategory.menu) - end + ruiDrawContent(drawContentOptions, function() + for i = 1, #personalMenuCategories do + local pmCategory = personalMenuCategories[i] + local canOpen = not pmCategory.restriction or pmCategory.restriction() + RageUI.Button(pmCategory.name, nil, canOpen and { RightLabel = "→→→" } or { RightBadge = RageUI.BadgeStyle.Lock }, canOpen, nil, pmCategory.menu) + end - RageUI.List(i18nU('mainmenu_gps_button'), PersonalMenu.GPSList, PersonalMenu.GPSIndex, nil, nil, true, function(Hovered, Active, Selected, Index) - PersonalMenu.GPSIndex = Index + RageUI.List(i18nU('mainmenu_gps_button'), PersonalMenu.GPSList, PersonalMenu.GPSIndex, nil, nil, true, function(Hovered, Active, Selected, Index) + PersonalMenu.GPSIndex = Index - if not Selected then return end + if not Selected then return end - local gpsCfg = Config.GPS[Index] + local gpsCfg = Config.GPS[Index] - if gpsCfg.coords then - SetNewWaypoint(gpsCfg.coords) - else - DeleteWaypoint() - end + if gpsCfg.coords then + SetNewWaypoint(gpsCfg.coords) + else + DeleteWaypoint() + end - GameNotification(i18nU('gps', gpsCfg.name)) - end) - end) + GameNotification(i18nU('gps', gpsCfg.name)) + end) + end) end function DrawActionsMenu(_type) - ruiDrawContent(drawContentOptions, function() - if _type == 'inventory' then - RageUI.Button(i18nU('inventory_use_button'), "", nil, true, function(Hovered, Active, Selected) - if not Selected then return end - - local itemSelected = PersonalMenu.ItemSelected - - if not itemSelected.usable then - GameNotification(i18nU('not_usable', itemSelected.label)) - return - end - - TriggerServerEvent('esx:useItem', itemSelected.name) - end) - - RageUI.Button(i18nU('inventory_give_button'), "", nil, true, function(Hovered, Active, Selected) - if not Selected then return end - - local closestPlayer, closestDistance = GetClosestPlayer() - - if closestDistance == -1 or closestDistance > 3 then - GameNotification(i18nU('players_nearby')) - return - end - - local itemSelected = PersonalMenu.ItemSelected - - local closestPed = GetPlayerPed(closestPlayer) - if not IsPedOnFoot(closestPed) then - GameNotification(i18nU('in_vehicle_give', itemSelected.label)) - return - end - - if not PersonalMenu.ItemIndex[itemSelected.name] or itemSelected.count <= 0 then - GameNotification(i18nU('amount_invalid')) - return - end - - TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), 'item_standard', itemSelected.name, PersonalMenu.ItemIndex[itemSelected.name]) - RageUI.CloseAll() - end) - - RageUI.Button(i18nU('inventory_drop_button'), "", {RightBadge = RageUI.BadgeStyle.Alert}, true, function(Hovered, Active, Selected) - if not Selected then return end - - local itemSelected = PersonalMenu.ItemSelected - - if not itemSelected.canRemove then - GameNotification(i18nU('not_droppable', itemSelected.label)) - return - end - - if not IsPedOnFoot(plyPed) then - GameNotification(i18nU('in_vehicle_drop', itemSelected.label)) - return - end - - if not PersonalMenu.ItemIndex[itemSelected.name] then - GameNotification(i18nU('amount_invalid')) - return - end - - TriggerServerEvent('esx:removeInventoryItem', 'item_standard', itemSelected.name, PersonalMenu.ItemIndex[itemSelected.name]) - RageUI.CloseAll() - end) - elseif _type == 'loadout' then - if not HasPedGotWeapon(plyPed, PersonalMenu.ItemSelected.hash, false) then - RageUI.GoBack() - return - end - - RageUI.Button(i18nU('loadout_give_button'), "", nil, true, function(Hovered, Active, Selected) - if not Selected then return end - - local closestPlayer, closestDistance = GetClosestPlayer() - if closestDistance == -1 or closestDistance > 3 then - GameNotification(i18nU('players_nearby')) - return - end - - local itemSelected = PersonalMenu.ItemSelected - - local closestPed = GetPlayerPed(closestPlayer) - if not IsPedOnFoot(closestPed) then - GameNotification(i18nU('in_vehicle_give', itemSelected.label)) - return - end - - local ammo = GetAmmoInPedWeapon(plyPed, itemSelected.hash) - TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), 'item_weapon', itemSelected.name, ammo) - RageUI.CloseAll() - end) - - RageUI.Button(i18nU('loadout_givemun_button'), "", {RightBadge = RageUI.BadgeStyle.Ammo}, true, function(Hovered, Active, Selected) - if not Selected then return end - - local post, quantity = CheckQuantity(KeyboardInput('PM_BOX_AMMO_AMOUNT', i18nU('dialogbox_amount_ammo'), '', 8)) - if not post then - GameNotification(i18nU('amount_invalid')) - return - end - - local closestPlayer, closestDistance = GetClosestPlayer() - if closestDistance == -1 or closestDistance > 3 then - GameNotification(i18nU('players_nearby')) - return - end - - local itemSelected = PersonalMenu.ItemSelected - - local closestPed = GetPlayerPed(closestPlayer) - if not IsPedOnFoot(closestPed) then - GameNotification(i18nU('in_vehicle_give', itemSelected.label)) - return - end - - local ammo = GetAmmoInPedWeapon(plyPed, itemSelected.hash) - - if ammo <= 0 then - GameNotification(i18nU('no_ammo')) - return - end - - if quantity > ammo then - GameNotification(i18nU('not_enough_ammo')) - return - end - - local finalAmmo = math.floor(ammo - quantity) - SetPedAmmo(plyPed, itemSelected.name, finalAmmo) - - TriggerServerEvent('krz_personalmenu:Weapon_addAmmoToPedS', GetPlayerServerId(closestPlayer), itemSelected.name, quantity) - GameNotification(i18nU('gave_ammo', quantity, GetPlayerName(closestPlayer))) - RageUI.CloseAll() - end) - - RageUI.Button(i18nU('loadout_drop_button'), "", {RightBadge = RageUI.BadgeStyle.Alert}, true, function(Hovered, Active, Selected) - if not Selected then return end - - local itemSelected = PersonalMenu.ItemSelected - - if not IsPedOnFoot(plyPed) then - GameNotification(i18nU('in_vehicle_drop', itemSelected.label)) - return - end - - TriggerServerEvent('esx:removeInventoryItem', 'item_weapon', itemSelected.name) - RageUI.CloseAll() - end) - end - end) + ruiDrawContent(drawContentOptions, function() + if _type == 'inventory' then + RageUI.Button(i18nU('inventory_use_button'), "", nil, true, function(Hovered, Active, Selected) + if not Selected then return end + + local itemSelected = PersonalMenu.ItemSelected + + if not itemSelected.usable then + GameNotification(i18nU('not_usable', itemSelected.label)) + return + end + + TriggerServerEvent('esx:useItem', itemSelected.name) + end) + + RageUI.Button(i18nU('inventory_give_button'), "", nil, true, function(Hovered, Active, Selected) + if not Selected then return end + + local closestPlayer, closestDistance = GetClosestPlayer() + + if closestDistance == -1 or closestDistance > 3 then + GameNotification(i18nU('players_nearby')) + return + end + + local itemSelected = PersonalMenu.ItemSelected + + local closestPed = GetPlayerPed(closestPlayer) + if not IsPedOnFoot(closestPed) then + GameNotification(i18nU('in_vehicle_give', itemSelected.label)) + return + end + + if not PersonalMenu.ItemIndex[itemSelected.name] or itemSelected.count <= 0 then + GameNotification(i18nU('amount_invalid')) + return + end + + TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), 'item_standard', itemSelected.name, PersonalMenu.ItemIndex[itemSelected.name]) + RageUI.CloseAll() + end) + + RageUI.Button(i18nU('inventory_drop_button'), "", {RightBadge = RageUI.BadgeStyle.Alert}, true, function(Hovered, Active, Selected) + if not Selected then return end + + local itemSelected = PersonalMenu.ItemSelected + + if not itemSelected.canRemove then + GameNotification(i18nU('not_droppable', itemSelected.label)) + return + end + + if not IsPedOnFoot(plyPed) then + GameNotification(i18nU('in_vehicle_drop', itemSelected.label)) + return + end + + if not PersonalMenu.ItemIndex[itemSelected.name] then + GameNotification(i18nU('amount_invalid')) + return + end + + TriggerServerEvent('esx:removeInventoryItem', 'item_standard', itemSelected.name, PersonalMenu.ItemIndex[itemSelected.name]) + RageUI.CloseAll() + end) + elseif _type == 'loadout' then + if not HasPedGotWeapon(plyPed, PersonalMenu.ItemSelected.hash, false) then + RageUI.GoBack() + return + end + + RageUI.Button(i18nU('loadout_give_button'), "", nil, true, function(Hovered, Active, Selected) + if not Selected then return end + + local closestPlayer, closestDistance = GetClosestPlayer() + if closestDistance == -1 or closestDistance > 3 then + GameNotification(i18nU('players_nearby')) + return + end + + local itemSelected = PersonalMenu.ItemSelected + + local closestPed = GetPlayerPed(closestPlayer) + if not IsPedOnFoot(closestPed) then + GameNotification(i18nU('in_vehicle_give', itemSelected.label)) + return + end + + local ammo = GetAmmoInPedWeapon(plyPed, itemSelected.hash) + TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), 'item_weapon', itemSelected.name, ammo) + RageUI.CloseAll() + end) + + RageUI.Button(i18nU('loadout_givemun_button'), "", {RightBadge = RageUI.BadgeStyle.Ammo}, true, function(Hovered, Active, Selected) + if not Selected then return end + + local post, quantity = CheckQuantity(KeyboardInput('PM_BOX_AMMO_AMOUNT', i18nU('dialogbox_amount_ammo'), '', 8)) + if not post then + GameNotification(i18nU('amount_invalid')) + return + end + + local closestPlayer, closestDistance = GetClosestPlayer() + if closestDistance == -1 or closestDistance > 3 then + GameNotification(i18nU('players_nearby')) + return + end + + local itemSelected = PersonalMenu.ItemSelected + + local closestPed = GetPlayerPed(closestPlayer) + if not IsPedOnFoot(closestPed) then + GameNotification(i18nU('in_vehicle_give', itemSelected.label)) + return + end + + local ammo = GetAmmoInPedWeapon(plyPed, itemSelected.hash) + + if ammo <= 0 then + GameNotification(i18nU('no_ammo')) + return + end + + if quantity > ammo then + GameNotification(i18nU('not_enough_ammo')) + return + end + + local finalAmmo = math.floor(ammo - quantity) + SetPedAmmo(plyPed, itemSelected.name, finalAmmo) + + TriggerServerEvent('krz_personalmenu:Weapon_addAmmoToPedS', GetPlayerServerId(closestPlayer), itemSelected.name, quantity) + GameNotification(i18nU('gave_ammo', quantity, GetPlayerName(closestPlayer))) + RageUI.CloseAll() + end) + + RageUI.Button(i18nU('loadout_drop_button'), "", {RightBadge = RageUI.BadgeStyle.Alert}, true, function(Hovered, Active, Selected) + if not Selected then return end + + local itemSelected = PersonalMenu.ItemSelected + + if not IsPedOnFoot(plyPed) then + GameNotification(i18nU('in_vehicle_drop', itemSelected.label)) + return + end + + TriggerServerEvent('esx:removeInventoryItem', 'item_weapon', itemSelected.name) + RageUI.CloseAll() + end) + end + end) end getPersonalMenuCategory('inventory').drawer = function() - local inventory = GetPlayerInventory() + local inventory = GetPlayerInventory() - for i = 1, #inventory do - local invItem = inventory[i] + for i = 1, #inventory do + local invItem = inventory[i] - if invItem.count > 0 then - local invCount = {} - for j = 1, invItem.count do invCount[j] = j end + if invItem.count > 0 then + local invCount = {} + for j = 1, invItem.count do invCount[j] = j end - RageUI.List(('%s (%u)'):format(invItem.label, invItem.count), invCount, PersonalMenu.ItemIndex[invItem.name] or 1, nil, nil, true, function(Hovered, Active, Selected, Index) - PersonalMenu.ItemIndex[invItem.name] = Index + RageUI.List(('%s (%u)'):format(invItem.label, invItem.count), invCount, PersonalMenu.ItemIndex[invItem.name] or 1, nil, nil, true, function(Hovered, Active, Selected, Index) + PersonalMenu.ItemIndex[invItem.name] = Index - if not Selected then return end - PersonalMenu.ItemSelected = invItem - end, inventoryActionsMenu) - end - end + if not Selected then return end + PersonalMenu.ItemSelected = invItem + end, inventoryActionsMenu) + end + end end getPersonalMenuCategory('loadout').drawer = function() - for i = 1, #PersonalMenu.WeaponData do - local weaponData = PersonalMenu.WeaponData[i] - - if HasPedGotWeapon(plyPed, weaponData.hash, false) then - local ammo = GetAmmoInPedWeapon(plyPed, weaponData.hash) - - RageUI.Button(('%s [%u]'):format(weaponData.label, ammo), nil, {RightLabel = "→→→"}, true, function(Hovered, Active, Selected) - if not Selected then return end - PersonalMenu.ItemSelected = weaponData - end, loadoutActionsMenu) - end - end + for i = 1, #PersonalMenu.WeaponData do + local weaponData = PersonalMenu.WeaponData[i] + + if HasPedGotWeapon(plyPed, weaponData.hash, false) then + local ammo = GetAmmoInPedWeapon(plyPed, weaponData.hash) + + RageUI.Button(('%s [%u]'):format(weaponData.label, ammo), nil, {RightLabel = "→→→"}, true, function(Hovered, Active, Selected) + if not Selected then return end + PersonalMenu.ItemSelected = weaponData + end, loadoutActionsMenu) + end + end end local accountInPockets = { - ['money'] = 'wallet_money_button', - ['black_money'] = 'wallet_blackmoney_button' + ['money'] = 'wallet_money_button', + ['black_money'] = 'wallet_blackmoney_button' } getPersonalMenuCategory('wallet').drawer = function() - local playerJob = GetPlayerJob() - RageUI.Button(i18nU('wallet_job_button', playerJob.name, playerJob.gradeName), nil, nil, true, nil) - - if Config.DoubleJob then - local playerJob2 = GetPlayerJob2() - RageUI.Button(i18nU('wallet_job2_button', playerJob2.name, playerJob2.gradeName), nil, nil, true, nil) - end - - local playerAccounts = GetPlayerAccounts() - for i = 1, #playerAccounts do - local account = playerAccounts[i] - - if accountInPockets[account.name] then - if PersonalMenu.WalletIndex[account.name] == nil then PersonalMenu.WalletIndex[account.name] = 1 end - - RageUI.List(i18nU(accountInPockets[account.name], GroupDigits(account.money)), PersonalMenu.WalletList, PersonalMenu.WalletIndex[account.name] or 1, nil, nil, true, function(Hovered, Active, Selected, Index) - if not Selected then return end - - if Index == 1 then - local post, quantity = CheckQuantity(KeyboardInput('PM_BOX_AMOUNT', i18nU('dialogbox_amount'), '', 8)) - - if post then - local closestPlayer, closestDistance = GetClosestPlayer() - if closestDistance == -1 or closestDistance > 3 then - GameNotification(i18nU('players_nearby')) - return - end - - local closestPed = GetPlayerPed(closestPlayer) - - if not IsPedSittingInAnyVehicle(closestPed) then - TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), 'item_account', account.name, quantity) - RageUI.CloseAll() - else - GameNotification(i18nU('in_vehicle_give', 'de l\'argent')) - end - else - GameNotification(i18nU('amount_invalid')) - end - elseif Index == 2 then - local post, quantity = CheckQuantity(KeyboardInput('PM_BOX_AMOUNT', i18nU('dialogbox_amount'), '', 8)) - - if post then - if not IsPedSittingInAnyVehicle(plyPed) then - TriggerServerEvent('esx:removeInventoryItem', 'item_account', account.name, quantity) - RageUI.CloseAll() - else - GameNotification(i18nU('in_vehicle_drop', 'de l\'argent')) - end - else - GameNotification(i18nU('amount_invalid')) - end - end - - PersonalMenu.WalletIndex[account.name] = Index - end) - elseif account.name == 'bank' then - RageUI.Button(i18nU('wallet_bankmoney_button', GroupDigits(account.money)), nil, nil, true, nil) - end - end - - if Config.JSFourIDCard then - RageUI.Button(i18nU('wallet_show_idcard_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end - - local closestPlayer, closestDistance = GetClosestPlayer() - - if closestDistance ~= -1 and closestDistance <= 3.0 then - TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer)) - else - GameNotification(i18nU('players_nearby')) - end - end) - - RageUI.Button(i18nU('wallet_check_idcard_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end - TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId())) - end) - - RageUI.Button(i18nU('wallet_show_driver_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end - - local closestPlayer, closestDistance = GetClosestPlayer() - - if closestDistance ~= -1 and closestDistance <= 3.0 then - TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer), 'driver') - else - GameNotification(i18nU('players_nearby')) - end - end) - - RageUI.Button(i18nU('wallet_check_driver_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end - TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'driver') - end) - - RageUI.Button(i18nU('wallet_show_firearms_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end - - local closestPlayer, closestDistance = GetClosestPlayer() - - if closestDistance ~= -1 and closestDistance <= 3.0 then - TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer), 'weapon') - else - GameNotification(i18nU('players_nearby')) - end - end) - - RageUI.Button(i18nU('wallet_check_firearms_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end - TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'weapon') - end) - end + local playerJob = GetPlayerJob() + RageUI.Button(i18nU('wallet_job_button', playerJob.name, playerJob.gradeName), nil, nil, true, nil) + + if Config.DoubleJob then + local playerJob2 = GetPlayerJob2() + RageUI.Button(i18nU('wallet_job2_button', playerJob2.name, playerJob2.gradeName), nil, nil, true, nil) + end + + local playerAccounts = GetPlayerAccounts() + for i = 1, #playerAccounts do + local account = playerAccounts[i] + + if accountInPockets[account.name] then + if PersonalMenu.WalletIndex[account.name] == nil then PersonalMenu.WalletIndex[account.name] = 1 end + + RageUI.List(i18nU(accountInPockets[account.name], GroupDigits(account.money)), PersonalMenu.WalletList, PersonalMenu.WalletIndex[account.name] or 1, nil, nil, true, function(Hovered, Active, Selected, Index) + if not Selected then return end + + if Index == 1 then + local post, quantity = CheckQuantity(KeyboardInput('PM_BOX_AMOUNT', i18nU('dialogbox_amount'), '', 8)) + + if post then + local closestPlayer, closestDistance = GetClosestPlayer() + if closestDistance == -1 or closestDistance > 3 then + GameNotification(i18nU('players_nearby')) + return + end + + local closestPed = GetPlayerPed(closestPlayer) + + if not IsPedSittingInAnyVehicle(closestPed) then + TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), 'item_account', account.name, quantity) + RageUI.CloseAll() + else + GameNotification(i18nU('in_vehicle_give', 'de l\'argent')) + end + else + GameNotification(i18nU('amount_invalid')) + end + elseif Index == 2 then + local post, quantity = CheckQuantity(KeyboardInput('PM_BOX_AMOUNT', i18nU('dialogbox_amount'), '', 8)) + + if post then + if not IsPedSittingInAnyVehicle(plyPed) then + TriggerServerEvent('esx:removeInventoryItem', 'item_account', account.name, quantity) + RageUI.CloseAll() + else + GameNotification(i18nU('in_vehicle_drop', 'de l\'argent')) + end + else + GameNotification(i18nU('amount_invalid')) + end + end + + PersonalMenu.WalletIndex[account.name] = Index + end) + elseif account.name == 'bank' then + RageUI.Button(i18nU('wallet_bankmoney_button', GroupDigits(account.money)), nil, nil, true, nil) + end + end + + if Config.JSFourIDCard then + RageUI.Button(i18nU('wallet_show_idcard_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end + + local closestPlayer, closestDistance = GetClosestPlayer() + + if closestDistance ~= -1 and closestDistance <= 3.0 then + TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer)) + else + GameNotification(i18nU('players_nearby')) + end + end) + + RageUI.Button(i18nU('wallet_check_idcard_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end + TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId())) + end) + + RageUI.Button(i18nU('wallet_show_driver_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end + + local closestPlayer, closestDistance = GetClosestPlayer() + + if closestDistance ~= -1 and closestDistance <= 3.0 then + TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer), 'driver') + else + GameNotification(i18nU('players_nearby')) + end + end) + + RageUI.Button(i18nU('wallet_check_driver_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end + TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'driver') + end) + + RageUI.Button(i18nU('wallet_show_firearms_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end + + local closestPlayer, closestDistance = GetClosestPlayer() + + if closestDistance ~= -1 and closestDistance <= 3.0 then + TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer), 'weapon') + else + GameNotification(i18nU('players_nearby')) + end + end) + + RageUI.Button(i18nU('wallet_check_firearms_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end + TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'weapon') + end) + end end getPersonalMenuCategory('billing').drawer = function() - for i = 1, #PersonalMenu.BillData do - local billData = PersonalMenu.BillData[i] + for i = 1, #PersonalMenu.BillData do + local billData = PersonalMenu.BillData[i] - RageUI.Button(billData.label, nil, { RightLabel = ('$%s'):format(GroupDigits(billData.amount)) }, true, function(Hovered, Active, Selected) - if not Selected then return end + RageUI.Button(billData.label, nil, { RightLabel = ('$%s'):format(GroupDigits(billData.amount)) }, true, function(Hovered, Active, Selected) + if not Selected then return end - TriggerServerCallback('esx_billing:payBill', function() - TriggerServerCallback('krz_personalmenu:Bill_getBills', function(bills) PersonalMenu.BillData = bills end) - end, billData.id) - end) - end + TriggerServerCallback('esx_billing:payBill', function() + TriggerServerCallback('krz_personalmenu:Bill_getBills', function(bills) PersonalMenu.BillData = bills end) + end, billData.id) + end) + end end getPersonalMenuCategory('clothes').drawer = function() - for i = 1, #PersonalMenu.ClothesButtons do - local clotheId = PersonalMenu.ClothesButtons[i] - - RageUI.Button(i18nU(('clothes_%s'):format(clotheId)), nil, {RightBadge = RageUI.BadgeStyle.Clothes}, true, function(Hovered, Active, Selected) - if not Selected then return end - setClothes(clotheId) - end) - end + for i = 1, #PersonalMenu.ClothesButtons do + local clotheId = PersonalMenu.ClothesButtons[i] + + RageUI.Button(i18nU(('clothes_%s'):format(clotheId)), nil, {RightBadge = RageUI.BadgeStyle.Clothes}, true, function(Hovered, Active, Selected) + if not Selected then return end + setClothes(clotheId) + end) + end end getPersonalMenuCategory('accessories').drawer = function() - for i = 1, #PersonalMenu.AccessoriesButtons do - local accessoryId = PersonalMenu.AccessoriesButtons[i] - - RageUI.Button(i18nU(('accessories_%s'):format(accessoryId)), nil, {RightBadge = RageUI.BadgeStyle.Clothes}, true, function(Hovered, Active, Selected) - if not Selected then return end - setAccessory(accessoryId) - end) - end + for i = 1, #PersonalMenu.AccessoriesButtons do + local accessoryId = PersonalMenu.AccessoriesButtons[i] + + RageUI.Button(i18nU(('accessories_%s'):format(accessoryId)), nil, {RightBadge = RageUI.BadgeStyle.Clothes}, true, function(Hovered, Active, Selected) + if not Selected then return end + setAccessory(accessoryId) + end) + end end getPersonalMenuCategory('animation').drawer = function() - for i = 1, #Config.Animations do - local animationCfg = Config.Animations[i] - RageUI.Button(animationCfg.name, nil, {RightLabel = "→→→"}, true, nil, animationCfg.menu) - end + for i = 1, #Config.Animations do + local animationCfg = Config.Animations[i] + RageUI.Button(animationCfg.name, nil, {RightLabel = "→→→"}, true, nil, animationCfg.menu) + end end function DrawAnimationsCategory(animationCfg) - ruiDrawContent(drawContentOptions, function() - for i = 1, #animationCfg.items do - local animItemCfg = animationCfg.items[i] - - RageUI.Button(animItemCfg.name, nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end - - if animItemCfg.type == 'anim' then - startAnim(animItemCfg.animDict, animItemCfg.animName) - elseif animItemCfg.type == 'scenario' then - TaskStartScenarioInPlace(plyPed, animItemCfg.scenarioName, 0, false) - elseif animItemCfg.type == 'attitude' then - startAttitude(animItemCfg.animSet) - end - end) - end - end) + ruiDrawContent(drawContentOptions, function() + for i = 1, #animationCfg.items do + local animItemCfg = animationCfg.items[i] + + RageUI.Button(animItemCfg.name, nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end + + if animItemCfg.type == 'anim' then + startAnim(animItemCfg.animDict, animItemCfg.animName) + elseif animItemCfg.type == 'scenario' then + TaskStartScenarioInPlace(plyPed, animItemCfg.scenarioName, 0, false) + elseif animItemCfg.type == 'attitude' then + startAttitude(animItemCfg.animSet) + end + end) + end + end) end getPersonalMenuCategory('vehicle').drawer = function() - RageUI.Button(i18nU('vehicle_engine_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end - - if not IsPedSittingInAnyVehicle(plyPed) then - GameNotification(i18nU('no_vehicle')) - return - end - - local plyVeh = GetVehiclePedIsIn(plyPed, false) - - if GetIsVehicleEngineRunning(plyVeh) then - SetVehicleEngineOn(plyVeh, false, false, true) - SetVehicleUndriveable(plyVeh, true) - elseif not GetIsVehicleEngineRunning(plyVeh) then - SetVehicleEngineOn(plyVeh, true, false, true) - SetVehicleUndriveable(plyVeh, false) - end - end) - - RageUI.List(i18nU('vehicle_door_button'), PersonalMenu.DoorList, PersonalMenu.DoorIndex, nil, nil, true, function(Hovered, Active, Selected, Index) - PersonalMenu.DoorIndex = Index - - if not Selected then return end - - if not IsPedSittingInAnyVehicle(plyPed) then - GameNotification(i18nU('no_vehicle')) - return - end - - local plyVeh = GetVehiclePedIsIn(plyPed, false) - - if Index == 1 then - if not PersonalMenu.DoorState.FrontLeft then - PersonalMenu.DoorState.FrontLeft = true - SetVehicleDoorOpen(plyVeh, 0, false, false) - elseif PersonalMenu.DoorState.FrontLeft then - PersonalMenu.DoorState.FrontLeft = false - SetVehicleDoorShut(plyVeh, 0, false, false) - end - elseif Index == 2 then - if not PersonalMenu.DoorState.FrontRight then - PersonalMenu.DoorState.FrontRight = true - SetVehicleDoorOpen(plyVeh, 1, false, false) - elseif PersonalMenu.DoorState.FrontRight then - PersonalMenu.DoorState.FrontRight = false - SetVehicleDoorShut(plyVeh, 1, false, false) - end - elseif Index == 3 then - if not PersonalMenu.DoorState.BackLeft then - PersonalMenu.DoorState.BackLeft = true - SetVehicleDoorOpen(plyVeh, 2, false, false) - elseif PersonalMenu.DoorState.BackLeft then - PersonalMenu.DoorState.BackLeft = false - SetVehicleDoorShut(plyVeh, 2, false, false) - end - elseif Index == 4 then - if not PersonalMenu.DoorState.BackRight then - PersonalMenu.DoorState.BackRight = true - SetVehicleDoorOpen(plyVeh, 3, false, false) - elseif PersonalMenu.DoorState.BackRight then - PersonalMenu.DoorState.BackRight = false - SetVehicleDoorShut(plyVeh, 3, false, false) - end - end - end) - - RageUI.Button(i18nU('vehicle_hood_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end - - if not IsPedSittingInAnyVehicle(plyPed) then - GameNotification(i18nU('no_vehicle')) - return - end - - local plyVeh = GetVehiclePedIsIn(plyPed, false) - - if not PersonalMenu.DoorState.Hood then - PersonalMenu.DoorState.Hood = true - SetVehicleDoorOpen(plyVeh, 4, false, false) - elseif PersonalMenu.DoorState.Hood then - PersonalMenu.DoorState.Hood = false - SetVehicleDoorShut(plyVeh, 4, false, false) - end - end) - - RageUI.Button(i18nU('vehicle_trunk_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end - - if not IsPedSittingInAnyVehicle(plyPed) then - GameNotification(i18nU('no_vehicle')) - return - end - - local plyVeh = GetVehiclePedIsIn(plyPed, false) - - if not PersonalMenu.DoorState.Trunk then - PersonalMenu.DoorState.Trunk = true - SetVehicleDoorOpen(plyVeh, 5, false, false) - elseif PersonalMenu.DoorState.Trunk then - PersonalMenu.DoorState.Trunk = false - SetVehicleDoorShut(plyVeh, 5, false, false) - end - end) + RageUI.Button(i18nU('vehicle_engine_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end + + if not IsPedSittingInAnyVehicle(plyPed) then + GameNotification(i18nU('no_vehicle')) + return + end + + local plyVeh = GetVehiclePedIsIn(plyPed, false) + + if GetIsVehicleEngineRunning(plyVeh) then + SetVehicleEngineOn(plyVeh, false, false, true) + SetVehicleUndriveable(plyVeh, true) + elseif not GetIsVehicleEngineRunning(plyVeh) then + SetVehicleEngineOn(plyVeh, true, false, true) + SetVehicleUndriveable(plyVeh, false) + end + end) + + RageUI.List(i18nU('vehicle_door_button'), PersonalMenu.DoorList, PersonalMenu.DoorIndex, nil, nil, true, function(Hovered, Active, Selected, Index) + PersonalMenu.DoorIndex = Index + + if not Selected then return end + + if not IsPedSittingInAnyVehicle(plyPed) then + GameNotification(i18nU('no_vehicle')) + return + end + + local plyVeh = GetVehiclePedIsIn(plyPed, false) + + if Index == 1 then + if not PersonalMenu.DoorState.FrontLeft then + PersonalMenu.DoorState.FrontLeft = true + SetVehicleDoorOpen(plyVeh, 0, false, false) + elseif PersonalMenu.DoorState.FrontLeft then + PersonalMenu.DoorState.FrontLeft = false + SetVehicleDoorShut(plyVeh, 0, false, false) + end + elseif Index == 2 then + if not PersonalMenu.DoorState.FrontRight then + PersonalMenu.DoorState.FrontRight = true + SetVehicleDoorOpen(plyVeh, 1, false, false) + elseif PersonalMenu.DoorState.FrontRight then + PersonalMenu.DoorState.FrontRight = false + SetVehicleDoorShut(plyVeh, 1, false, false) + end + elseif Index == 3 then + if not PersonalMenu.DoorState.BackLeft then + PersonalMenu.DoorState.BackLeft = true + SetVehicleDoorOpen(plyVeh, 2, false, false) + elseif PersonalMenu.DoorState.BackLeft then + PersonalMenu.DoorState.BackLeft = false + SetVehicleDoorShut(plyVeh, 2, false, false) + end + elseif Index == 4 then + if not PersonalMenu.DoorState.BackRight then + PersonalMenu.DoorState.BackRight = true + SetVehicleDoorOpen(plyVeh, 3, false, false) + elseif PersonalMenu.DoorState.BackRight then + PersonalMenu.DoorState.BackRight = false + SetVehicleDoorShut(plyVeh, 3, false, false) + end + end + end) + + RageUI.Button(i18nU('vehicle_hood_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end + + if not IsPedSittingInAnyVehicle(plyPed) then + GameNotification(i18nU('no_vehicle')) + return + end + + local plyVeh = GetVehiclePedIsIn(plyPed, false) + + if not PersonalMenu.DoorState.Hood then + PersonalMenu.DoorState.Hood = true + SetVehicleDoorOpen(plyVeh, 4, false, false) + elseif PersonalMenu.DoorState.Hood then + PersonalMenu.DoorState.Hood = false + SetVehicleDoorShut(plyVeh, 4, false, false) + end + end) + + RageUI.Button(i18nU('vehicle_trunk_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end + + if not IsPedSittingInAnyVehicle(plyPed) then + GameNotification(i18nU('no_vehicle')) + return + end + + local plyVeh = GetVehiclePedIsIn(plyPed, false) + + if not PersonalMenu.DoorState.Trunk then + PersonalMenu.DoorState.Trunk = true + SetVehicleDoorOpen(plyVeh, 5, false, false) + elseif PersonalMenu.DoorState.Trunk then + PersonalMenu.DoorState.Trunk = false + SetVehicleDoorShut(plyVeh, 5, false, false) + end + end) end getPersonalMenuCategory('boss').drawer = function() - if societyMoney then - RageUI.Button(i18nU('bossmanagement_chest_button'), nil, { RightLabel = ('$%s'):format(GroupDigits(societyMoney)) }, true, nil) - end + if societyMoney then + RageUI.Button(i18nU('bossmanagement_chest_button'), nil, { RightLabel = ('$%s'):format(GroupDigits(societyMoney)) }, true, nil) + end - RageUI.Button(i18nU('bossmanagement_hire_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end + RageUI.Button(i18nU('bossmanagement_hire_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end - local playerJob = GetPlayerJob() + local playerJob = GetPlayerJob() - if not playerJob.isBoss then - GameNotification(i18nU('missing_rights')) - return - end + if not playerJob.isBoss then + GameNotification(i18nU('missing_rights')) + return + end - local closestPlayer, closestDistance = GetClosestPlayer() - if closestPlayer == -1 or closestDistance > 3.0 then - GameNotification(i18nU('players_nearby')) - return - end + local closestPlayer, closestDistance = GetClosestPlayer() + if closestPlayer == -1 or closestDistance > 3.0 then + GameNotification(i18nU('players_nearby')) + return + end - TriggerServerEvent('krz_personalmenu:Boss_recruterplayer', GetPlayerServerId(closestPlayer)) - end) + TriggerServerEvent('krz_personalmenu:Boss_recruterplayer', GetPlayerServerId(closestPlayer)) + end) - RageUI.Button(i18nU('bossmanagement_fire_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end + RageUI.Button(i18nU('bossmanagement_fire_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end - local playerJob = GetPlayerJob() + local playerJob = GetPlayerJob() - if not playerJob.isBoss then - GameNotification(i18nU('missing_rights')) - return - end + if not playerJob.isBoss then + GameNotification(i18nU('missing_rights')) + return + end - local closestPlayer, closestDistance = GetClosestPlayer() - if closestPlayer == -1 or closestDistance > 3.0 then - GameNotification(i18nU('players_nearby')) - return - end + local closestPlayer, closestDistance = GetClosestPlayer() + if closestPlayer == -1 or closestDistance > 3.0 then + GameNotification(i18nU('players_nearby')) + return + end - TriggerServerEvent('krz_personalmenu:Boss_virerplayer', GetPlayerServerId(closestPlayer)) - end) + TriggerServerEvent('krz_personalmenu:Boss_virerplayer', GetPlayerServerId(closestPlayer)) + end) - RageUI.Button(i18nU('bossmanagement_promote_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end + RageUI.Button(i18nU('bossmanagement_promote_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end - local playerJob = GetPlayerJob() + local playerJob = GetPlayerJob() - if not playerJob.isBoss then - GameNotification(i18nU('missing_rights')) - return - end + if not playerJob.isBoss then + GameNotification(i18nU('missing_rights')) + return + end - local closestPlayer, closestDistance = GetClosestPlayer() - if closestPlayer == -1 or closestDistance > 3.0 then - GameNotification(i18nU('players_nearby')) - return - end + local closestPlayer, closestDistance = GetClosestPlayer() + if closestPlayer == -1 or closestDistance > 3.0 then + GameNotification(i18nU('players_nearby')) + return + end - TriggerServerEvent('krz_personalmenu:Boss_promouvoirplayer', GetPlayerServerId(closestPlayer)) - end) + TriggerServerEvent('krz_personalmenu:Boss_promouvoirplayer', GetPlayerServerId(closestPlayer)) + end) - RageUI.Button(i18nU('bossmanagement_demote_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end + RageUI.Button(i18nU('bossmanagement_demote_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end - local playerJob = GetPlayerJob() + local playerJob = GetPlayerJob() - if not playerJob.isBoss then - GameNotification(i18nU('missing_rights')) - return - end + if not playerJob.isBoss then + GameNotification(i18nU('missing_rights')) + return + end - local closestPlayer, closestDistance = GetClosestPlayer() - if closestPlayer == -1 or closestDistance > 3.0 then - GameNotification(i18nU('players_nearby')) - return - end + local closestPlayer, closestDistance = GetClosestPlayer() + if closestPlayer == -1 or closestDistance > 3.0 then + GameNotification(i18nU('players_nearby')) + return + end - TriggerServerEvent('krz_personalmenu:Boss_destituerplayer', GetPlayerServerId(closestPlayer)) - end) + TriggerServerEvent('krz_personalmenu:Boss_destituerplayer', GetPlayerServerId(closestPlayer)) + end) end if Config.DoubleJob then - getPersonalMenuCategory('boss2').drawer = function() - if societyMoney ~= nil then - RageUI.Button(i18nU('bossmanagement2_chest_button'), nil, { RightLabel = ('$%s'):format(GroupDigits(societyMoney2)) }, true, nil) - end + getPersonalMenuCategory('boss2').drawer = function() + if societyMoney ~= nil then + RageUI.Button(i18nU('bossmanagement2_chest_button'), nil, { RightLabel = ('$%s'):format(GroupDigits(societyMoney2)) }, true, nil) + end - RageUI.Button(i18nU('bossmanagement2_hire_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end + RageUI.Button(i18nU('bossmanagement2_hire_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end - local playerJob = GetPlayerJob2() + local playerJob = GetPlayerJob2() - if not playerJob.isBoss then - GameNotification(i18nU('missing_rights')) - return - end + if not playerJob.isBoss then + GameNotification(i18nU('missing_rights')) + return + end - local closestPlayer, closestDistance = GetClosestPlayer() - if closestPlayer == -1 or closestDistance > 3.0 then - GameNotification(i18nU('players_nearby')) - return - end + local closestPlayer, closestDistance = GetClosestPlayer() + if closestPlayer == -1 or closestDistance > 3.0 then + GameNotification(i18nU('players_nearby')) + return + end - TriggerServerEvent('krz_personalmenu:Boss_recruterplayer2', GetPlayerServerId(closestPlayer)) - end) + TriggerServerEvent('krz_personalmenu:Boss_recruterplayer2', GetPlayerServerId(closestPlayer)) + end) - RageUI.Button(i18nU('bossmanagement2_fire_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end + RageUI.Button(i18nU('bossmanagement2_fire_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end - local playerJob = GetPlayerJob2() + local playerJob = GetPlayerJob2() - if not playerJob.isBoss then - GameNotification(i18nU('missing_rights')) - return - end + if not playerJob.isBoss then + GameNotification(i18nU('missing_rights')) + return + end - local closestPlayer, closestDistance = GetClosestPlayer() - if closestPlayer == -1 or closestDistance > 3.0 then - GameNotification(i18nU('players_nearby')) - return - end + local closestPlayer, closestDistance = GetClosestPlayer() + if closestPlayer == -1 or closestDistance > 3.0 then + GameNotification(i18nU('players_nearby')) + return + end - TriggerServerEvent('krz_personalmenu:Boss_virerplayer2', GetPlayerServerId(closestPlayer)) - end) + TriggerServerEvent('krz_personalmenu:Boss_virerplayer2', GetPlayerServerId(closestPlayer)) + end) - RageUI.Button(i18nU('bossmanagement2_promote_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end + RageUI.Button(i18nU('bossmanagement2_promote_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end - local playerJob = GetPlayerJob2() + local playerJob = GetPlayerJob2() - if not playerJob.isBoss then - GameNotification(i18nU('missing_rights')) - return - end + if not playerJob.isBoss then + GameNotification(i18nU('missing_rights')) + return + end - local closestPlayer, closestDistance = GetClosestPlayer() - if closestPlayer == -1 or closestDistance > 3.0 then - GameNotification(i18nU('players_nearby')) - return - end + local closestPlayer, closestDistance = GetClosestPlayer() + if closestPlayer == -1 or closestDistance > 3.0 then + GameNotification(i18nU('players_nearby')) + return + end - TriggerServerEvent('krz_personalmenu:Boss_promouvoirplayer2', GetPlayerServerId(closestPlayer)) - end) + TriggerServerEvent('krz_personalmenu:Boss_promouvoirplayer2', GetPlayerServerId(closestPlayer)) + end) - RageUI.Button(i18nU('bossmanagement2_demote_button'), nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end + RageUI.Button(i18nU('bossmanagement2_demote_button'), nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end - local playerJob = GetPlayerJob2() + local playerJob = GetPlayerJob2() - if not playerJob.isBoss then - GameNotification(i18nU('missing_rights')) - return - end + if not playerJob.isBoss then + GameNotification(i18nU('missing_rights')) + return + end - local closestPlayer, closestDistance = GetClosestPlayer() - if closestPlayer == -1 or closestDistance > 3.0 then - GameNotification(i18nU('players_nearby')) - return - end + local closestPlayer, closestDistance = GetClosestPlayer() + if closestPlayer == -1 or closestDistance > 3.0 then + GameNotification(i18nU('players_nearby')) + return + end - TriggerServerEvent('krz_personalmenu:Boss_destituerplayer2', GetPlayerServerId(closestPlayer)) - end) - end + TriggerServerEvent('krz_personalmenu:Boss_destituerplayer2', GetPlayerServerId(closestPlayer)) + end) + end end getPersonalMenuCategory('admin').drawer = function() - for i = 1, #Config.AdminCommands do - local adminCommandCfg = Config.AdminCommands[i] - - if adminCommandCfg.groupsById[PlayerVars.group] then - RageUI.Button(adminCommandCfg.name, nil, nil, true, function(Hovered, Active, Selected) - if not Selected then return end - adminCommandCfg.command() - end) - else - RageUI.Button(adminCommandCfg.name, nil, {RightBadge = RageUI.BadgeStyle.Lock}, false, nil) - end - end + for i = 1, #Config.AdminCommands do + local adminCommandCfg = Config.AdminCommands[i] + + if adminCommandCfg.groupsById[PlayerVars.group] then + RageUI.Button(adminCommandCfg.name, nil, nil, true, function(Hovered, Active, Selected) + if not Selected then return end + adminCommandCfg.command() + end) + else + RageUI.Button(adminCommandCfg.name, nil, {RightBadge = RageUI.BadgeStyle.Lock}, false, nil) + end + end end RegisterCommand('+openpersonal', function() - if PlayerVars.isDead then return end - if RageUI.Visible(mainMenu) then return end + if PlayerVars.isDead then return end + if RageUI.Visible(mainMenu) then return end - TriggerServerCallback('krz_personalmenu:Admin_getUsergroup', function(plyGroup) - PlayerVars.group = plyGroup - end) + TriggerServerCallback('krz_personalmenu:Admin_getUsergroup', function(plyGroup) + PlayerVars.group = plyGroup + end) - TriggerServerCallback('krz_personalmenu:Bill_getBills', function(bills) - PersonalMenu.BillData = bills - end) + TriggerServerCallback('krz_personalmenu:Bill_getBills', function(bills) + PersonalMenu.BillData = bills + end) - TriggerEvent('krz_personalmenu:menuOpening') - RageUI.Visible(mainMenu, true) - DrawPersonalMenu() + TriggerEvent('krz_personalmenu:menuOpening') + RageUI.Visible(mainMenu, true) + DrawPersonalMenu() end, false) RegisterCommand('-openpersonal', function() end, false) @@ -1076,61 +1076,61 @@ TriggerEvent('chat:removeSuggestion', '/+openpersonal') TriggerEvent('chat:removeSuggestion', '/-openpersonal') CreateThread(function() - local ruiVisible = RageUI.Visible - - while true do - if ruiVisible(mainMenu) then - DrawPersonalMenu() - goto continue - end - - if ruiVisible(inventoryActionsMenu) then - DrawActionsMenu('inventory') - goto continue - end - - if ruiVisible(loadoutActionsMenu) then - DrawActionsMenu('loadout') - goto continue - end - - for i = 1, #personalMenuCategories do - local pmCategory = personalMenuCategories[i] - - if ruiVisible(pmCategory.menu) then - if not pmCategory.restriction or pmCategory.restriction() then - ruiDrawContent(drawContentOptions, pmCategory.drawer) - else - RageUI.GoBack() - end - - goto continue - end - end - - for i = 1, #Config.Animations do - local animationCfg = Config.Animations[i] - - if ruiVisible(animationCfg.menu) then - DrawAnimationsCategory(animationCfg) - goto continue - end - end - - ::continue:: - Wait(0) - end + local ruiVisible = RageUI.Visible + + while true do + if ruiVisible(mainMenu) then + DrawPersonalMenu() + goto continue + end + + if ruiVisible(inventoryActionsMenu) then + DrawActionsMenu('inventory') + goto continue + end + + if ruiVisible(loadoutActionsMenu) then + DrawActionsMenu('loadout') + goto continue + end + + for i = 1, #personalMenuCategories do + local pmCategory = personalMenuCategories[i] + + if ruiVisible(pmCategory.menu) then + if not pmCategory.restriction or pmCategory.restriction() then + ruiDrawContent(drawContentOptions, pmCategory.drawer) + else + RageUI.GoBack() + end + + goto continue + end + end + + for i = 1, #Config.Animations do + local animationCfg = Config.Animations[i] + + if ruiVisible(animationCfg.menu) then + DrawAnimationsCategory(animationCfg) + goto continue + end + end + + ::continue:: + Wait(0) + end end) RegisterCommand('+stoptask', function() - local playerPed = PlayerPedId() - - if (not IsPedArmed(playerPed, tonumber('111', 2)) or IsPedInAnyVehicle(playerPed)) and not PlayerVars.isDead then - if GetScriptTaskStatus(playerPed, `SCRIPT_TASK_START_SCENARIO_IN_PLACE`) == 1 or GetScriptTaskStatus(playerPed, `SCRIPT_TASK_PLAY_ANIM`) == 1 then - ResetOtherAnimsVals() - ClearPedTasks(plyPed) - end - end + local playerPed = PlayerPedId() + + if (not IsPedArmed(playerPed, tonumber('111', 2)) or IsPedInAnyVehicle(playerPed)) and not PlayerVars.isDead then + if GetScriptTaskStatus(playerPed, `SCRIPT_TASK_START_SCENARIO_IN_PLACE`) == 1 or GetScriptTaskStatus(playerPed, `SCRIPT_TASK_PLAY_ANIM`) == 1 then + ResetOtherAnimsVals() + ClearPedTasks(plyPed) + end + end end, false) RegisterCommand('-stoptask', function() end, false) @@ -1140,56 +1140,56 @@ TriggerEvent('chat:removeSuggestion', '/+stoptask') TriggerEvent('chat:removeSuggestion', '/-stoptask') function tpMarker() - local waypointHandle = GetFirstBlipInfoId(8) - - if not DoesBlipExist(waypointHandle) then - GameNotification(i18nU('admin_nomarker')) - return - end - - CreateThread(function() - local waypointCoords = GetBlipInfoIdCoord(waypointHandle) - local foundGround, zCoords, zPos = false, -500.0, 0.0 - - while not foundGround do - zCoords = zCoords + 10.0 - RequestCollisionAtCoord(waypointCoords.x, waypointCoords.y, zCoords) - Wait(0) - foundGround, zPos = GetGroundZFor_3dCoord(waypointCoords.x, waypointCoords.y, zCoords, false) - - if not foundGround and zCoords >= 2000.0 then - foundGround = true - end - end - - SetPedCoordsKeepVehicle(plyPed, waypointCoords.x, waypointCoords.y, zPos) - GameNotification(i18nU('admin_tpmarker')) - end) + local waypointHandle = GetFirstBlipInfoId(8) + + if not DoesBlipExist(waypointHandle) then + GameNotification(i18nU('admin_nomarker')) + return + end + + CreateThread(function() + local waypointCoords = GetBlipInfoIdCoord(waypointHandle) + local foundGround, zCoords, zPos = false, -500.0, 0.0 + + while not foundGround do + zCoords = zCoords + 10.0 + RequestCollisionAtCoord(waypointCoords.x, waypointCoords.y, zCoords) + Wait(0) + foundGround, zPos = GetGroundZFor_3dCoord(waypointCoords.x, waypointCoords.y, zCoords, false) + + if not foundGround and zCoords >= 2000.0 then + foundGround = true + end + end + + SetPedCoordsKeepVehicle(plyPed, waypointCoords.x, waypointCoords.y, zPos) + GameNotification(i18nU('admin_tpmarker')) + end) end CreateThread(function() - while true do - plyPed = PlayerPedId() - - if (IsControlPressed(0, Config.Controls.TPMarker.keyboard1) or IsDisabledControlPressed(0, Config.Controls.TPMarker.keyboard1)) and - (IsControlJustReleased(0, Config.Controls.TPMarker.keyboard2) or IsDisabledControlJustReleased(0, Config.Controls.TPMarker.keyboard2)) and - IsUsingKeyboard(2) and - not PlayerVars.isDead - then - TriggerServerCallback('krz_personalmenu:Admin_getUsergroup', function(plyGroup) - if not adminGroups[plyGroup] then - return - end - - tpMarker() - end) - end - - if PlayerVars.showCoords then - local plyCoords = GetEntityCoords(plyPed, false) - Text('~r~X~s~: ' .. MathRound(plyCoords.x, 2) .. '\n~b~Y~s~: ' .. MathRound(plyCoords.y, 2) .. '\n~g~Z~s~: ' .. MathRound(plyCoords.z, 2) .. '\n~y~Angle~s~: ' .. MathRound(GetEntityPhysicsHeading(plyPed), 2)) - end - - Wait(0) - end + while true do + plyPed = PlayerPedId() + + if (IsControlPressed(0, Config.Controls.TPMarker.keyboard1) or IsDisabledControlPressed(0, Config.Controls.TPMarker.keyboard1)) and + (IsControlJustReleased(0, Config.Controls.TPMarker.keyboard2) or IsDisabledControlJustReleased(0, Config.Controls.TPMarker.keyboard2)) and + IsUsingKeyboard(2) and + not PlayerVars.isDead + then + TriggerServerCallback('krz_personalmenu:Admin_getUsergroup', function(plyGroup) + if not adminGroups[plyGroup] then + return + end + + tpMarker() + end) + end + + if PlayerVars.showCoords then + local plyCoords = GetEntityCoords(plyPed, false) + Text('~r~X~s~: ' .. MathRound(plyCoords.x, 2) .. '\n~b~Y~s~: ' .. MathRound(plyCoords.y, 2) .. '\n~g~Z~s~: ' .. MathRound(plyCoords.z, 2) .. '\n~y~Angle~s~: ' .. MathRound(GetEntityPhysicsHeading(plyPed), 2)) + end + + Wait(0) + end end) \ No newline at end of file diff --git a/client/other.lua b/client/other.lua index 9c164da..5590a24 100644 --- a/client/other.lua +++ b/client/other.lua @@ -1,46 +1,46 @@ local function startPointing(ped) - LoadAnimDict('anim@mp_point') - SetPedConfigFlag(ped, 36, true) - TaskMoveNetworkByName(ped, 'task_mp_pointing', 0.5, false, 'anim@mp_point', 24) - RemoveAnimDict('anim@mp_point') + LoadAnimDict('anim@mp_point') + SetPedConfigFlag(ped, 36, true) + TaskMoveNetworkByName(ped, 'task_mp_pointing', 0.5, false, 'anim@mp_point', 24) + RemoveAnimDict('anim@mp_point') end local function stopPointing(ped) - RequestTaskMoveNetworkStateTransition(ped, 'Stop') - SetPedConfigFlag(ped, 36, false) - ClearPedSecondaryTask(ped) + RequestTaskMoveNetworkStateTransition(ped, 'Stop') + SetPedConfigFlag(ped, 36, false) + ClearPedSecondaryTask(ped) end function ResetOtherAnimsVals() - PlayerVars.pointing = false + PlayerVars.pointing = false - if PlayerVars.handsUp then - PlayerVars.handsUp = false - end + if PlayerVars.handsUp then + PlayerVars.handsUp = false + end end if Config.Framework == 'esx' then - AddEventHandler('esx:onPlayerDeath', ResetOtherAnimsVals) + AddEventHandler('esx:onPlayerDeath', ResetOtherAnimsVals) end RegisterCommand('+handsup', function() - local playerPed = PlayerPedId() - - if not PlayerVars.isDead and IsPedOnFoot(playerPed) then - if PlayerVars.pointing then - PlayerVars.pointing = false - end - - PlayerVars.handsUp = not PlayerVars.handsUp - - if PlayerVars.handsUp then - LoadAnimDict('random@mugging3') - TaskPlayAnim(playerPed, 'random@mugging3', 'handsup_standing_base', 8.0, -8.0, -1, 49, 0.0, false, false, false) - RemoveAnimDict('random@mugging3') - else - StopAnimTask(playerPed, 'random@mugging3', 'handsup_standing_base', -4.0) - end - end + local playerPed = PlayerPedId() + + if not PlayerVars.isDead and IsPedOnFoot(playerPed) then + if PlayerVars.pointing then + PlayerVars.pointing = false + end + + PlayerVars.handsUp = not PlayerVars.handsUp + + if PlayerVars.handsUp then + LoadAnimDict('random@mugging3') + TaskPlayAnim(playerPed, 'random@mugging3', 'handsup_standing_base', 8.0, -8.0, -1, 49, 0.0, false, false, false) + RemoveAnimDict('random@mugging3') + else + StopAnimTask(playerPed, 'random@mugging3', 'handsup_standing_base', -4.0) + end + end end, false) RegisterCommand('-handsup', function() end, false) @@ -50,21 +50,21 @@ TriggerEvent('chat:removeSuggestion', '/+handsup') TriggerEvent('chat:removeSuggestion', '/-handsup') RegisterCommand('+fingerpoint', function() - local playerPed = PlayerPedId() + local playerPed = PlayerPedId() - if not PlayerVars.isDead and IsPedOnFoot(playerPed) then - if PlayerVars.handsUp then - PlayerVars.handsUp = false - end + if not PlayerVars.isDead and IsPedOnFoot(playerPed) then + if PlayerVars.handsUp then + PlayerVars.handsUp = false + end - PlayerVars.pointing = not PlayerVars.pointing + PlayerVars.pointing = not PlayerVars.pointing - if PlayerVars.pointing then - startPointing(playerPed) - else - stopPointing(playerPed) - end - end + if PlayerVars.pointing then + startPointing(playerPed) + else + stopPointing(playerPed) + end + end end, false) RegisterCommand('-fingerpoint', function() end, false) @@ -74,64 +74,64 @@ TriggerEvent('chat:removeSuggestion', '/+fingerpoint') TriggerEvent('chat:removeSuggestion', '/-fingerpoint') CreateThread(function() - while true do - Wait(0) - local playerPed = PlayerPedId() - - DisableControlAction(0, Config.Controls.Crouch.keyboard, true) - - if IsDisabledControlJustReleased(0, Config.Controls.Crouch.keyboard) and IsUsingKeyboard(2) then - if DoesEntityExist(playerPed) and not IsEntityDead(playerPed) and IsPedOnFoot(playerPed) then - PlayerVars.crouched = not PlayerVars.crouched - - if PlayerVars.crouched then - LoadAnimSet('move_ped_crouched') - SetPedMovementClipset(playerPed, 'move_ped_crouched', 0.5) - RemoveAnimSet('move_ped_crouched') - else - ResetPedMovementClipset(playerPed, 0.5) - end - end - end - - if PlayerVars.crouched or PlayerVars.handsUp or PlayerVars.pointing then - if not IsPedOnFoot(playerPed) then - ResetPedMovementClipset(playerPed, 0.5) - stopPointing() - - PlayerVars.crouched = false - PlayerVars.pointing = false - - if PlayerVars.handsUp then - PlayerVars.handsUp = false - end - else - if PlayerVars.pointing then - local camPitch = GetGameplayCamRelativePitch() - camPitch = (camPitch < -70.0 and -70.0) or (camPitch > 42.0 and 42.0) or camPitch - camPitch = (camPitch + 70.0) / 112.0 - - local camHeading = GetGameplayCamRelativeHeading() - local cosCamHeading, sinCamHeading = math.cos(camHeading * (math.pi / 180.0)), math.sin(camHeading * (math.pi / 180.0)) - - camHeading = (camHeading < -180.0 and -180.0) or (camHeading > 180.0 and 180.0) or camHeading - camHeading = (camHeading + 180.0) / 360.0 - - local coords = GetOffsetFromEntityInWorldCoords(playerPed, vec3((cosCamHeading * -0.2) - (sinCamHeading * (0.4 * camHeading + 0.3)), (sinCamHeading * -0.2) + (cosCamHeading * (0.4 * camHeading + 0.3)), 0.6)) - local shapeTestHandle = StartShapeTestCapsule(coords - vec3(0.0, 0.0, 0.2), coords + vec3(0.0, 0.0, 0.2), 0.4, 95, playerPed, 7) - - local shapeTestStatus, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(shapeTestHandle) - while shapeTestStatus == 1 do - Wait(0) - shapeTestStatus, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(shapeTestHandle) - end - - SetTaskMoveNetworkSignalFloat(playerPed, 'Pitch', camPitch) - SetTaskMoveNetworkSignalFloat(playerPed, 'Heading', (camHeading * -1.0) + 1.0) - SetTaskMoveNetworkSignalBool(playerPed, 'isBlocked', shapeTestStatus == 2 and hit == 1) - SetTaskMoveNetworkSignalBool(playerPed, 'isFirstPerson', GetCamViewModeForContext(GetCamActiveViewModeContext()) == 4) - end - end - end - end + while true do + Wait(0) + local playerPed = PlayerPedId() + + DisableControlAction(0, Config.Controls.Crouch.keyboard, true) + + if IsDisabledControlJustReleased(0, Config.Controls.Crouch.keyboard) and IsUsingKeyboard(2) then + if DoesEntityExist(playerPed) and not IsEntityDead(playerPed) and IsPedOnFoot(playerPed) then + PlayerVars.crouched = not PlayerVars.crouched + + if PlayerVars.crouched then + LoadAnimSet('move_ped_crouched') + SetPedMovementClipset(playerPed, 'move_ped_crouched', 0.5) + RemoveAnimSet('move_ped_crouched') + else + ResetPedMovementClipset(playerPed, 0.5) + end + end + end + + if PlayerVars.crouched or PlayerVars.handsUp or PlayerVars.pointing then + if not IsPedOnFoot(playerPed) then + ResetPedMovementClipset(playerPed, 0.5) + stopPointing() + + PlayerVars.crouched = false + PlayerVars.pointing = false + + if PlayerVars.handsUp then + PlayerVars.handsUp = false + end + else + if PlayerVars.pointing then + local camPitch = GetGameplayCamRelativePitch() + camPitch = (camPitch < -70.0 and -70.0) or (camPitch > 42.0 and 42.0) or camPitch + camPitch = (camPitch + 70.0) / 112.0 + + local camHeading = GetGameplayCamRelativeHeading() + local cosCamHeading, sinCamHeading = math.cos(camHeading * (math.pi / 180.0)), math.sin(camHeading * (math.pi / 180.0)) + + camHeading = (camHeading < -180.0 and -180.0) or (camHeading > 180.0 and 180.0) or camHeading + camHeading = (camHeading + 180.0) / 360.0 + + local coords = GetOffsetFromEntityInWorldCoords(playerPed, vec3((cosCamHeading * -0.2) - (sinCamHeading * (0.4 * camHeading + 0.3)), (sinCamHeading * -0.2) + (cosCamHeading * (0.4 * camHeading + 0.3)), 0.6)) + local shapeTestHandle = StartShapeTestCapsule(coords - vec3(0.0, 0.0, 0.2), coords + vec3(0.0, 0.0, 0.2), 0.4, 95, playerPed, 7) + + local shapeTestStatus, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(shapeTestHandle) + while shapeTestStatus == 1 do + Wait(0) + shapeTestStatus, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(shapeTestHandle) + end + + SetTaskMoveNetworkSignalFloat(playerPed, 'Pitch', camPitch) + SetTaskMoveNetworkSignalFloat(playerPed, 'Heading', (camHeading * -1.0) + 1.0) + SetTaskMoveNetworkSignalBool(playerPed, 'isBlocked', shapeTestStatus == 2 and hit == 1) + SetTaskMoveNetworkSignalBool(playerPed, 'isFirstPerson', GetCamViewModeForContext(GetCamActiveViewModeContext()) == 4) + end + end + end + end end) \ No newline at end of file diff --git a/client/showName.lua b/client/showName.lua index bf464a8..4b7073d 100644 --- a/client/showName.lua +++ b/client/showName.lua @@ -1,147 +1,147 @@ local GTComponents = { - GAMER_NAME = 0, - CREW_TAG = 1, - healthArmour = 2, - BIG_TEXT = 3, - AUDIO_ICON = 4, - MP_USING_MENU = 5, - MP_PASSIVE_MODE = 6, - WANTED_STARS = 7, - MP_DRIVER = 8, - MP_CO_DRIVER = 9, - MP_TAGGED = 10, - GAMER_NAME_NEARBY = 11, - ARROW = 12, - MP_PACKAGES = 13, - INV_IF_PED_FOLLOWING = 14, - RANK_TEXT = 15, - MP_TYPING = 16, - MP_BAG_LARGE = 17, - MP_TAG_ARROW = 18, - MP_GANG_CEO = 19, - MP_GANG_BIKER = 20, - BIKER_ARROW = 21, - MC_ROLE_PRESIDENT = 22, - MC_ROLE_VICE_PRESIDENT = 23, - MC_ROLE_ROAD_CAPTAIN = 24, - MC_ROLE_SARGEANT = 25, - MC_ROLE_ENFORCER = 26, - MC_ROLE_PROSPECT = 27, - MP_TRANSMITTER = 28, - MP_BOMB = 29 + GAMER_NAME = 0, + CREW_TAG = 1, + healthArmour = 2, + BIG_TEXT = 3, + AUDIO_ICON = 4, + MP_USING_MENU = 5, + MP_PASSIVE_MODE = 6, + WANTED_STARS = 7, + MP_DRIVER = 8, + MP_CO_DRIVER = 9, + MP_TAGGED = 10, + GAMER_NAME_NEARBY = 11, + ARROW = 12, + MP_PACKAGES = 13, + INV_IF_PED_FOLLOWING = 14, + RANK_TEXT = 15, + MP_TYPING = 16, + MP_BAG_LARGE = 17, + MP_TAG_ARROW = 18, + MP_GANG_CEO = 19, + MP_GANG_BIKER = 20, + BIKER_ARROW = 21, + MC_ROLE_PRESIDENT = 22, + MC_ROLE_VICE_PRESIDENT = 23, + MC_ROLE_ROAD_CAPTAIN = 24, + MC_ROLE_SARGEANT = 25, + MC_ROLE_ENFORCER = 26, + MC_ROLE_PROSPECT = 27, + MP_TRANSMITTER = 28, + MP_BOMB = 29 } activeTags = {} activeTagsMutex = {} CreateThread(function() - local playerId = PlayerId() - local GetPlayerPed = GetPlayerPed - local GetPlayerServerId = GetPlayerServerId - local GetPlayerName = GetPlayerName - - local function sanitizeString(s) - if type(s) ~= "string" then return "" end - local res = s:gsub("[^\32-\126]", "") - :gsub('[<>]', '') - :gsub('~.*~', '') - - if res:len() < s:len() then - local trimmedRes = res:gsub("%s", "") - - if trimmedRes == "" then - return trimmedRes - end - end - - return res - end - - local activeTagsMutex = activeTagsMutex - - while true do - if PlayerVars.showName then - local activeTagsByPlayerId = {} - - for i = #activeTagsMutex, 1, -1 do - local tag = activeTagsMutex[i] - - if tag then - if IsMpGamerTagActive(tag.handle) then - activeTagsByPlayerId[tag.playerId] = true - else - table.remove(activeTagsMutex, i) - end - end - end - - do - local activePlayers = GetActivePlayers() - - for i = 1, #activePlayers do - local targetPlayer = activePlayers[i] - - if targetPlayer ~= playerId then - if not activeTagsByPlayerId[targetPlayer] then - local targetPed = GetPlayerPed(targetPlayer) - - if targetPed > 0 then - local targetPlayerServerId = GetPlayerServerId(targetPlayer) - local sanitizedName = sanitizeString(GetPlayerName(targetPlayer)) - local renderedText = ("[%d] %s"):format(targetPlayerServerId, sanitizedName == "" and "Inconnu" or sanitizedName) - local tagHandle = CreateFakeMpGamerTag(targetPed, renderedText, false, false, "", 0) - - activeTagsMutex[#activeTagsMutex + 1] = { - handle = tagHandle, - playerId = targetPlayer - } - end - end - end - end - end - - local _activeTags = {} - - for i = 1, #activeTagsMutex do - local tagMutex = activeTagsMutex[i] - _activeTags[i] = tagMutex - end - - activeTags = _activeTags - end - - Wait(PlayerVars.showName and 100 or 200) - end + local playerId = PlayerId() + local GetPlayerPed = GetPlayerPed + local GetPlayerServerId = GetPlayerServerId + local GetPlayerName = GetPlayerName + + local function sanitizeString(s) + if type(s) ~= "string" then return "" end + local res = s:gsub("[^\32-\126]", "") + :gsub('[<>]', '') + :gsub('~.*~', '') + + if res:len() < s:len() then + local trimmedRes = res:gsub("%s", "") + + if trimmedRes == "" then + return trimmedRes + end + end + + return res + end + + local activeTagsMutex = activeTagsMutex + + while true do + if PlayerVars.showName then + local activeTagsByPlayerId = {} + + for i = #activeTagsMutex, 1, -1 do + local tag = activeTagsMutex[i] + + if tag then + if IsMpGamerTagActive(tag.handle) then + activeTagsByPlayerId[tag.playerId] = true + else + table.remove(activeTagsMutex, i) + end + end + end + + do + local activePlayers = GetActivePlayers() + + for i = 1, #activePlayers do + local targetPlayer = activePlayers[i] + + if targetPlayer ~= playerId then + if not activeTagsByPlayerId[targetPlayer] then + local targetPed = GetPlayerPed(targetPlayer) + + if targetPed > 0 then + local targetPlayerServerId = GetPlayerServerId(targetPlayer) + local sanitizedName = sanitizeString(GetPlayerName(targetPlayer)) + local renderedText = ("[%d] %s"):format(targetPlayerServerId, sanitizedName == "" and "Inconnu" or sanitizedName) + local tagHandle = CreateFakeMpGamerTag(targetPed, renderedText, false, false, "", 0) + + activeTagsMutex[#activeTagsMutex + 1] = { + handle = tagHandle, + playerId = targetPlayer + } + end + end + end + end + end + + local _activeTags = {} + + for i = 1, #activeTagsMutex do + local tagMutex = activeTagsMutex[i] + _activeTags[i] = tagMutex + end + + activeTags = _activeTags + end + + Wait(PlayerVars.showName and 100 or 200) + end end) CreateThread(function() - SetMpGamerTagsUseVehicleBehavior(false) - SetMpGamerTagsVisibleDistance(424.0) - - local GetPlayerPed = GetPlayerPed - local MumbleIsPlayerTalking = MumbleIsPlayerTalking - - while true do - if PlayerVars.showName then - for i = 1, #activeTags do - local tag = activeTags[i] - local targetPed = GetPlayerPed(tag.playerId) - - if targetPed > 0 then - local tagHandle = tag.handle - SetMpGamerTagVisibility(tagHandle, GTComponents["GAMER_NAME"], true) - SetMpGamerTagVisibility(tagHandle, GTComponents["healthArmour"], true) - SetMpGamerTagVisibility(tagHandle, GTComponents["AUDIO_ICON"], MumbleIsPlayerTalking(tag.playerId)) - - SetMpGamerTagAlpha(tagHandle, GTComponents["healthArmour"], 255) - - SetMpGamerTagAlpha(tagHandle, GTComponents["AUDIO_ICON"], 255) - SetMpGamerTagColour(tagHandle, GTComponents["AUDIO_ICON"], 118) - end - end - end - - Wait(PlayerVars.showName and 0 or 200) - end + SetMpGamerTagsUseVehicleBehavior(false) + SetMpGamerTagsVisibleDistance(424.0) + + local GetPlayerPed = GetPlayerPed + local MumbleIsPlayerTalking = MumbleIsPlayerTalking + + while true do + if PlayerVars.showName then + for i = 1, #activeTags do + local tag = activeTags[i] + local targetPed = GetPlayerPed(tag.playerId) + + if targetPed > 0 then + local tagHandle = tag.handle + SetMpGamerTagVisibility(tagHandle, GTComponents["GAMER_NAME"], true) + SetMpGamerTagVisibility(tagHandle, GTComponents["healthArmour"], true) + SetMpGamerTagVisibility(tagHandle, GTComponents["AUDIO_ICON"], MumbleIsPlayerTalking(tag.playerId)) + + SetMpGamerTagAlpha(tagHandle, GTComponents["healthArmour"], 255) + + SetMpGamerTagAlpha(tagHandle, GTComponents["AUDIO_ICON"], 255) + SetMpGamerTagColour(tagHandle, GTComponents["AUDIO_ICON"], 118) + end + end + end + + Wait(PlayerVars.showName and 0 or 200) + end end) \ No newline at end of file diff --git a/client/utils.lua b/client/utils.lua index 31c00a1..b238aab 100644 --- a/client/utils.lua +++ b/client/utils.lua @@ -1,28 +1,28 @@ function LoadAnimDict(dict) - RequestAnimDict(dict) + RequestAnimDict(dict) - while not HasAnimDictLoaded(dict) do - Wait(0) - end + while not HasAnimDictLoaded(dict) do + Wait(0) + end end function LoadAnimSet(animSet) - RequestAnimSet(animSet) + RequestAnimSet(animSet) - while not HasAnimSetLoaded(animSet) do - Wait(0) - end + while not HasAnimSetLoaded(animSet) do + Wait(0) + end end function MathRound(v, numDecimal) - if math.type(v) ~= 'float' then v += 0.0 end + if math.type(v) ~= 'float' then v += 0.0 end - if numDecimal then - local power = 10 ^ numDecimal - return math.floor(v * power + 0.5) / power - end + if numDecimal then + local power = 10 ^ numDecimal + return math.floor(v * power + 0.5) / power + end - return math.floor(v + 0.5) + return math.floor(v + 0.5) end if Config.Framework == 'esx' then @@ -130,7 +130,7 @@ if Config.Framework == 'esx' then if playerJob.isBoss and ('society_%s'):format(playerJob.id) == societyId then societyMoney = money end - + if Config.DoubleJob then local playerJob = GetPlayerJob2() if playerJob2.isBoss and ('society_%s'):format(playerJob2.id) == societyId then diff --git a/config.lua b/config.lua index 6b11d6e..e2aa28f 100644 --- a/config.lua +++ b/config.lua @@ -1,13 +1,13 @@ local Keys = { - ['ESC'] = 322, ['F1'] = 288, ['F2'] = 289, ['F3'] = 170, ['F5'] = 166, ['F6'] = 167, ['F7'] = 168, ['F8'] = 169, ['F9'] = 56, ['F10'] = 57, - ['~'] = 243, ['1'] = 157, ['2'] = 158, ['3'] = 160, ['4'] = 164, ['5'] = 165, ['6'] = 159, ['7'] = 161, ['8'] = 162, ['9'] = 163, ['-'] = 84, ['='] = 83, ['BACKSPACE'] = 177, - ['TAB'] = 37, ['Q'] = 44, ['W'] = 32, ['E'] = 38, ['R'] = 45, ['T'] = 245, ['Y'] = 246, ['U'] = 303, ['P'] = 199, ['['] = 39, [']'] = 40, ['ENTER'] = 18, - ['CAPS'] = 137, ['A'] = 34, ['S'] = 8, ['D'] = 9, ['F'] = 23, ['G'] = 47, ['H'] = 74, ['K'] = 311, ['L'] = 182, - ['LEFTSHIFT'] = 21, ['Z'] = 20, ['X'] = 73, ['C'] = 26, ['V'] = 0, ['B'] = 29, ['N'] = 249, ['M'] = 244, [','] = 82, ['.'] = 81, - ['LEFTCTRL'] = 36, ['LEFTALT'] = 19, ['SPACE'] = 22, ['RIGHTCTRL'] = 70, - ['HOME'] = 213, ['PAGEUP'] = 10, ['PAGEDOWN'] = 11, ['DELETE'] = 178, - ['LEFT'] = 174, ['RIGHT'] = 175, ['TOP'] = 27, ['DOWN'] = 173, - ['NENTER'] = 201, ['N4'] = 108, ['N5'] = 60, ['N6'] = 107, ['N+'] = 96, ['N-'] = 97, ['N7'] = 117, ['N8'] = 61, ['N9'] = 118 + ['ESC'] = 322, ['F1'] = 288, ['F2'] = 289, ['F3'] = 170, ['F5'] = 166, ['F6'] = 167, ['F7'] = 168, ['F8'] = 169, ['F9'] = 56, ['F10'] = 57, + ['~'] = 243, ['1'] = 157, ['2'] = 158, ['3'] = 160, ['4'] = 164, ['5'] = 165, ['6'] = 159, ['7'] = 161, ['8'] = 162, ['9'] = 163, ['-'] = 84, ['='] = 83, ['BACKSPACE'] = 177, + ['TAB'] = 37, ['Q'] = 44, ['W'] = 32, ['E'] = 38, ['R'] = 45, ['T'] = 245, ['Y'] = 246, ['U'] = 303, ['P'] = 199, ['['] = 39, [']'] = 40, ['ENTER'] = 18, + ['CAPS'] = 137, ['A'] = 34, ['S'] = 8, ['D'] = 9, ['F'] = 23, ['G'] = 47, ['H'] = 74, ['K'] = 311, ['L'] = 182, + ['LEFTSHIFT'] = 21, ['Z'] = 20, ['X'] = 73, ['C'] = 26, ['V'] = 0, ['B'] = 29, ['N'] = 249, ['M'] = 244, [','] = 82, ['.'] = 81, + ['LEFTCTRL'] = 36, ['LEFTALT'] = 19, ['SPACE'] = 22, ['RIGHTCTRL'] = 70, + ['HOME'] = 213, ['PAGEUP'] = 10, ['PAGEDOWN'] = 11, ['DELETE'] = 178, + ['LEFT'] = 174, ['RIGHT'] = 175, ['TOP'] = 27, ['DOWN'] = 173, + ['NENTER'] = 201, ['N4'] = 108, ['N5'] = 60, ['N6'] = 107, ['N+'] = 96, ['N-'] = 97, ['N7'] = 117, ['N8'] = 61, ['N9'] = 118 } Config = {} @@ -26,486 +26,486 @@ Config.JSFourIDCard = false -- enable if you're using jsfour-idcard -- CONTROLS -- Config.Controls = { - OpenMenu = {keyboard = 'F5'}, - HandsUP = {keyboard = 'GRAVE'}, - Pointing = {keyboard = 'B'}, - Crouch = {keyboard = Keys['LEFTCTRL']}, - StopTasks = {keyboard = 'X'}, - TPMarker = {keyboard1 = Keys['LEFTALT'], keyboard2 = Keys['E']} + OpenMenu = {keyboard = 'F5'}, + HandsUP = {keyboard = 'GRAVE'}, + Pointing = {keyboard = 'B'}, + Crouch = {keyboard = Keys['LEFTCTRL']}, + StopTasks = {keyboard = 'X'}, + TPMarker = {keyboard1 = Keys['LEFTALT'], keyboard2 = Keys['E']} } -- GPS -- Config.GPS = { - {name = i18nU('none'), coords = nil}, - {name = i18nU('police_station'), coords = vec2(425.13, -979.55)}, - {name = i18nU('central_garage'), coords = vec2(-449.67, -340.83)}, - {name = i18nU('hospital'), coords = vec2(-33.88, -1102.37)}, - {name = i18nU('dealer'), coords = vec2(215.06, -791.56)}, - {name = i18nU('bennys_custom'), coords = vec2(-212.13, -1325.27)}, - {name = i18nU('job_center'), coords = vec2(-264.83, -964.54)}, - {name = i18nU('driving_school'), coords = vec2(-829.22, -696.99)}, - {name = i18nU('tequila-la'), coords = vec2(-565.09, 273.45)}, - {name = i18nU('bahama_mamas'), coords = vec2(-1391.06, -590.34)} + {name = i18nU('none'), coords = nil}, + {name = i18nU('police_station'), coords = vec2(425.13, -979.55)}, + {name = i18nU('central_garage'), coords = vec2(-449.67, -340.83)}, + {name = i18nU('hospital'), coords = vec2(-33.88, -1102.37)}, + {name = i18nU('dealer'), coords = vec2(215.06, -791.56)}, + {name = i18nU('bennys_custom'), coords = vec2(-212.13, -1325.27)}, + {name = i18nU('job_center'), coords = vec2(-264.83, -964.54)}, + {name = i18nU('driving_school'), coords = vec2(-829.22, -696.99)}, + {name = i18nU('tequila-la'), coords = vec2(-565.09, 273.45)}, + {name = i18nU('bahama_mamas'), coords = vec2(-1391.06, -590.34)} } -- ANIMATIONS -- Config.Animations = { - { - name = 'party', - name = i18nU('animation_party_title'), - items = { - {name = i18nU('animation_party_smoke'), type = "scenario", scenarioName = "WORLD_HUMAN_SMOKING"}, - {name = i18nU('animation_party_playsong'), type = "scenario", scenarioName = "WORLD_HUMAN_MUSICIAN"}, - {name = i18nU('animation_party_dj'), type = "anim", animDict = "anim@mp_player_intcelebrationmale@dj", animName = "dj"}, - {name = i18nU('animation_party_beer'), type = "scenario", scenarioName = "WORLD_HUMAN_DRINKING"}, - {name = i18nU('animation_party_dancing'), type = "scenario", scenarioName = "WORLD_HUMAN_PARTYING"}, - {name = i18nU('animation_party_airguitar'), type = "anim", animDict = "anim@mp_player_intcelebrationmale@air_guitar", animName = "air_guitar"}, - {name = i18nU('animation_party_shagging'), type = "anim", animDict = "anim@mp_player_intcelebrationfemale@air_shagging", animName = "air_shagging"}, - {name = i18nU('animation_party_rock'), type = "anim", animDict = "mp_player_int_upperrock", animName = "mp_player_int_rock"}, - {name = i18nU('animation_party_drunk'), type = "anim", animDict = "amb@world_human_bum_standing@drunk@idle_a", animName = "idle_a"}, - {name = i18nU('animation_party_vomit'), type = "anim", animDict = "oddjobs@taxi@tie", animName = "vomit_outside"} - } - }, - { - name = 'salute', - name = i18nU('animation_salute_title'), - items = { - {name = i18nU('animation_salute_saluate'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_hello"}, - {name = i18nU('animation_salute_serrer'), type = "anim", animDict = "mp_common", animName = "givetake1_a"}, - {name = i18nU('animation_salute_tchek'), type = "anim", animDict = "mp_ped_interaction", animName = "handshake_guy_a"}, - {name = i18nU('animation_salute_bandit'), type = "anim", animDict = "mp_ped_interaction", animName = "hugs_guy_a"}, - {name = i18nU('animation_salute_military'), type = "anim", animDict = "mp_player_int_uppersalute", animName = "mp_player_int_salute"} - } - }, - { - name = 'work', - name = i18nU('animation_work_title'), - items = { - {name = i18nU('animation_work_suspect'), type = "anim", animDict = "random@arrests@busted", animName = "idle_c"}, - {name = i18nU('animation_work_fisherman'), type = "scenario", scenarioName = "world_human_stand_fishing"}, - {name = i18nU('animation_work_inspect'), type = "anim", animDict = "amb@code_human_police_investigate@idle_b", animName = "idle_f"}, - {name = i18nU('animation_work_radio'), type = "anim", animDict = "random@arrests", animName = "generic_radio_chatter"}, - {name = i18nU('animation_work_circulation'), type = "scenario", scenarioName = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}, - {name = i18nU('animation_work_binoculars'), type = "scenario", scenarioName = "WORLD_HUMAN_BINOCULARS"}, - {name = i18nU('animation_work_harvest'), type = "scenario", scenarioName = "world_human_gardener_plant"}, - {name = i18nU('animation_work_repair'), type = "anim", animDict = "mini@repair", animName = "fixing_a_ped"}, - {name = i18nU('animation_work_observe'), type = "scenario", scenarioName = "CODE_HUMAN_MEDIC_KNEEL"}, - {name = i18nU('animation_work_talk'), type = "anim", animDict = "oddjobs@taxi@driver", animName = "leanover_idle"}, - {name = i18nU('animation_work_bill'), type = "anim", animDict = "oddjobs@taxi@cyi", animName = "std_hand_off_ps_passenger"}, - {name = i18nU('animation_work_buy'), type = "anim", animDict = "mp_am_hold_up", animName = "purchase_beerbox_shopkeeper"}, - {name = i18nU('animation_work_shot'), type = "anim", animDict = "mini@drinking", animName = "shots_barman_b"}, - {name = i18nU('animation_work_picture'), type = "scenario", scenarioName = "WORLD_HUMAN_PAPARAZZI"}, - {name = i18nU('animation_work_notes'), type = "scenario", scenarioName = "WORLD_HUMAN_CLIPBOARD"}, - {name = i18nU('animation_work_hammer'), type = "scenario", scenarioName = "WORLD_HUMAN_HAMMERING"}, - {name = i18nU('animation_work_beg'), type = "scenario", scenarioName = "WORLD_HUMAN_BUM_FREEWAY"}, - {name = i18nU('animation_work_statue'), type = "scenario", scenarioName = "WORLD_HUMAN_HUMAN_STATUE"} - } - }, - { - name = 'mood', - name = i18nU('animation_mood_title'), - items = { - {name = i18nU('animation_mood_felicitate'), type = "scenario", scenarioName = "WORLD_HUMAN_CHEERING"}, - {name = i18nU('animation_mood_nice'), type = "anim", animDict = "mp_action", animName = "thanks_male_06"}, - {name = i18nU('animation_mood_you'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_point"}, - {name = i18nU('animation_mood_come'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_come_here_soft"}, - {name = i18nU('animation_mood_what'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_bring_it_on"}, - {name = i18nU('animation_mood_me'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_me"}, - {name = i18nU('animation_mood_seriously'), type = "anim", animDict = "anim@am_hold_up@male", animName = "shoplift_high"}, - {name = i18nU('animation_mood_tired'), type = "anim", animDict = "amb@world_human_jog_standing@male@idle_b", animName = "idle_d"}, - {name = i18nU('animation_mood_shit'), type = "anim", animDict = "amb@world_human_bum_standing@depressed@idle_a", animName = "idle_a"}, - {name = i18nU('animation_mood_facepalm'), type = "anim", animDict = "anim@mp_player_intcelebrationmale@face_palm", animName = "face_palm"}, - {name = i18nU('animation_mood_calm'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_easy_now"}, - {name = i18nU('animation_mood_why'), type = "anim", animDict = "oddjobs@assassinate@multi@", animName = "react_big_variations_a"}, - {name = i18nU('animation_mood_fear'), type = "anim", animDict = "amb@code_human_cower_stand@male@react_cowering", animName = "base_right"}, - {name = i18nU('animation_mood_fight'), type = "anim", animDict = "anim@deathmatch_intros@unarmed", animName = "intro_male_unarmed_e"}, - {name = i18nU('animation_mood_notpossible'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_damn"}, - {name = i18nU('animation_mood_embrace'), type = "anim", animDict = "mp_ped_interaction", animName = "kisses_guy_a"}, - {name = i18nU('animation_mood_fuckyou'), type = "anim", animDict = "mp_player_int_upperfinger", animName = "mp_player_int_finger_01_enter"}, - {name = i18nU('animation_mood_wanker'), type = "anim", animDict = "mp_player_int_upperwank", animName = "mp_player_int_wank_01"}, - {name = i18nU('animation_mood_suicide'), type = "anim", animDict = "mp_suicide", animName = "pistol"} - } - }, - { - name = 'sports', - name = i18nU('animation_sports_title'), - items = { - {name = i18nU('animation_sports_muscle'), type = "anim", animDict = "amb@world_human_muscle_flex@arms_at_side@base", animName = "base"}, - {name = i18nU('animation_sports_weightbar'), type = "anim", animDict = "amb@world_human_muscle_free_weights@male@barbell@base", animName = "base"}, - {name = i18nU('animation_sports_pushup'), type = "anim", animDict = "amb@world_human_push_ups@male@base", animName = "base"}, - {name = i18nU('animation_sports_abs'), type = "anim", animDict = "amb@world_human_sit_ups@male@base", animName = "base"}, - {name = i18nU('animation_sports_yoga'), type = "anim", animDict = "amb@world_human_yoga@male@base", animName = "base_a"} - } - }, - { - name = 'other', - name = i18nU('animation_other_title'), - items = { - {name = i18nU('animation_other_sit'), type = "anim", animDict = "anim@heists@prison_heistunfinished_biztarget_idle", animName = "target_idle"}, - {name = i18nU('animation_other_waitwall'), type = "scenario", scenarioName = "world_human_leaning"}, - {name = i18nU('animation_other_ontheback'), type = "scenario", scenarioName = "WORLD_HUMAN_SUNBATHE_BACK"}, - {name = i18nU('animation_other_stomach'), type = "scenario", scenarioName = "WORLD_HUMAN_SUNBATHE"}, - {name = i18nU('animation_other_clean'), type = "scenario", scenarioName = "world_human_maid_clean"}, - {name = i18nU('animation_other_cooking'), type = "scenario", scenarioName = "PROP_HUMAN_BBQ"}, - {name = i18nU('animation_other_search'), type = "anim", animDict = "mini@prostitutes@sexlow_veh", animName = "low_car_bj_to_prop_female"}, - {name = i18nU('animation_other_selfie'), type = "scenario", scenarioName = "world_human_tourist_mobile"}, - {name = i18nU('animation_other_door'), type = "anim", animDict = "mini@safe_cracking", animName = "idle_base"} - } - }, - { - name = 'pegi', - name = i18nU('animation_pegi_title'), - items = { - {name = i18nU('animation_pegi_hsuck'), type = "anim", animDict = "oddjobs@towing", animName = "m_blow_job_loop"}, - {name = i18nU('animation_pegi_fsuck'), type = "anim", animDict = "oddjobs@towing", animName = "f_blow_job_loop"}, - {name = i18nU('animation_pegi_hfuck'), type = "anim", animDict = "mini@prostitutes@sexlow_veh", animName = "low_car_sex_loop_player"}, - {name = i18nU('animation_pegi_ffuck'), type = "anim", animDict = "mini@prostitutes@sexlow_veh", animName = "low_car_sex_loop_female"}, - {name = i18nU('animation_pegi_scratch'), type = "anim", animDict = "mp_player_int_uppergrab_crotch", animName = "mp_player_int_grab_crotch"}, - {name = i18nU('animation_pegi_charm'), type = "anim", animDict = "mini@strip_club@idles@stripper", animName = "stripper_idle_02"}, - {name = i18nU('animation_pegi_golddigger'), type = "scenario", scenarioName = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}, - {name = i18nU('animation_pegi_breast'), type = "anim", animDict = "mini@strip_club@backroom@", animName = "stripper_b_backroom_idle_b"}, - {name = i18nU('animation_pegi_strip1'), type = "anim", animDict = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", animName = "ld_girl_a_song_a_p1_f"}, - {name = i18nU('animation_pegi_strip2'), type = "anim", animDict = "mini@strip_club@private_dance@part2", animName = "priv_dance_p2"}, - {name = i18nU('animation_pegi_stripfloor'), type = "anim", animDict = "mini@strip_club@private_dance@part3", animName = "priv_dance_p3"} - } - }, - { - name = 'attitudes', - name = i18nU('animation_attitudes_title'), - items = { - {name = "Normal", type = "attitude"}, - {name = "Confiant", type = "attitude", animSet = "move_m@confident"}, - {name = "Talons", type = "attitude", animSet = "move_f@heels@c"}, - {name = "Dépressif", type = "attitude", animSet = "move_m@depressed@a"}, - {name = "Dépressive", type = "attitude", animSet = "move_f@depressed@a"}, - {name = "Business", type = "attitude", animSet = "move_m@business@a"}, - {name = "Déterminé", type = "attitude", animSet = "move_m@brave@a"}, - {name = "Casual", type = "attitude", animSet = "move_m@casual@a"}, - {name = "Trop mange", type = "attitude", animSet = "move_m@fat@a"}, - {name = "Hipster", type = "attitude", animSet = "move_m@hipster@a"}, - {name = "Blesse", type = "attitude", animSet = "move_m@injured"}, - {name = "Intimide", type = "attitude", animSet = "move_m@hurry@a"}, - {name = "Hobo", type = "attitude", animSet = "move_m@hobo@a"}, - {name = "Malheureux", type = "attitude", animSet = "move_m@sad@a"}, - {name = "Muscle", type = "attitude", animSet = "move_m@muscle@a"}, - {name = "Choc", type = "attitude", animSet = "move_m@shocked@a"}, - {name = "Sombre", type = "attitude", animSet = "move_m@shadyped@a"}, - {name = "Fatigue", type = "attitude", animSet = "move_m@buzzed"}, - {name = "Pressee", type = "attitude", animSet = "move_m@hurry_butch@a"}, - {name = "Fièr", type = "attitude", animSet = "move_m@money"}, - {name = "Petite course", type = "attitude", animSet = "move_m@quick"}, - {name = "Mangeuse d'homme", type = "attitude", animSet = "move_f@maneater"}, - {name = "Impertinente", type = "attitude", animSet = "move_f@sassy"}, - {name = "Arrogante", type = "attitude", animSet = "move_f@arrogant@a"} - } - } + { + name = 'party', + name = i18nU('animation_party_title'), + items = { + {name = i18nU('animation_party_smoke'), type = "scenario", scenarioName = "WORLD_HUMAN_SMOKING"}, + {name = i18nU('animation_party_playsong'), type = "scenario", scenarioName = "WORLD_HUMAN_MUSICIAN"}, + {name = i18nU('animation_party_dj'), type = "anim", animDict = "anim@mp_player_intcelebrationmale@dj", animName = "dj"}, + {name = i18nU('animation_party_beer'), type = "scenario", scenarioName = "WORLD_HUMAN_DRINKING"}, + {name = i18nU('animation_party_dancing'), type = "scenario", scenarioName = "WORLD_HUMAN_PARTYING"}, + {name = i18nU('animation_party_airguitar'), type = "anim", animDict = "anim@mp_player_intcelebrationmale@air_guitar", animName = "air_guitar"}, + {name = i18nU('animation_party_shagging'), type = "anim", animDict = "anim@mp_player_intcelebrationfemale@air_shagging", animName = "air_shagging"}, + {name = i18nU('animation_party_rock'), type = "anim", animDict = "mp_player_int_upperrock", animName = "mp_player_int_rock"}, + {name = i18nU('animation_party_drunk'), type = "anim", animDict = "amb@world_human_bum_standing@drunk@idle_a", animName = "idle_a"}, + {name = i18nU('animation_party_vomit'), type = "anim", animDict = "oddjobs@taxi@tie", animName = "vomit_outside"} + } + }, + { + name = 'salute', + name = i18nU('animation_salute_title'), + items = { + {name = i18nU('animation_salute_saluate'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_hello"}, + {name = i18nU('animation_salute_serrer'), type = "anim", animDict = "mp_common", animName = "givetake1_a"}, + {name = i18nU('animation_salute_tchek'), type = "anim", animDict = "mp_ped_interaction", animName = "handshake_guy_a"}, + {name = i18nU('animation_salute_bandit'), type = "anim", animDict = "mp_ped_interaction", animName = "hugs_guy_a"}, + {name = i18nU('animation_salute_military'), type = "anim", animDict = "mp_player_int_uppersalute", animName = "mp_player_int_salute"} + } + }, + { + name = 'work', + name = i18nU('animation_work_title'), + items = { + {name = i18nU('animation_work_suspect'), type = "anim", animDict = "random@arrests@busted", animName = "idle_c"}, + {name = i18nU('animation_work_fisherman'), type = "scenario", scenarioName = "world_human_stand_fishing"}, + {name = i18nU('animation_work_inspect'), type = "anim", animDict = "amb@code_human_police_investigate@idle_b", animName = "idle_f"}, + {name = i18nU('animation_work_radio'), type = "anim", animDict = "random@arrests", animName = "generic_radio_chatter"}, + {name = i18nU('animation_work_circulation'), type = "scenario", scenarioName = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}, + {name = i18nU('animation_work_binoculars'), type = "scenario", scenarioName = "WORLD_HUMAN_BINOCULARS"}, + {name = i18nU('animation_work_harvest'), type = "scenario", scenarioName = "world_human_gardener_plant"}, + {name = i18nU('animation_work_repair'), type = "anim", animDict = "mini@repair", animName = "fixing_a_ped"}, + {name = i18nU('animation_work_observe'), type = "scenario", scenarioName = "CODE_HUMAN_MEDIC_KNEEL"}, + {name = i18nU('animation_work_talk'), type = "anim", animDict = "oddjobs@taxi@driver", animName = "leanover_idle"}, + {name = i18nU('animation_work_bill'), type = "anim", animDict = "oddjobs@taxi@cyi", animName = "std_hand_off_ps_passenger"}, + {name = i18nU('animation_work_buy'), type = "anim", animDict = "mp_am_hold_up", animName = "purchase_beerbox_shopkeeper"}, + {name = i18nU('animation_work_shot'), type = "anim", animDict = "mini@drinking", animName = "shots_barman_b"}, + {name = i18nU('animation_work_picture'), type = "scenario", scenarioName = "WORLD_HUMAN_PAPARAZZI"}, + {name = i18nU('animation_work_notes'), type = "scenario", scenarioName = "WORLD_HUMAN_CLIPBOARD"}, + {name = i18nU('animation_work_hammer'), type = "scenario", scenarioName = "WORLD_HUMAN_HAMMERING"}, + {name = i18nU('animation_work_beg'), type = "scenario", scenarioName = "WORLD_HUMAN_BUM_FREEWAY"}, + {name = i18nU('animation_work_statue'), type = "scenario", scenarioName = "WORLD_HUMAN_HUMAN_STATUE"} + } + }, + { + name = 'mood', + name = i18nU('animation_mood_title'), + items = { + {name = i18nU('animation_mood_felicitate'), type = "scenario", scenarioName = "WORLD_HUMAN_CHEERING"}, + {name = i18nU('animation_mood_nice'), type = "anim", animDict = "mp_action", animName = "thanks_male_06"}, + {name = i18nU('animation_mood_you'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_point"}, + {name = i18nU('animation_mood_come'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_come_here_soft"}, + {name = i18nU('animation_mood_what'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_bring_it_on"}, + {name = i18nU('animation_mood_me'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_me"}, + {name = i18nU('animation_mood_seriously'), type = "anim", animDict = "anim@am_hold_up@male", animName = "shoplift_high"}, + {name = i18nU('animation_mood_tired'), type = "anim", animDict = "amb@world_human_jog_standing@male@idle_b", animName = "idle_d"}, + {name = i18nU('animation_mood_shit'), type = "anim", animDict = "amb@world_human_bum_standing@depressed@idle_a", animName = "idle_a"}, + {name = i18nU('animation_mood_facepalm'), type = "anim", animDict = "anim@mp_player_intcelebrationmale@face_palm", animName = "face_palm"}, + {name = i18nU('animation_mood_calm'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_easy_now"}, + {name = i18nU('animation_mood_why'), type = "anim", animDict = "oddjobs@assassinate@multi@", animName = "react_big_variations_a"}, + {name = i18nU('animation_mood_fear'), type = "anim", animDict = "amb@code_human_cower_stand@male@react_cowering", animName = "base_right"}, + {name = i18nU('animation_mood_fight'), type = "anim", animDict = "anim@deathmatch_intros@unarmed", animName = "intro_male_unarmed_e"}, + {name = i18nU('animation_mood_notpossible'), type = "anim", animDict = "gestures@m@standing@casual", animName = "gesture_damn"}, + {name = i18nU('animation_mood_embrace'), type = "anim", animDict = "mp_ped_interaction", animName = "kisses_guy_a"}, + {name = i18nU('animation_mood_fuckyou'), type = "anim", animDict = "mp_player_int_upperfinger", animName = "mp_player_int_finger_01_enter"}, + {name = i18nU('animation_mood_wanker'), type = "anim", animDict = "mp_player_int_upperwank", animName = "mp_player_int_wank_01"}, + {name = i18nU('animation_mood_suicide'), type = "anim", animDict = "mp_suicide", animName = "pistol"} + } + }, + { + name = 'sports', + name = i18nU('animation_sports_title'), + items = { + {name = i18nU('animation_sports_muscle'), type = "anim", animDict = "amb@world_human_muscle_flex@arms_at_side@base", animName = "base"}, + {name = i18nU('animation_sports_weightbar'), type = "anim", animDict = "amb@world_human_muscle_free_weights@male@barbell@base", animName = "base"}, + {name = i18nU('animation_sports_pushup'), type = "anim", animDict = "amb@world_human_push_ups@male@base", animName = "base"}, + {name = i18nU('animation_sports_abs'), type = "anim", animDict = "amb@world_human_sit_ups@male@base", animName = "base"}, + {name = i18nU('animation_sports_yoga'), type = "anim", animDict = "amb@world_human_yoga@male@base", animName = "base_a"} + } + }, + { + name = 'other', + name = i18nU('animation_other_title'), + items = { + {name = i18nU('animation_other_sit'), type = "anim", animDict = "anim@heists@prison_heistunfinished_biztarget_idle", animName = "target_idle"}, + {name = i18nU('animation_other_waitwall'), type = "scenario", scenarioName = "world_human_leaning"}, + {name = i18nU('animation_other_ontheback'), type = "scenario", scenarioName = "WORLD_HUMAN_SUNBATHE_BACK"}, + {name = i18nU('animation_other_stomach'), type = "scenario", scenarioName = "WORLD_HUMAN_SUNBATHE"}, + {name = i18nU('animation_other_clean'), type = "scenario", scenarioName = "world_human_maid_clean"}, + {name = i18nU('animation_other_cooking'), type = "scenario", scenarioName = "PROP_HUMAN_BBQ"}, + {name = i18nU('animation_other_search'), type = "anim", animDict = "mini@prostitutes@sexlow_veh", animName = "low_car_bj_to_prop_female"}, + {name = i18nU('animation_other_selfie'), type = "scenario", scenarioName = "world_human_tourist_mobile"}, + {name = i18nU('animation_other_door'), type = "anim", animDict = "mini@safe_cracking", animName = "idle_base"} + } + }, + { + name = 'pegi', + name = i18nU('animation_pegi_title'), + items = { + {name = i18nU('animation_pegi_hsuck'), type = "anim", animDict = "oddjobs@towing", animName = "m_blow_job_loop"}, + {name = i18nU('animation_pegi_fsuck'), type = "anim", animDict = "oddjobs@towing", animName = "f_blow_job_loop"}, + {name = i18nU('animation_pegi_hfuck'), type = "anim", animDict = "mini@prostitutes@sexlow_veh", animName = "low_car_sex_loop_player"}, + {name = i18nU('animation_pegi_ffuck'), type = "anim", animDict = "mini@prostitutes@sexlow_veh", animName = "low_car_sex_loop_female"}, + {name = i18nU('animation_pegi_scratch'), type = "anim", animDict = "mp_player_int_uppergrab_crotch", animName = "mp_player_int_grab_crotch"}, + {name = i18nU('animation_pegi_charm'), type = "anim", animDict = "mini@strip_club@idles@stripper", animName = "stripper_idle_02"}, + {name = i18nU('animation_pegi_golddigger'), type = "scenario", scenarioName = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}, + {name = i18nU('animation_pegi_breast'), type = "anim", animDict = "mini@strip_club@backroom@", animName = "stripper_b_backroom_idle_b"}, + {name = i18nU('animation_pegi_strip1'), type = "anim", animDict = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", animName = "ld_girl_a_song_a_p1_f"}, + {name = i18nU('animation_pegi_strip2'), type = "anim", animDict = "mini@strip_club@private_dance@part2", animName = "priv_dance_p2"}, + {name = i18nU('animation_pegi_stripfloor'), type = "anim", animDict = "mini@strip_club@private_dance@part3", animName = "priv_dance_p3"} + } + }, + { + name = 'attitudes', + name = i18nU('animation_attitudes_title'), + items = { + {name = "Normal", type = "attitude"}, + {name = "Confiant", type = "attitude", animSet = "move_m@confident"}, + {name = "Talons", type = "attitude", animSet = "move_f@heels@c"}, + {name = "Dépressif", type = "attitude", animSet = "move_m@depressed@a"}, + {name = "Dépressive", type = "attitude", animSet = "move_f@depressed@a"}, + {name = "Business", type = "attitude", animSet = "move_m@business@a"}, + {name = "Déterminé", type = "attitude", animSet = "move_m@brave@a"}, + {name = "Casual", type = "attitude", animSet = "move_m@casual@a"}, + {name = "Trop mange", type = "attitude", animSet = "move_m@fat@a"}, + {name = "Hipster", type = "attitude", animSet = "move_m@hipster@a"}, + {name = "Blesse", type = "attitude", animSet = "move_m@injured"}, + {name = "Intimide", type = "attitude", animSet = "move_m@hurry@a"}, + {name = "Hobo", type = "attitude", animSet = "move_m@hobo@a"}, + {name = "Malheureux", type = "attitude", animSet = "move_m@sad@a"}, + {name = "Muscle", type = "attitude", animSet = "move_m@muscle@a"}, + {name = "Choc", type = "attitude", animSet = "move_m@shocked@a"}, + {name = "Sombre", type = "attitude", animSet = "move_m@shadyped@a"}, + {name = "Fatigue", type = "attitude", animSet = "move_m@buzzed"}, + {name = "Pressee", type = "attitude", animSet = "move_m@hurry_butch@a"}, + {name = "Fièr", type = "attitude", animSet = "move_m@money"}, + {name = "Petite course", type = "attitude", animSet = "move_m@quick"}, + {name = "Mangeuse d'homme", type = "attitude", animSet = "move_f@maneater"}, + {name = "Impertinente", type = "attitude", animSet = "move_f@sassy"}, + {name = "Arrogante", type = "attitude", animSet = "move_f@arrogant@a"} + } + } } -- ADMIN -- Config.AdminCommands = { - { - id = 'goto', - name = i18nU('admin_goto_button'), - groups = {'_dev', 'owner', 'superadmin', 'admin', 'mod'}, - command = function() - local targetServerId = KeyboardInput('PM_BOX_ID', i18nU('dialogbox_playerid'), '', 8) - if not targetServerId then return end - - targetServerId = tonumber(targetServerId) - if type(targetServerId) ~= 'number' then return end - - TriggerServerEvent('krz_personalmenu:Admin_BringS', GetPlayerServerId(PlayerId()), targetServerId) - RageUI.CloseAll() - end - }, - { - id = 'bring', - name = i18nU('admin_bring_button'), - groups = {'_dev', 'owner', 'superadmin', 'admin', 'mod'}, - command = function() - local targetServerId = KeyboardInput('PM_BOX_ID', i18nU('dialogbox_playerid'), '', 8) - if not targetServerId then return end - - targetServerId = tonumber(targetServerId) - if type(targetServerId) ~= 'number' then return end - - TriggerServerEvent('krz_personalmenu:Admin_BringS', targetServerId, GetPlayerServerId(PlayerId())) - RageUI.CloseAll() - end - }, - { - id = 'tpxyz', - name = i18nU('admin_tpxyz_button'), - groups = {'_dev', 'owner', 'superadmin', 'admin'}, - command = function() - local pos = KeyboardInput('PM_BOX_XYZ', i18nU('dialogbox_xyz'), '', 50) - - if pos ~= nil and pos ~= '' then - local _, _, x, y, z = string.find(pos, '([%d%.]+) ([%d%.]+) ([%d%.]+)') - - if x ~= nil and y ~= nil and z ~= nil then - SetEntityCoords(plyPed, x + .0, y + .0, z + .0) - end - end - - RageUI.CloseAll() - end - }, - { - id = 'noclip', - name = i18nU('admin_noclip_button'), - groups = {'_dev', 'owner', 'superadmin', 'admin', 'mod'}, - command = function() - PlayerVars.noclip = not PlayerVars.noclip - - - if PlayerVars.noclip then - Citizen.CreateThreadNow(function() - while PlayerVars.noclip do - local plyPed = PlayerPedId() - - FreezeEntityPosition(plyPed, true) - SetEntityInvincible(plyPed, true) - SetEntityCollision(plyPed, false, false) - - SetEntityVisible(plyPed, false, false) - - local playerId = PlayerId() - SetEveryoneIgnorePlayer(playerId, true) - SetPoliceIgnorePlayer(playerId, true) - - local plyCoords = GetEntityCoords(plyPed, false) - - local heading = GetGameplayCamRelativeHeading() + GetEntityPhysicsHeading(plyPed) - local pitch = GetGameplayCamRelativePitch() - local camCoords = vec3(-math.sin(heading * math.pi / 180.0), math.cos(heading * math.pi / 180.0), math.sin(pitch * math.pi / 180.0)) - - local len = math.sqrt((camCoords.x * camCoords.x) + (camCoords.y * camCoords.y) + (camCoords.z * camCoords.z)) - if len ~= 0 then camCoords = camCoords / len end - - SetEntityVelocity(plyPed, vec3(0)) - - local isShiftPressed, isCtrlPressed = IsControlPressed(0, 21), IsControlPressed(0, 326) - - local noclipVelocity = isShiftPressed and isCtrlPressed and Config.NoclipSpeed - or isShiftPressed and Config.NoclipSpeed * 2.0 - or isCtrlPressed and Config.NoclipSpeed / 2.0 - or Config.NoclipSpeed - - if IsControlPressed(0, 32) then plyCoords += noclipVelocity * camCoords end - if IsControlPressed(0, 269) then plyCoords -= noclipVelocity * camCoords end - - SetEntityCoordsNoOffset(plyPed, plyCoords, true, true, true) - - Wait(0) - end - end) - - GameNotification(i18nU('admin_noclipon')) - else - local plyPed = PlayerPedId() - - FreezeEntityPosition(plyPed, false) - SetEntityInvincible(plyPed, false) - SetEntityCollision(plyPed, true, true) - - SetEntityVisible(plyPed, true, false) - - local playerId = PlayerId() - SetEveryoneIgnorePlayer(playerId, false) - SetPoliceIgnorePlayer(playerId, false) - - GameNotification(i18nU('admin_noclipoff')) - end - - RageUI.CloseAll() - end - }, - { - id = 'godmode', - name = i18nU('admin_godmode_button'), - groups = {'_dev', 'owner', 'superadmin'}, - command = function() - PlayerVars.godmode = not PlayerVars.godmode - - if PlayerVars.godmode then - SetEntityInvincible(plyPed, true) - GameNotification(i18nU('admin_godmodeon')) - else - SetEntityInvincible(plyPed, false) - GameNotification(i18nU('admin_godmodeoff')) - end - end - }, - { - id = 'ghostmode', - name = i18nU('admin_ghostmode_button'), - groups = {'_dev', 'owner', 'superadmin'}, - command = function() - PlayerVars.ghostmode = not PlayerVars.ghostmode - - if PlayerVars.ghostmode then - SetEntityVisible(plyPed, false, false) - GameNotification(i18nU('admin_ghoston')) - else - SetEntityVisible(plyPed, true, false) - GameNotification(i18nU('admin_ghostoff')) - end - end - }, - { - id = 'spawnveh', - name = i18nU('admin_spawnveh_button'), - groups = {'_dev', 'owner', 'superadmin'}, - command = function() - local modelName = KeyboardInput('PM_BOX_VEHICLE_NAME', i18nU('dialogbox_vehiclespawner'), '', 50) - if not modelName then return end - - modelName = tostring(modelName) - if type(modelName) ~= 'string' then return end - - ESX.Game.SpawnVehicle(modelName, GetEntityCoords(plyPed), GetEntityHeading(plyPed), function(vehicle) - TaskWarpPedIntoVehicle(plyPed, vehicle, -1) - end) - - RageUI.CloseAll() - end - }, - { - id = 'repairveh', - name = i18nU('admin_repairveh_button'), - groups = {'_dev', 'owner', 'superadmin', 'admin'}, - command = function() - local plyVeh = GetVehiclePedIsIn(plyPed, false) - SetVehicleFixed(plyVeh) - SetVehicleDirtLevel(plyVeh, 0.0) - end - }, - { - id = 'flipveh', - name = i18nU('admin_flipveh_button'), - groups = {'_dev', 'owner', 'superadmin', 'admin'}, - command = function() - local plyCoords = GetEntityCoords(plyPed) - local closestVeh = GetClosestVehicle(plyCoords, 10.0, 0, 70) - - SetVehicleOnGroundProperly(closestVeh) - GameNotification(i18nU('admin_vehicleflip')) - end - }, - { - id = 'givemoney', - name = i18nU('admin_givemoney_button'), - groups = {'_dev', 'owner', 'superadmin'}, - command = function() - local amount = KeyboardInput('PM_BOX_AMOUNT', i18nU('dialogbox_amount'), '', 8) - if not amount then return end - - amount = tonumber(amount) - if type(amount) ~= 'number' then return end - - TriggerServerEvent('krz_personalmenu:Admin_giveCash', amount) - RageUI.CloseAll() - end - }, - { - id = 'givebank', - name = i18nU('admin_givebank_button'), - groups = {'_dev', 'owner', 'superadmin'}, - command = function() - local amount = KeyboardInput('PM_BOX_AMOUNT', i18nU('dialogbox_amount'), '', 8) - if not amount then return end - - amount = tonumber(amount) - if type(amount) ~= 'number' then return end - - TriggerServerEvent('krz_personalmenu:Admin_giveBank', amount) - RageUI.CloseAll() - end - }, - { - id = 'givedirtymoney', - name = i18nU('admin_givedirtymoney_button'), - groups = {'_dev', 'owner', 'superadmin'}, - command = function() - local amount = KeyboardInput('PM_BOX_AMOUNT', i18nU('dialogbox_amount'), '', 8) - if not amount then return end - - amount = tonumber(amount) - if type(amount) ~= 'number' then return end - - TriggerServerEvent('krz_personalmenu:Admin_giveDirtyMoney', amount) - RageUI.CloseAll() - end - }, - { - id = 'showxyz', - name = i18nU('admin_showxyz_button'), - groups = {'_dev', 'owner', 'superadmin', 'admin', 'mod'}, - command = function() - PlayerVars.showCoords = not PlayerVars.showCoords - end - }, - { - id = 'showname', - name = i18nU('admin_showname_button'), - groups = {'_dev', 'owner', 'superadmin', 'admin', 'mod'}, - command = function() - PlayerVars.showName = not PlayerVars.showName - - if not PlayerVars.showName then - for i = 1, #activeTags do - local tag = activeTags[i] - - if IsMpGamerTagActive(tag.handle) then - RemoveMpGamerTag(tag.handle) - end - end - - activeTags = {} - table.wipe(activeTagsMutex) - end - end - }, - { - id = 'tpmarker', - name = i18nU('admin_tpmarker_button'), - groups = {'_dev', 'owner', 'superadmin', 'admin'}, - command = function() - tpMarker() - end - }, - { - id = 'revive', - name = i18nU('admin_revive_button'), - groups = {'_dev', 'owner', 'superadmin', 'admin'}, - command = function() - local targetServerId = KeyboardInput('PM_BOX_ID', i18nU('dialogbox_playerid'), '', 8) - if not targetServerId then return end - - targetServerId = tonumber(targetServerId) - if type(targetServerId) ~= 'number' then return end - - TriggerServerEvent('esx_ambulancejob:revive', targetServerId) - RageUI.CloseAll() - end - }, - { - id = 'changeskin', - name = i18nU('admin_changeskin_button'), - groups = {'_dev', 'owner', 'superadmin'}, - command = function() - RageUI.CloseAll() - Wait(100) - TriggerEvent('esx_skin:openSaveableMenu') - end - }, - { - id = 'saveskin', - name = i18nU('admin_saveskin_button'), - groups = {'_dev', 'owner', 'superadmin'}, - command = function() - TriggerEvent('esx_skin:requestSaveSkin') - end - } + { + id = 'goto', + name = i18nU('admin_goto_button'), + groups = {'_dev', 'owner', 'superadmin', 'admin', 'mod'}, + command = function() + local targetServerId = KeyboardInput('PM_BOX_ID', i18nU('dialogbox_playerid'), '', 8) + if not targetServerId then return end + + targetServerId = tonumber(targetServerId) + if type(targetServerId) ~= 'number' then return end + + TriggerServerEvent('krz_personalmenu:Admin_BringS', GetPlayerServerId(PlayerId()), targetServerId) + RageUI.CloseAll() + end + }, + { + id = 'bring', + name = i18nU('admin_bring_button'), + groups = {'_dev', 'owner', 'superadmin', 'admin', 'mod'}, + command = function() + local targetServerId = KeyboardInput('PM_BOX_ID', i18nU('dialogbox_playerid'), '', 8) + if not targetServerId then return end + + targetServerId = tonumber(targetServerId) + if type(targetServerId) ~= 'number' then return end + + TriggerServerEvent('krz_personalmenu:Admin_BringS', targetServerId, GetPlayerServerId(PlayerId())) + RageUI.CloseAll() + end + }, + { + id = 'tpxyz', + name = i18nU('admin_tpxyz_button'), + groups = {'_dev', 'owner', 'superadmin', 'admin'}, + command = function() + local pos = KeyboardInput('PM_BOX_XYZ', i18nU('dialogbox_xyz'), '', 50) + + if pos ~= nil and pos ~= '' then + local _, _, x, y, z = string.find(pos, '([%d%.]+) ([%d%.]+) ([%d%.]+)') + + if x ~= nil and y ~= nil and z ~= nil then + SetEntityCoords(plyPed, x + .0, y + .0, z + .0) + end + end + + RageUI.CloseAll() + end + }, + { + id = 'noclip', + name = i18nU('admin_noclip_button'), + groups = {'_dev', 'owner', 'superadmin', 'admin', 'mod'}, + command = function() + PlayerVars.noclip = not PlayerVars.noclip + + + if PlayerVars.noclip then + Citizen.CreateThreadNow(function() + while PlayerVars.noclip do + local plyPed = PlayerPedId() + + FreezeEntityPosition(plyPed, true) + SetEntityInvincible(plyPed, true) + SetEntityCollision(plyPed, false, false) + + SetEntityVisible(plyPed, false, false) + + local playerId = PlayerId() + SetEveryoneIgnorePlayer(playerId, true) + SetPoliceIgnorePlayer(playerId, true) + + local plyCoords = GetEntityCoords(plyPed, false) + + local heading = GetGameplayCamRelativeHeading() + GetEntityPhysicsHeading(plyPed) + local pitch = GetGameplayCamRelativePitch() + local camCoords = vec3(-math.sin(heading * math.pi / 180.0), math.cos(heading * math.pi / 180.0), math.sin(pitch * math.pi / 180.0)) + + local len = math.sqrt((camCoords.x * camCoords.x) + (camCoords.y * camCoords.y) + (camCoords.z * camCoords.z)) + if len ~= 0 then camCoords = camCoords / len end + + SetEntityVelocity(plyPed, vec3(0)) + + local isShiftPressed, isCtrlPressed = IsControlPressed(0, 21), IsControlPressed(0, 326) + + local noclipVelocity = isShiftPressed and isCtrlPressed and Config.NoclipSpeed + or isShiftPressed and Config.NoclipSpeed * 2.0 + or isCtrlPressed and Config.NoclipSpeed / 2.0 + or Config.NoclipSpeed + + if IsControlPressed(0, 32) then plyCoords += noclipVelocity * camCoords end + if IsControlPressed(0, 269) then plyCoords -= noclipVelocity * camCoords end + + SetEntityCoordsNoOffset(plyPed, plyCoords, true, true, true) + + Wait(0) + end + end) + + GameNotification(i18nU('admin_noclipon')) + else + local plyPed = PlayerPedId() + + FreezeEntityPosition(plyPed, false) + SetEntityInvincible(plyPed, false) + SetEntityCollision(plyPed, true, true) + + SetEntityVisible(plyPed, true, false) + + local playerId = PlayerId() + SetEveryoneIgnorePlayer(playerId, false) + SetPoliceIgnorePlayer(playerId, false) + + GameNotification(i18nU('admin_noclipoff')) + end + + RageUI.CloseAll() + end + }, + { + id = 'godmode', + name = i18nU('admin_godmode_button'), + groups = {'_dev', 'owner', 'superadmin'}, + command = function() + PlayerVars.godmode = not PlayerVars.godmode + + if PlayerVars.godmode then + SetEntityInvincible(plyPed, true) + GameNotification(i18nU('admin_godmodeon')) + else + SetEntityInvincible(plyPed, false) + GameNotification(i18nU('admin_godmodeoff')) + end + end + }, + { + id = 'ghostmode', + name = i18nU('admin_ghostmode_button'), + groups = {'_dev', 'owner', 'superadmin'}, + command = function() + PlayerVars.ghostmode = not PlayerVars.ghostmode + + if PlayerVars.ghostmode then + SetEntityVisible(plyPed, false, false) + GameNotification(i18nU('admin_ghoston')) + else + SetEntityVisible(plyPed, true, false) + GameNotification(i18nU('admin_ghostoff')) + end + end + }, + { + id = 'spawnveh', + name = i18nU('admin_spawnveh_button'), + groups = {'_dev', 'owner', 'superadmin'}, + command = function() + local modelName = KeyboardInput('PM_BOX_VEHICLE_NAME', i18nU('dialogbox_vehiclespawner'), '', 50) + if not modelName then return end + + modelName = tostring(modelName) + if type(modelName) ~= 'string' then return end + + ESX.Game.SpawnVehicle(modelName, GetEntityCoords(plyPed), GetEntityHeading(plyPed), function(vehicle) + TaskWarpPedIntoVehicle(plyPed, vehicle, -1) + end) + + RageUI.CloseAll() + end + }, + { + id = 'repairveh', + name = i18nU('admin_repairveh_button'), + groups = {'_dev', 'owner', 'superadmin', 'admin'}, + command = function() + local plyVeh = GetVehiclePedIsIn(plyPed, false) + SetVehicleFixed(plyVeh) + SetVehicleDirtLevel(plyVeh, 0.0) + end + }, + { + id = 'flipveh', + name = i18nU('admin_flipveh_button'), + groups = {'_dev', 'owner', 'superadmin', 'admin'}, + command = function() + local plyCoords = GetEntityCoords(plyPed) + local closestVeh = GetClosestVehicle(plyCoords, 10.0, 0, 70) + + SetVehicleOnGroundProperly(closestVeh) + GameNotification(i18nU('admin_vehicleflip')) + end + }, + { + id = 'givemoney', + name = i18nU('admin_givemoney_button'), + groups = {'_dev', 'owner', 'superadmin'}, + command = function() + local amount = KeyboardInput('PM_BOX_AMOUNT', i18nU('dialogbox_amount'), '', 8) + if not amount then return end + + amount = tonumber(amount) + if type(amount) ~= 'number' then return end + + TriggerServerEvent('krz_personalmenu:Admin_giveCash', amount) + RageUI.CloseAll() + end + }, + { + id = 'givebank', + name = i18nU('admin_givebank_button'), + groups = {'_dev', 'owner', 'superadmin'}, + command = function() + local amount = KeyboardInput('PM_BOX_AMOUNT', i18nU('dialogbox_amount'), '', 8) + if not amount then return end + + amount = tonumber(amount) + if type(amount) ~= 'number' then return end + + TriggerServerEvent('krz_personalmenu:Admin_giveBank', amount) + RageUI.CloseAll() + end + }, + { + id = 'givedirtymoney', + name = i18nU('admin_givedirtymoney_button'), + groups = {'_dev', 'owner', 'superadmin'}, + command = function() + local amount = KeyboardInput('PM_BOX_AMOUNT', i18nU('dialogbox_amount'), '', 8) + if not amount then return end + + amount = tonumber(amount) + if type(amount) ~= 'number' then return end + + TriggerServerEvent('krz_personalmenu:Admin_giveDirtyMoney', amount) + RageUI.CloseAll() + end + }, + { + id = 'showxyz', + name = i18nU('admin_showxyz_button'), + groups = {'_dev', 'owner', 'superadmin', 'admin', 'mod'}, + command = function() + PlayerVars.showCoords = not PlayerVars.showCoords + end + }, + { + id = 'showname', + name = i18nU('admin_showname_button'), + groups = {'_dev', 'owner', 'superadmin', 'admin', 'mod'}, + command = function() + PlayerVars.showName = not PlayerVars.showName + + if not PlayerVars.showName then + for i = 1, #activeTags do + local tag = activeTags[i] + + if IsMpGamerTagActive(tag.handle) then + RemoveMpGamerTag(tag.handle) + end + end + + activeTags = {} + table.wipe(activeTagsMutex) + end + end + }, + { + id = 'tpmarker', + name = i18nU('admin_tpmarker_button'), + groups = {'_dev', 'owner', 'superadmin', 'admin'}, + command = function() + tpMarker() + end + }, + { + id = 'revive', + name = i18nU('admin_revive_button'), + groups = {'_dev', 'owner', 'superadmin', 'admin'}, + command = function() + local targetServerId = KeyboardInput('PM_BOX_ID', i18nU('dialogbox_playerid'), '', 8) + if not targetServerId then return end + + targetServerId = tonumber(targetServerId) + if type(targetServerId) ~= 'number' then return end + + TriggerServerEvent('esx_ambulancejob:revive', targetServerId) + RageUI.CloseAll() + end + }, + { + id = 'changeskin', + name = i18nU('admin_changeskin_button'), + groups = {'_dev', 'owner', 'superadmin'}, + command = function() + RageUI.CloseAll() + Wait(100) + TriggerEvent('esx_skin:openSaveableMenu') + end + }, + { + id = 'saveskin', + name = i18nU('admin_saveskin_button'), + groups = {'_dev', 'owner', 'superadmin'}, + command = function() + TriggerEvent('esx_skin:requestSaveSkin') + end + } } diff --git a/dependencies/menu/Menu.lua b/dependencies/menu/Menu.lua index 6cecc69..a411922 100644 --- a/dependencies/menu/Menu.lua +++ b/dependencies/menu/Menu.lua @@ -12,58 +12,58 @@ ---@return table ---@public function RageUI.CreateMenu(Title, Subtitle, X, Y, TextureDictionary, TextureName, R, G, B, A) - ---@type table - local Menu = {} - Menu.InstructionalButtons = {} - Menu.Title = Title or "" - Menu.Subtitle = Subtitle or "" - Menu.SubtitleHeight = -37 - Menu.Description = nil - Menu.DescriptionHeight = RageUI.Settings.Items.Description.Background.Height - Menu.X = X or 0 - Menu.Y = Y or 0 - Menu.Parent = nil - Menu.WidthOffset = 0 - Menu.Open = false - Menu.Controls = RageUI.Settings.Controls - Menu.Index = 1 - Menu.Sprite = { Dictionary = TextureDictionary or "commonmenu", Texture = TextureName or "interaction_bgd", Color = { R = R, G = G, B = B, A = A } } - Menu.Rectangle = nil - Menu.Pagination = { Minimum = 1, Maximum = 10, Total = 10 } - Menu.Safezone = true - Menu.SafeZoneSize = { X = 0, Y = 0 } - Menu.EnableMouse = false - Menu.Options = 0 - Menu.Closable = true - Menu.InstructionalScaleform = RequestScaleformMovie("INSTRUCTIONAL_BUTTONS") - - if string.starts(Menu.Subtitle, "~") then - Menu.PageCounterColour = string.sub(Menu.Subtitle, 1, 3) - else - Menu.PageCounterColour = "" - end - - if Menu.Subtitle ~= "" then - local SubtitleLineCount = GetLineCount(Menu.Subtitle, Menu.X + RageUI.Settings.Items.Subtitle.Text.X, Menu.Y + RageUI.Settings.Items.Subtitle.Text.Y, 0, RageUI.Settings.Items.Subtitle.Text.Scale, 245, 245, 245, 255, nil, false, false, RageUI.Settings.Items.Subtitle.Background.Width + Menu.WidthOffset) - - if SubtitleLineCount > 1 then - Menu.SubtitleHeight = 18 * SubtitleLineCount - else - Menu.SubtitleHeight = 0 - end - end - - Citizen.CreateThread(function() - if not HasScaleformMovieLoaded(Menu.InstructionalScaleform) then - Menu.InstructionalScaleform = RequestScaleformMovie("INSTRUCTIONAL_BUTTONS") - - while not HasScaleformMovieLoaded(Menu.InstructionalScaleform) do - Citizen.Wait(0) - end - end - end) - - return setmetatable(Menu, RageUI.Menus) + ---@type table + local Menu = {} + Menu.InstructionalButtons = {} + Menu.Title = Title or "" + Menu.Subtitle = Subtitle or "" + Menu.SubtitleHeight = -37 + Menu.Description = nil + Menu.DescriptionHeight = RageUI.Settings.Items.Description.Background.Height + Menu.X = X or 0 + Menu.Y = Y or 0 + Menu.Parent = nil + Menu.WidthOffset = 0 + Menu.Open = false + Menu.Controls = RageUI.Settings.Controls + Menu.Index = 1 + Menu.Sprite = { Dictionary = TextureDictionary or "commonmenu", Texture = TextureName or "interaction_bgd", Color = { R = R, G = G, B = B, A = A } } + Menu.Rectangle = nil + Menu.Pagination = { Minimum = 1, Maximum = 10, Total = 10 } + Menu.Safezone = true + Menu.SafeZoneSize = { X = 0, Y = 0 } + Menu.EnableMouse = false + Menu.Options = 0 + Menu.Closable = true + Menu.InstructionalScaleform = RequestScaleformMovie("INSTRUCTIONAL_BUTTONS") + + if string.starts(Menu.Subtitle, "~") then + Menu.PageCounterColour = string.sub(Menu.Subtitle, 1, 3) + else + Menu.PageCounterColour = "" + end + + if Menu.Subtitle ~= "" then + local SubtitleLineCount = GetLineCount(Menu.Subtitle, Menu.X + RageUI.Settings.Items.Subtitle.Text.X, Menu.Y + RageUI.Settings.Items.Subtitle.Text.Y, 0, RageUI.Settings.Items.Subtitle.Text.Scale, 245, 245, 245, 255, nil, false, false, RageUI.Settings.Items.Subtitle.Background.Width + Menu.WidthOffset) + + if SubtitleLineCount > 1 then + Menu.SubtitleHeight = 18 * SubtitleLineCount + else + Menu.SubtitleHeight = 0 + end + end + + Citizen.CreateThread(function() + if not HasScaleformMovieLoaded(Menu.InstructionalScaleform) then + Menu.InstructionalScaleform = RequestScaleformMovie("INSTRUCTIONAL_BUTTONS") + + while not HasScaleformMovieLoaded(Menu.InstructionalScaleform) do + Citizen.Wait(0) + end + end + end) + + return setmetatable(Menu, RageUI.Menus) end ---CreateSubMenu @@ -81,60 +81,60 @@ end ---@return table ---@public function RageUI.CreateSubMenu(ParentMenu, Title, Subtitle, X, Y, TextureDictionary, TextureName, R, G, B, A) - if ParentMenu ~= nil then - if ParentMenu() then - ---@type table - local Menu = {} - Menu.InstructionalButtons = {} - Menu.Title = Title or ParentMenu.Title - Menu.Subtitle = Subtitle or ParentMenu.Subtitle - Menu.SubtitleHeight = -37 - Menu.Description = nil - Menu.DescriptionHeight = RageUI.Settings.Items.Description.Background.Height - Menu.X = X or ParentMenu.X - Menu.Y = Y or ParentMenu.Y - Menu.Parent = ParentMenu - Menu.WidthOffset = ParentMenu.WidthOffset - Menu.Open = false - Menu.Controls = RageUI.Settings.Controls - Menu.Index = 1 - Menu.Pagination = { Minimum = 1, Maximum = 10, Total = 10 } - Menu.Safezone = ParentMenu.Safezone - Menu.SafeZoneSize = nil - Menu.EnableMouse = false - Menu.Options = 0 - Menu.Closable = true - Menu.InstructionalScaleform = RequestScaleformMovie("INSTRUCTIONAL_BUTTONS") - - if string.starts(Menu.Subtitle, "~") then - Menu.PageCounterColour = string.sub(Menu.Subtitle, 1, 3) - else - Menu.PageCounterColour = "" - end - - if Menu.Subtitle ~= "" then - local SubtitleLineCount = GetLineCount(Menu.Subtitle, Menu.X + RageUI.Settings.Items.Subtitle.Text.X, Menu.Y + RageUI.Settings.Items.Subtitle.Text.Y, 0, RageUI.Settings.Items.Subtitle.Text.Scale, 245, 245, 245, 255, nil, false, false, RageUI.Settings.Items.Subtitle.Background.Width + Menu.WidthOffset) - - if SubtitleLineCount > 1 then - Menu.SubtitleHeight = 18 * SubtitleLineCount - else - Menu.SubtitleHeight = 0 - end - end - - if ParentMenu.Sprite then - Menu.Sprite = { Dictionary = TextureDictionary or ParentMenu.Sprite.Dictionary, Texture = TextureName or ParentMenu.Sprite.Texture, Color = { R = R or ParentMenu.Sprite.Color.R, G = G or ParentMenu.Sprite.Color.G, B = B or ParentMenu.Sprite.Color.B, A = A or ParentMenu.Sprite.Color.A } } - else - Menu.Rectangle = ParentMenu.Rectangle - end - - return setmetatable(Menu, RageUI.Menus) - else - return - end - else - return - end + if ParentMenu ~= nil then + if ParentMenu() then + ---@type table + local Menu = {} + Menu.InstructionalButtons = {} + Menu.Title = Title or ParentMenu.Title + Menu.Subtitle = Subtitle or ParentMenu.Subtitle + Menu.SubtitleHeight = -37 + Menu.Description = nil + Menu.DescriptionHeight = RageUI.Settings.Items.Description.Background.Height + Menu.X = X or ParentMenu.X + Menu.Y = Y or ParentMenu.Y + Menu.Parent = ParentMenu + Menu.WidthOffset = ParentMenu.WidthOffset + Menu.Open = false + Menu.Controls = RageUI.Settings.Controls + Menu.Index = 1 + Menu.Pagination = { Minimum = 1, Maximum = 10, Total = 10 } + Menu.Safezone = ParentMenu.Safezone + Menu.SafeZoneSize = nil + Menu.EnableMouse = false + Menu.Options = 0 + Menu.Closable = true + Menu.InstructionalScaleform = RequestScaleformMovie("INSTRUCTIONAL_BUTTONS") + + if string.starts(Menu.Subtitle, "~") then + Menu.PageCounterColour = string.sub(Menu.Subtitle, 1, 3) + else + Menu.PageCounterColour = "" + end + + if Menu.Subtitle ~= "" then + local SubtitleLineCount = GetLineCount(Menu.Subtitle, Menu.X + RageUI.Settings.Items.Subtitle.Text.X, Menu.Y + RageUI.Settings.Items.Subtitle.Text.Y, 0, RageUI.Settings.Items.Subtitle.Text.Scale, 245, 245, 245, 255, nil, false, false, RageUI.Settings.Items.Subtitle.Background.Width + Menu.WidthOffset) + + if SubtitleLineCount > 1 then + Menu.SubtitleHeight = 18 * SubtitleLineCount + else + Menu.SubtitleHeight = 0 + end + end + + if ParentMenu.Sprite then + Menu.Sprite = { Dictionary = TextureDictionary or ParentMenu.Sprite.Dictionary, Texture = TextureName or ParentMenu.Sprite.Texture, Color = { R = R or ParentMenu.Sprite.Color.R, G = G or ParentMenu.Sprite.Color.G, B = B or ParentMenu.Sprite.Color.B, A = A or ParentMenu.Sprite.Color.A } } + else + Menu.Rectangle = ParentMenu.Rectangle + end + + return setmetatable(Menu, RageUI.Menus) + else + return + end + else + return + end end ---SetTitle @@ -142,14 +142,14 @@ end ---@return void ---@public function RageUI.Menus:SetTitle(Title) - self.Title = Title + self.Title = Title end ---RefreshIndex ---@return void ---@public function RageUI.Menus:RefreshIndex() - self.Index = 1 + self.Index = 1 end ---SetSubtitle @@ -157,26 +157,26 @@ end ---@return void ---@public function RageUI.Menus:SetSubtitle(Subtitle) - self.Subtitle = Subtitle or self.Subtitle - - if string.starts(self.Subtitle, "~") then - self.PageCounterColour = string.sub(self.Subtitle, 1, 3) - else - self.PageCounterColour = "" - end - - if self.Subtitle ~= "" then - local SubtitleLineCount = GetLineCount(self.Subtitle, self.X + RageUI.Settings.Items.Subtitle.Text.X, self.Y + RageUI.Settings.Items.Subtitle.Text.Y, 0, RageUI.Settings.Items.Subtitle.Text.Scale, 245, 245, 245, 255, nil, false, false, RageUI.Settings.Items.Subtitle.Background.Width + self.WidthOffset) - - if SubtitleLineCount > 1 then - self.SubtitleHeight = 18 * SubtitleLineCount - else - self.SubtitleHeight = 0 - end - - else - self.SubtitleHeight = -37 - end + self.Subtitle = Subtitle or self.Subtitle + + if string.starts(self.Subtitle, "~") then + self.PageCounterColour = string.sub(self.Subtitle, 1, 3) + else + self.PageCounterColour = "" + end + + if self.Subtitle ~= "" then + local SubtitleLineCount = GetLineCount(self.Subtitle, self.X + RageUI.Settings.Items.Subtitle.Text.X, self.Y + RageUI.Settings.Items.Subtitle.Text.Y, 0, RageUI.Settings.Items.Subtitle.Text.Scale, 245, 245, 245, 255, nil, false, false, RageUI.Settings.Items.Subtitle.Background.Width + self.WidthOffset) + + if SubtitleLineCount > 1 then + self.SubtitleHeight = 18 * SubtitleLineCount + else + self.SubtitleHeight = 0 + end + + else + self.SubtitleHeight = -37 + end end ---PageCounter @@ -184,7 +184,7 @@ end ---@return void ---@public function RageUI.Menus:SetPageCounter(Subtitle) - self.PageCounter = Subtitle + self.PageCounter = Subtitle end ---EditSpriteColor @@ -192,9 +192,9 @@ end ---@return void ---@public function RageUI.Menus:EditSpriteColor(color) - if self.Sprite.Dictionary == "commonmenu" then - self.Sprite.Color = color - end + if self.Sprite.Dictionary == "commonmenu" then + self.Sprite.Color = color + end end ---SetPosition @@ -203,8 +203,8 @@ end ---@return void ---@public function RageUI.Menus:SetPosition(X, Y) - self.X = tonumber(X) or self.X - self.Y = tonumber(Y) or self.Y + self.X = tonumber(X) or self.X + self.Y = tonumber(Y) or self.Y end ---SetTotalItemsPerPage @@ -212,7 +212,7 @@ end ---@return void ---@public function RageUI.Menus:SetTotalItemsPerPage(Value) - self.Pagination.Total = tonumber(Value) or self.Pagination.Total + self.Pagination.Total = tonumber(Value) or self.Pagination.Total end ---SetRectangleBanner @@ -223,8 +223,8 @@ end ---@return void ---@public function RageUI.Menus:SetRectangleBanner(R, G, B, A) - self.Rectangle = { R = tonumber(R) or 255, G = tonumber(G) or 255, B = tonumber(B) or 255, A = tonumber(A) or 255 } - self.Sprite = nil + self.Rectangle = { R = tonumber(R) or 255, G = tonumber(G) or 255, B = tonumber(B) or 255, A = tonumber(A) or 255 } + self.Sprite = nil end ---SetSpriteBanner @@ -233,91 +233,91 @@ end ---@return void ---@public function RageUI.Menus:SetSpriteBanner(TextureDictionary, Texture) - self.Sprite = { Dictionary = TextureDictionary or "commonmenu", Texture = Texture or "interaction_bgd" } - self.Rectangle = nil + self.Sprite = { Dictionary = TextureDictionary or "commonmenu", Texture = Texture or "interaction_bgd" } + self.Rectangle = nil end function RageUI.Menus:Closable(boolean) - if type(boolean) == "boolean" then - self.Closable = boolean - else - error("Type is not boolean") - end + if type(boolean) == "boolean" then + self.Closable = boolean + else + error("Type is not boolean") + end end function RageUI.Menus:AddInstructionButton(button) - if type(button) == "table" and #button == 2 then - table.insert(self.InstructionalButtons, button) - self.UpdateInstructionalButtons(true) - end + if type(button) == "table" and #button == 2 then + table.insert(self.InstructionalButtons, button) + self.UpdateInstructionalButtons(true) + end end function RageUI.Menus:RemoveInstructionButton(button) - if type(button) == "table" then - for i = 1, #self.InstructionalButtons do - if button == self.InstructionalButtons[i] then - table.remove(self.InstructionalButtons, i) - self.UpdateInstructionalButtons(true) - break - end - end - else - if tonumber(button) then - if self.InstructionalButtons[tonumber(button)] then - table.remove(self.InstructionalButtons, tonumber(button)) - self.UpdateInstructionalButtons(true) - end - end - end + if type(button) == "table" then + for i = 1, #self.InstructionalButtons do + if button == self.InstructionalButtons[i] then + table.remove(self.InstructionalButtons, i) + self.UpdateInstructionalButtons(true) + break + end + end + else + if tonumber(button) then + if self.InstructionalButtons[tonumber(button)] then + table.remove(self.InstructionalButtons, tonumber(button)) + self.UpdateInstructionalButtons(true) + end + end + end end function RageUI.Menus:UpdateInstructionalButtons(Visible) - if not Visible then - return - end - - BeginScaleformMovieMethod(self.InstructionalScaleform, "CLEAR_ALL") - EndScaleformMovieMethod() - - BeginScaleformMovieMethod(self.InstructionalScaleform, "TOGGLE_MOUSE_BUTTONS") - ScaleformMovieMethodAddParamInt(0) - EndScaleformMovieMethod() - - BeginScaleformMovieMethod(self.InstructionalScaleform, "CREATE_CONTAINER") - EndScaleformMovieMethod() - - BeginScaleformMovieMethod(self.InstructionalScaleform, "SET_DATA_SLOT") - ScaleformMovieMethodAddParamInt(0) - ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(2, 176, 0)) - ScaleformMovieMethodAddParamTextureNameString(GetLabelText("HUD_INPUT2")) - EndScaleformMovieMethod() - - if self.Closable then - BeginScaleformMovieMethod(self.InstructionalScaleform, "SET_DATA_SLOT") - ScaleformMovieMethodAddParamInt(1) - ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(2, 177, 0)) - ScaleformMovieMethodAddParamTextureNameString(GetLabelText("HUD_INPUT3")) - EndScaleformMovieMethod() - end - - local count = 2 - - if (self.InstructionalButtons ~= nil) then - for i = 1, #self.InstructionalButtons do - if self.InstructionalButtons[i] then - if #self.InstructionalButtons[i] == 2 then - BeginScaleformMovieMethod(self.InstructionalScaleform, "SET_DATA_SLOT") - ScaleformMovieMethodAddParamInt(count) - ScaleformMovieMethodAddParamPlayerNameString(self.InstructionalButtons[i][1]) - ScaleformMovieMethodAddParamTextureNameString(self.InstructionalButtons[i][2]) - EndScaleformMovieMethod() - count = count + 1 - end - end - end - end - - BeginScaleformMovieMethod(self.InstructionalScaleform, "DRAW_INSTRUCTIONAL_BUTTONS") - ScaleformMovieMethodAddParamInt(-1) - EndScaleformMovieMethod() + if not Visible then + return + end + + BeginScaleformMovieMethod(self.InstructionalScaleform, "CLEAR_ALL") + EndScaleformMovieMethod() + + BeginScaleformMovieMethod(self.InstructionalScaleform, "TOGGLE_MOUSE_BUTTONS") + ScaleformMovieMethodAddParamInt(0) + EndScaleformMovieMethod() + + BeginScaleformMovieMethod(self.InstructionalScaleform, "CREATE_CONTAINER") + EndScaleformMovieMethod() + + BeginScaleformMovieMethod(self.InstructionalScaleform, "SET_DATA_SLOT") + ScaleformMovieMethodAddParamInt(0) + ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(2, 176, 0)) + ScaleformMovieMethodAddParamTextureNameString(GetLabelText("HUD_INPUT2")) + EndScaleformMovieMethod() + + if self.Closable then + BeginScaleformMovieMethod(self.InstructionalScaleform, "SET_DATA_SLOT") + ScaleformMovieMethodAddParamInt(1) + ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(2, 177, 0)) + ScaleformMovieMethodAddParamTextureNameString(GetLabelText("HUD_INPUT3")) + EndScaleformMovieMethod() + end + + local count = 2 + + if (self.InstructionalButtons ~= nil) then + for i = 1, #self.InstructionalButtons do + if self.InstructionalButtons[i] then + if #self.InstructionalButtons[i] == 2 then + BeginScaleformMovieMethod(self.InstructionalScaleform, "SET_DATA_SLOT") + ScaleformMovieMethodAddParamInt(count) + ScaleformMovieMethodAddParamPlayerNameString(self.InstructionalButtons[i][1]) + ScaleformMovieMethodAddParamTextureNameString(self.InstructionalButtons[i][2]) + EndScaleformMovieMethod() + count = count + 1 + end + end + end + end + + BeginScaleformMovieMethod(self.InstructionalScaleform, "DRAW_INSTRUCTIONAL_BUTTONS") + ScaleformMovieMethodAddParamInt(-1) + EndScaleformMovieMethod() end \ No newline at end of file diff --git a/dependencies/menu/MenuController.lua b/dependencies/menu/MenuController.lua index 5757890..c708b0a 100644 --- a/dependencies/menu/MenuController.lua +++ b/dependencies/menu/MenuController.lua @@ -6,50 +6,50 @@ ---@return number ---@public function RageUI.IsMouseInBounds(X, Y, Width, Height) - local MX, MY = math.round(GetControlNormal(0, 239) * 1920) / 1920, math.round(GetControlNormal(0, 240) * 1080) / 1080 - X, Y = X / 1920, Y / 1080 - Width, Height = Width / 1920, Height / 1080 + local MX, MY = math.round(GetControlNormal(0, 239) * 1920) / 1920, math.round(GetControlNormal(0, 240) * 1080) / 1080 + X, Y = X / 1920, Y / 1080 + Width, Height = Width / 1920, Height / 1080 - return (MX >= X and MX <= X + Width) and (MY > Y and MY < Y + Height) + return (MX >= X and MX <= X + Width) and (MY > Y and MY < Y + Height) end ---GetSafeZoneBounds ---@return table ---@public function RageUI.GetSafeZoneBounds() - local SafeSize = GetSafeZoneSize() - SafeSize = math.round(SafeSize, 2) - SafeSize = (SafeSize * 100) - 90 - SafeSize = 10 - SafeSize - local W, H = 1920, 1080 + local SafeSize = GetSafeZoneSize() + SafeSize = math.round(SafeSize, 2) + SafeSize = (SafeSize * 100) - 90 + SafeSize = 10 - SafeSize + local W, H = 1920, 1080 - return { X = math.round(SafeSize * ((W / H) * 5.4)), Y = math.round(SafeSize * 5.4) } + return { X = math.round(SafeSize * ((W / H) * 5.4)), Y = math.round(SafeSize * 5.4) } end ---GoBack ---@return void ---@public function RageUI.GoBack() - if RageUI.CurrentMenu ~= nil then - local Audio = RageUI.Settings.Audio - RageUI.PlaySound(Audio[Audio.Use].Back.audioName, Audio[Audio.Use].Back.audioRef) - - if RageUI.CurrentMenu.Closed ~= nil then - RageUI.CurrentMenu.Closed() - end - - if RageUI.CurrentMenu.Parent ~= nil then - if RageUI.CurrentMenu.Parent() then - RageUI.NextMenu = RageUI.CurrentMenu.Parent - else - RageUI.NextMenu = nil - RageUI.Visible(RageUI.CurrentMenu, false) - end - else - RageUI.NextMenu = nil - RageUI.Visible(RageUI.CurrentMenu, false) - end - end + if RageUI.CurrentMenu ~= nil then + local Audio = RageUI.Settings.Audio + RageUI.PlaySound(Audio[Audio.Use].Back.audioName, Audio[Audio.Use].Back.audioRef) + + if RageUI.CurrentMenu.Closed ~= nil then + RageUI.CurrentMenu.Closed() + end + + if RageUI.CurrentMenu.Parent ~= nil then + if RageUI.CurrentMenu.Parent() then + RageUI.NextMenu = RageUI.CurrentMenu.Parent + else + RageUI.NextMenu = nil + RageUI.Visible(RageUI.CurrentMenu, false) + end + else + RageUI.NextMenu = nil + RageUI.Visible(RageUI.CurrentMenu, false) + end + end end ---GoUp @@ -57,43 +57,43 @@ end ---@return void ---@public function RageUI.GoUp(Options) - if RageUI.CurrentMenu ~= nil then - Options = RageUI.CurrentMenu.Options - - if RageUI.CurrentMenu() then - if (Options ~= 0) then - if Options > RageUI.CurrentMenu.Pagination.Total then - if RageUI.CurrentMenu.Index <= RageUI.CurrentMenu.Pagination.Minimum then - if RageUI.CurrentMenu.Index == 1 then - RageUI.CurrentMenu.Pagination.Minimum = Options - (RageUI.CurrentMenu.Pagination.Total - 1) - RageUI.CurrentMenu.Pagination.Maximum = Options - RageUI.CurrentMenu.Index = Options - else - RageUI.CurrentMenu.Pagination.Minimum = RageUI.CurrentMenu.Pagination.Minimum - 1 - RageUI.CurrentMenu.Pagination.Maximum = RageUI.CurrentMenu.Pagination.Maximum - 1 - RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index - 1 - end - else - RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index - 1 - end - else - if RageUI.CurrentMenu.Index == 1 then - RageUI.CurrentMenu.Pagination.Minimum = Options - (RageUI.CurrentMenu.Pagination.Total - 1) - RageUI.CurrentMenu.Pagination.Maximum = Options - RageUI.CurrentMenu.Index = Options - else - RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index - 1 - end - end - - local Audio = RageUI.Settings.Audio - RageUI.PlaySound(Audio[Audio.Use].UpDown.audioName, Audio[Audio.Use].UpDown.audioRef) - else - local Audio = RageUI.Settings.Audio - RageUI.PlaySound(Audio[Audio.Use].Error.audioName, Audio[Audio.Use].Error.audioRef) - end - end - end + if RageUI.CurrentMenu ~= nil then + Options = RageUI.CurrentMenu.Options + + if RageUI.CurrentMenu() then + if (Options ~= 0) then + if Options > RageUI.CurrentMenu.Pagination.Total then + if RageUI.CurrentMenu.Index <= RageUI.CurrentMenu.Pagination.Minimum then + if RageUI.CurrentMenu.Index == 1 then + RageUI.CurrentMenu.Pagination.Minimum = Options - (RageUI.CurrentMenu.Pagination.Total - 1) + RageUI.CurrentMenu.Pagination.Maximum = Options + RageUI.CurrentMenu.Index = Options + else + RageUI.CurrentMenu.Pagination.Minimum = RageUI.CurrentMenu.Pagination.Minimum - 1 + RageUI.CurrentMenu.Pagination.Maximum = RageUI.CurrentMenu.Pagination.Maximum - 1 + RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index - 1 + end + else + RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index - 1 + end + else + if RageUI.CurrentMenu.Index == 1 then + RageUI.CurrentMenu.Pagination.Minimum = Options - (RageUI.CurrentMenu.Pagination.Total - 1) + RageUI.CurrentMenu.Pagination.Maximum = Options + RageUI.CurrentMenu.Index = Options + else + RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index - 1 + end + end + + local Audio = RageUI.Settings.Audio + RageUI.PlaySound(Audio[Audio.Use].UpDown.audioName, Audio[Audio.Use].UpDown.audioRef) + else + local Audio = RageUI.Settings.Audio + RageUI.PlaySound(Audio[Audio.Use].Error.audioName, Audio[Audio.Use].Error.audioRef) + end + end + end end ---GoDown @@ -101,356 +101,356 @@ end ---@return void ---@public function RageUI.GoDown(Options) - if RageUI.CurrentMenu ~= nil then - Options = RageUI.CurrentMenu.Options - - if RageUI.CurrentMenu() then - if (Options ~= 0) then - if Options > RageUI.CurrentMenu.Pagination.Total then - if RageUI.CurrentMenu.Index >= RageUI.CurrentMenu.Pagination.Maximum then - if RageUI.CurrentMenu.Index == Options then - RageUI.CurrentMenu.Pagination.Minimum = 1 - RageUI.CurrentMenu.Pagination.Maximum = RageUI.CurrentMenu.Pagination.Total - RageUI.CurrentMenu.Index = 1 - else - RageUI.CurrentMenu.Pagination.Maximum = RageUI.CurrentMenu.Pagination.Maximum + 1 - RageUI.CurrentMenu.Pagination.Minimum = RageUI.CurrentMenu.Pagination.Maximum - (RageUI.CurrentMenu.Pagination.Total - 1) - RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index + 1 - end - else - RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index + 1 - end - else - if RageUI.CurrentMenu.Index == Options then - RageUI.CurrentMenu.Pagination.Minimum = 1 - RageUI.CurrentMenu.Pagination.Maximum = RageUI.CurrentMenu.Pagination.Total - RageUI.CurrentMenu.Index = 1 - else - RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index + 1 - end - end - - local Audio = RageUI.Settings.Audio - RageUI.PlaySound(Audio[Audio.Use].UpDown.audioName, Audio[Audio.Use].UpDown.audioRef) - else - local Audio = RageUI.Settings.Audio - RageUI.PlaySound(Audio[Audio.Use].Error.audioName, Audio[Audio.Use].Error.audioRef) - end - end - end + if RageUI.CurrentMenu ~= nil then + Options = RageUI.CurrentMenu.Options + + if RageUI.CurrentMenu() then + if (Options ~= 0) then + if Options > RageUI.CurrentMenu.Pagination.Total then + if RageUI.CurrentMenu.Index >= RageUI.CurrentMenu.Pagination.Maximum then + if RageUI.CurrentMenu.Index == Options then + RageUI.CurrentMenu.Pagination.Minimum = 1 + RageUI.CurrentMenu.Pagination.Maximum = RageUI.CurrentMenu.Pagination.Total + RageUI.CurrentMenu.Index = 1 + else + RageUI.CurrentMenu.Pagination.Maximum = RageUI.CurrentMenu.Pagination.Maximum + 1 + RageUI.CurrentMenu.Pagination.Minimum = RageUI.CurrentMenu.Pagination.Maximum - (RageUI.CurrentMenu.Pagination.Total - 1) + RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index + 1 + end + else + RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index + 1 + end + else + if RageUI.CurrentMenu.Index == Options then + RageUI.CurrentMenu.Pagination.Minimum = 1 + RageUI.CurrentMenu.Pagination.Maximum = RageUI.CurrentMenu.Pagination.Total + RageUI.CurrentMenu.Index = 1 + else + RageUI.CurrentMenu.Index = RageUI.CurrentMenu.Index + 1 + end + end + + local Audio = RageUI.Settings.Audio + RageUI.PlaySound(Audio[Audio.Use].UpDown.audioName, Audio[Audio.Use].UpDown.audioRef) + else + local Audio = RageUI.Settings.Audio + RageUI.PlaySound(Audio[Audio.Use].Error.audioName, Audio[Audio.Use].Error.audioRef) + end + end + end end function RageUI.GoLeft(Controls) - if Controls.Left.Enabled then - if not Controls.Left.Pressed then - for Index = 1, #Controls.Left.Keys do - if IsDisabledControlJustPressed(Controls.Left.Keys[Index][1], Controls.Left.Keys[Index][2]) then - CreateThread(function() - Controls.Left.Pressed = true - Controls.Left.Active = true - Wait(0) - - Controls.Left.Active = false - Wait(175) - - while Controls.Left.Enabled and IsDisabledControlPressed(Controls.Left.Keys[Index][1], Controls.Left.Keys[Index][2]) do - Controls.Left.Active = true - Wait(0) - - Controls.Left.Active = false - Wait(125) - end - - Controls.Left.Pressed = false - end) - - break - end - end - end - end + if Controls.Left.Enabled then + if not Controls.Left.Pressed then + for Index = 1, #Controls.Left.Keys do + if IsDisabledControlJustPressed(Controls.Left.Keys[Index][1], Controls.Left.Keys[Index][2]) then + CreateThread(function() + Controls.Left.Pressed = true + Controls.Left.Active = true + Wait(0) + + Controls.Left.Active = false + Wait(175) + + while Controls.Left.Enabled and IsDisabledControlPressed(Controls.Left.Keys[Index][1], Controls.Left.Keys[Index][2]) do + Controls.Left.Active = true + Wait(0) + + Controls.Left.Active = false + Wait(125) + end + + Controls.Left.Pressed = false + end) + + break + end + end + end + end end function RageUI.GoRight(Controls) - if Controls.Right.Enabled then - if not Controls.Right.Pressed then - for Index = 1, #Controls.Right.Keys do - if IsDisabledControlJustPressed(Controls.Right.Keys[Index][1], Controls.Right.Keys[Index][2]) then - CreateThread(function() - Controls.Right.Pressed = true - Controls.Right.Active = true - Wait(0) - - Controls.Right.Active = false - Wait(175) - - while Controls.Right.Enabled and IsDisabledControlPressed(Controls.Right.Keys[Index][1], Controls.Right.Keys[Index][2]) do - Controls.Right.Active = true - Wait(0) - - Controls.Right.Active = false - Wait(125) - end - - Controls.Right.Pressed = false - end) - - break - end - end - end - end + if Controls.Right.Enabled then + if not Controls.Right.Pressed then + for Index = 1, #Controls.Right.Keys do + if IsDisabledControlJustPressed(Controls.Right.Keys[Index][1], Controls.Right.Keys[Index][2]) then + CreateThread(function() + Controls.Right.Pressed = true + Controls.Right.Active = true + Wait(0) + + Controls.Right.Active = false + Wait(175) + + while Controls.Right.Enabled and IsDisabledControlPressed(Controls.Right.Keys[Index][1], Controls.Right.Keys[Index][2]) do + Controls.Right.Active = true + Wait(0) + + Controls.Right.Active = false + Wait(125) + end + + Controls.Right.Pressed = false + end) + + break + end + end + end + end end function RageUI.GoSliderLeft(Controls) - if Controls.SliderLeft.Enabled then - if not Controls.SliderLeft.Pressed then - for Index = 1, #Controls.SliderLeft.Keys do - if IsDisabledControlJustPressed(Controls.SliderLeft.Keys[Index][1], Controls.SliderLeft.Keys[Index][2]) then - CreateThread(function() - Controls.SliderLeft.Pressed = true - Controls.SliderLeft.Active = true - Wait(0) - - Controls.SliderLeft.Active = false - - while Controls.SliderLeft.Enabled and IsDisabledControlPressed(Controls.SliderLeft.Keys[Index][1], Controls.SliderLeft.Keys[Index][2]) do - Controls.SliderLeft.Active = true - Wait(0) - - Controls.SliderLeft.Active = false - end - - Controls.SliderLeft.Pressed = false - end) - - break - end - end - end - end + if Controls.SliderLeft.Enabled then + if not Controls.SliderLeft.Pressed then + for Index = 1, #Controls.SliderLeft.Keys do + if IsDisabledControlJustPressed(Controls.SliderLeft.Keys[Index][1], Controls.SliderLeft.Keys[Index][2]) then + CreateThread(function() + Controls.SliderLeft.Pressed = true + Controls.SliderLeft.Active = true + Wait(0) + + Controls.SliderLeft.Active = false + + while Controls.SliderLeft.Enabled and IsDisabledControlPressed(Controls.SliderLeft.Keys[Index][1], Controls.SliderLeft.Keys[Index][2]) do + Controls.SliderLeft.Active = true + Wait(0) + + Controls.SliderLeft.Active = false + end + + Controls.SliderLeft.Pressed = false + end) + + break + end + end + end + end end function RageUI.GoSliderRight(Controls) - if Controls.SliderRight.Enabled then - if not Controls.SliderRight.Pressed then - for Index = 1, #Controls.SliderRight.Keys do - if IsDisabledControlJustPressed(Controls.SliderRight.Keys[Index][1], Controls.SliderRight.Keys[Index][2]) then - CreateThread(function() - Controls.SliderRight.Pressed = true - Controls.SliderRight.Active = true - Wait(0) - - Controls.SliderRight.Active = false - - while Controls.SliderRight.Enabled and IsDisabledControlPressed(Controls.SliderRight.Keys[Index][1], Controls.SliderRight.Keys[Index][2]) do - Controls.SliderRight.Active = true - Wait(0) - - Controls.SliderRight.Active = false - end - - Controls.SliderRight.Pressed = false - end) - - break - end - end - end - end + if Controls.SliderRight.Enabled then + if not Controls.SliderRight.Pressed then + for Index = 1, #Controls.SliderRight.Keys do + if IsDisabledControlJustPressed(Controls.SliderRight.Keys[Index][1], Controls.SliderRight.Keys[Index][2]) then + CreateThread(function() + Controls.SliderRight.Pressed = true + Controls.SliderRight.Active = true + Wait(0) + + Controls.SliderRight.Active = false + + while Controls.SliderRight.Enabled and IsDisabledControlPressed(Controls.SliderRight.Keys[Index][1], Controls.SliderRight.Keys[Index][2]) do + Controls.SliderRight.Active = true + Wait(0) + + Controls.SliderRight.Active = false + end + + Controls.SliderRight.Pressed = false + end) + + break + end + end + end + end end ---Controls ---@return void ---@public function RageUI.Controls() - if RageUI.CurrentMenu ~= nil then - if RageUI.CurrentMenu() then - if RageUI.CurrentMenu.Open then - local Controls = RageUI.CurrentMenu.Controls - - ---@type number - local Options = RageUI.CurrentMenu.Options - RageUI.Options = RageUI.CurrentMenu.Options - - if RageUI.CurrentMenu.EnableMouse then - DisableAllControlActions(2) - end - - if not IsUsingKeyboard(2) then - for Index = 1, #Controls.Enabled.Controller do - EnableControlAction(Controls.Enabled.Controller[Index][1], Controls.Enabled.Controller[Index][2], true) - end - else - for Index = 1, #Controls.Enabled.Keyboard do - EnableControlAction(Controls.Enabled.Keyboard[Index][1], Controls.Enabled.Keyboard[Index][2], true) - end - end - - if Controls.Up.Enabled then - if not Controls.Up.Pressed then - for Index = 1, #Controls.Up.Keys do - if IsDisabledControlJustPressed(Controls.Up.Keys[Index][1], Controls.Up.Keys[Index][2]) then - CreateThread(function() - Controls.Up.Pressed = true - Wait(0) - - RageUI.GoUp(Options) - Wait(175) - - while Controls.Up.Enabled and IsDisabledControlPressed(Controls.Up.Keys[Index][1], Controls.Up.Keys[Index][2]) do - RageUI.GoUp(Options) - Wait(100) - end - - Controls.Up.Pressed = false - end) - - break - end - end - end - end - - if Controls.Down.Enabled then - if not Controls.Down.Pressed then - for Index = 1, #Controls.Down.Keys do - if IsDisabledControlJustPressed(Controls.Down.Keys[Index][1], Controls.Down.Keys[Index][2]) then - CreateThread(function() - Controls.Down.Pressed = true - Wait(0) - - RageUI.GoDown(Options) - Wait(175) - - while Controls.Down.Enabled and IsDisabledControlPressed(Controls.Down.Keys[Index][1], Controls.Down.Keys[Index][2]) do - RageUI.GoDown(Options) - Wait(100) - end - - Controls.Down.Pressed = false - end) - - break - end - end - end - end - - RageUI.GoLeft(Controls) --- Default Left navigation - RageUI.GoRight(Controls) --- Default Right navigation - - RageUI.GoSliderLeft(Controls) - RageUI.GoSliderRight(Controls) - - if Controls.Select.Enabled then - if not Controls.Select.Pressed then - for Index = 1, #Controls.Select.Keys do - if IsDisabledControlJustPressed(Controls.Select.Keys[Index][1], Controls.Select.Keys[Index][2]) then - CreateThread(function() - Controls.Select.Pressed = true - Controls.Select.Active = true - Wait(0) - - Controls.Select.Active = false - Controls.Select.Pressed = false - end) - - break - end - end - end - end - - if Controls.Click.Enabled then - if not Controls.Click.Pressed then - for Index = 1, #Controls.Click.Keys do - if IsDisabledControlJustPressed(Controls.Click.Keys[Index][1], Controls.Click.Keys[Index][2]) then - CreateThread(function() - Controls.Click.Pressed = true - Controls.Click.Active = true - Wait(0) - - Controls.Click.Active = false - Controls.Click.Pressed = false - end) - - break - end - end - end - end - - if Controls.Back.Enabled then - if not Controls.Back.Pressed then - for Index = 1, #Controls.Back.Keys do - if IsDisabledControlJustPressed(Controls.Back.Keys[Index][1], Controls.Back.Keys[Index][2]) then - Controls.Back.Pressed = true - Wait(10) - break - end - end - end - end - end - end - end + if RageUI.CurrentMenu ~= nil then + if RageUI.CurrentMenu() then + if RageUI.CurrentMenu.Open then + local Controls = RageUI.CurrentMenu.Controls + + ---@type number + local Options = RageUI.CurrentMenu.Options + RageUI.Options = RageUI.CurrentMenu.Options + + if RageUI.CurrentMenu.EnableMouse then + DisableAllControlActions(2) + end + + if not IsUsingKeyboard(2) then + for Index = 1, #Controls.Enabled.Controller do + EnableControlAction(Controls.Enabled.Controller[Index][1], Controls.Enabled.Controller[Index][2], true) + end + else + for Index = 1, #Controls.Enabled.Keyboard do + EnableControlAction(Controls.Enabled.Keyboard[Index][1], Controls.Enabled.Keyboard[Index][2], true) + end + end + + if Controls.Up.Enabled then + if not Controls.Up.Pressed then + for Index = 1, #Controls.Up.Keys do + if IsDisabledControlJustPressed(Controls.Up.Keys[Index][1], Controls.Up.Keys[Index][2]) then + CreateThread(function() + Controls.Up.Pressed = true + Wait(0) + + RageUI.GoUp(Options) + Wait(175) + + while Controls.Up.Enabled and IsDisabledControlPressed(Controls.Up.Keys[Index][1], Controls.Up.Keys[Index][2]) do + RageUI.GoUp(Options) + Wait(100) + end + + Controls.Up.Pressed = false + end) + + break + end + end + end + end + + if Controls.Down.Enabled then + if not Controls.Down.Pressed then + for Index = 1, #Controls.Down.Keys do + if IsDisabledControlJustPressed(Controls.Down.Keys[Index][1], Controls.Down.Keys[Index][2]) then + CreateThread(function() + Controls.Down.Pressed = true + Wait(0) + + RageUI.GoDown(Options) + Wait(175) + + while Controls.Down.Enabled and IsDisabledControlPressed(Controls.Down.Keys[Index][1], Controls.Down.Keys[Index][2]) do + RageUI.GoDown(Options) + Wait(100) + end + + Controls.Down.Pressed = false + end) + + break + end + end + end + end + + RageUI.GoLeft(Controls) --- Default Left navigation + RageUI.GoRight(Controls) --- Default Right navigation + + RageUI.GoSliderLeft(Controls) + RageUI.GoSliderRight(Controls) + + if Controls.Select.Enabled then + if not Controls.Select.Pressed then + for Index = 1, #Controls.Select.Keys do + if IsDisabledControlJustPressed(Controls.Select.Keys[Index][1], Controls.Select.Keys[Index][2]) then + CreateThread(function() + Controls.Select.Pressed = true + Controls.Select.Active = true + Wait(0) + + Controls.Select.Active = false + Controls.Select.Pressed = false + end) + + break + end + end + end + end + + if Controls.Click.Enabled then + if not Controls.Click.Pressed then + for Index = 1, #Controls.Click.Keys do + if IsDisabledControlJustPressed(Controls.Click.Keys[Index][1], Controls.Click.Keys[Index][2]) then + CreateThread(function() + Controls.Click.Pressed = true + Controls.Click.Active = true + Wait(0) + + Controls.Click.Active = false + Controls.Click.Pressed = false + end) + + break + end + end + end + end + + if Controls.Back.Enabled then + if not Controls.Back.Pressed then + for Index = 1, #Controls.Back.Keys do + if IsDisabledControlJustPressed(Controls.Back.Keys[Index][1], Controls.Back.Keys[Index][2]) then + Controls.Back.Pressed = true + Wait(10) + break + end + end + end + end + end + end + end end ---Navigation ---@return void ---@public function RageUI.Navigation() - if RageUI.CurrentMenu ~= nil then - if RageUI.CurrentMenu() then - if RageUI.CurrentMenu.EnableMouse then - ShowCursorThisFrame() - end - - if RageUI.Options > RageUI.CurrentMenu.Pagination.Total then - ---@type boolean - local UpHovered = false - - ---@type boolean - local DownHovered = false - - if RageUI.CurrentMenu.Safezone then - RageUI.CurrentMenu.SafeZoneSize = RageUI.GetSafeZoneBounds() - SetScriptGfxAlign(76, 84) - SetScriptGfxAlignParams(0, 0, 0, 0) - end - - UpHovered = RageUI.IsMouseInBounds(RageUI.CurrentMenu.X + RageUI.CurrentMenu.SafeZoneSize.X, RageUI.CurrentMenu.Y + RageUI.CurrentMenu.SafeZoneSize.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height) - DownHovered = RageUI.IsMouseInBounds(RageUI.CurrentMenu.X + RageUI.CurrentMenu.SafeZoneSize.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Navigation.Rectangle.Height + RageUI.CurrentMenu.SafeZoneSize.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height) - - if RageUI.CurrentMenu.EnableMouse then - if RageUI.CurrentMenu.Controls.Click.Active then - if UpHovered then - RageUI.GoUp(RageUI.Options) - elseif DownHovered then - RageUI.GoDown(RageUI.Options) - end - end - - if UpHovered then - RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 30, 30, 30, 255) - else - RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 0, 0, 0, 200) - end - - if DownHovered then - RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Navigation.Rectangle.Height + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 30, 30, 30, 255) - else - RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Navigation.Rectangle.Height + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 0, 0, 0, 200) - end - else - RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 0, 0, 0, 200) - RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Navigation.Rectangle.Height + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 0, 0, 0, 200) - end - - RenderSprite(RageUI.Settings.Items.Navigation.Arrows.Dictionary, RageUI.Settings.Items.Navigation.Arrows.Texture, RageUI.CurrentMenu.X + RageUI.Settings.Items.Navigation.Arrows.X + (RageUI.CurrentMenu.WidthOffset / 2), RageUI.CurrentMenu.Y + RageUI.Settings.Items.Navigation.Arrows.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Arrows.Width, RageUI.Settings.Items.Navigation.Arrows.Height) - RageUI.ItemOffset = RageUI.ItemOffset + (RageUI.Settings.Items.Navigation.Rectangle.Height * 2) - end - end - end + if RageUI.CurrentMenu ~= nil then + if RageUI.CurrentMenu() then + if RageUI.CurrentMenu.EnableMouse then + ShowCursorThisFrame() + end + + if RageUI.Options > RageUI.CurrentMenu.Pagination.Total then + ---@type boolean + local UpHovered = false + + ---@type boolean + local DownHovered = false + + if RageUI.CurrentMenu.Safezone then + RageUI.CurrentMenu.SafeZoneSize = RageUI.GetSafeZoneBounds() + SetScriptGfxAlign(76, 84) + SetScriptGfxAlignParams(0, 0, 0, 0) + end + + UpHovered = RageUI.IsMouseInBounds(RageUI.CurrentMenu.X + RageUI.CurrentMenu.SafeZoneSize.X, RageUI.CurrentMenu.Y + RageUI.CurrentMenu.SafeZoneSize.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height) + DownHovered = RageUI.IsMouseInBounds(RageUI.CurrentMenu.X + RageUI.CurrentMenu.SafeZoneSize.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Navigation.Rectangle.Height + RageUI.CurrentMenu.SafeZoneSize.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height) + + if RageUI.CurrentMenu.EnableMouse then + if RageUI.CurrentMenu.Controls.Click.Active then + if UpHovered then + RageUI.GoUp(RageUI.Options) + elseif DownHovered then + RageUI.GoDown(RageUI.Options) + end + end + + if UpHovered then + RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 30, 30, 30, 255) + else + RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 0, 0, 0, 200) + end + + if DownHovered then + RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Navigation.Rectangle.Height + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 30, 30, 30, 255) + else + RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Navigation.Rectangle.Height + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 0, 0, 0, 200) + end + else + RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 0, 0, 0, 200) + RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Navigation.Rectangle.Height + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Rectangle.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Navigation.Rectangle.Height, 0, 0, 0, 200) + end + + RenderSprite(RageUI.Settings.Items.Navigation.Arrows.Dictionary, RageUI.Settings.Items.Navigation.Arrows.Texture, RageUI.CurrentMenu.X + RageUI.Settings.Items.Navigation.Arrows.X + (RageUI.CurrentMenu.WidthOffset / 2), RageUI.CurrentMenu.Y + RageUI.Settings.Items.Navigation.Arrows.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Navigation.Arrows.Width, RageUI.Settings.Items.Navigation.Arrows.Height) + RageUI.ItemOffset = RageUI.ItemOffset + (RageUI.Settings.Items.Navigation.Rectangle.Height * 2) + end + end + end end diff --git a/dependencies/menu/RageUI.lua b/dependencies/menu/RageUI.lua index 16b127a..d682619 100644 --- a/dependencies/menu/RageUI.lua +++ b/dependencies/menu/RageUI.lua @@ -7,21 +7,21 @@ RageUI = {} ---@return void ---@public function PlaySound(Library, Sound, IsLooped, Audio) - if not IsLooped then - PlaySoundFrontend(-1, Sound, Library, true) - else - if not Audio.Id then - Citizen.CreateThread(function() - Audio.Id = GetSoundId() - PlaySoundFrontend(Audio.Id, Sound, Library, true) - Citizen.Wait(0.01) - - StopSound(Audio.Id) - ReleaseSoundId(Audio.Id) - Audio.Id = nil - end) - end - end + if not IsLooped then + PlaySoundFrontend(-1, Sound, Library, true) + else + if not Audio.Id then + Citizen.CreateThread(function() + Audio.Id = GetSoundId() + PlaySoundFrontend(Audio.Id, Sound, Library, true) + Citizen.Wait(0.01) + + StopSound(Audio.Id) + ReleaseSoundId(Audio.Id) + Audio.Id = nil + end) + end + end end ---RenderRectangle @@ -36,8 +36,8 @@ end ---@return void ---@public function RenderRectangle(X, Y, Width, Height, R, G, B, A) - local X, Y, Width, Height = (tonumber(X) or 0) / 1920, (tonumber(Y) or 0) / 1080, (tonumber(Width) or 0) / 1920, (tonumber(Height) or 0) / 1080 - DrawRect(X + Width * 0.5, Y + Height * 0.5, Width, Height, tonumber(R) or 255, tonumber(G) or 255, tonumber(B) or 255, tonumber(A) or 255) + local X, Y, Width, Height = (tonumber(X) or 0) / 1920, (tonumber(Y) or 0) / 1080, (tonumber(Width) or 0) / 1920, (tonumber(Height) or 0) / 1080 + DrawRect(X + Width * 0.5, Y + Height * 0.5, Width, Height, tonumber(R) or 255, tonumber(G) or 255, tonumber(B) or 255, tonumber(A) or 255) end ---RenderSprite @@ -55,14 +55,14 @@ end ---@return void ---@public function RenderSprite(TextureDictionary, TextureName, X, Y, Width, Height, Heading, R, G, B, A) - ---@type number - local X, Y, Width, Height = (tonumber(X) or 0) / 1920, (tonumber(Y) or 0) / 1080, (tonumber(Width) or 0) / 1920, (tonumber(Height) or 0) / 1080 + ---@type number + local X, Y, Width, Height = (tonumber(X) or 0) / 1920, (tonumber(Y) or 0) / 1080, (tonumber(Width) or 0) / 1920, (tonumber(Height) or 0) / 1080 - if not HasStreamedTextureDictLoaded(TextureDictionary) then - RequestStreamedTextureDict(TextureDictionary, true) - end + if not HasStreamedTextureDictLoaded(TextureDictionary) then + RequestStreamedTextureDict(TextureDictionary, true) + end - DrawSprite(TextureDictionary, TextureName, X + Width * 0.5, Y + Height * 0.5, Width, Height, Heading or 0, tonumber(R) or 255, tonumber(G) or 255, tonumber(B) or 255, tonumber(A) or 255) + DrawSprite(TextureDictionary, TextureName, X + Width * 0.5, Y + Height * 0.5, Width, Height, Heading or 0, tonumber(R) or 255, tonumber(G) or 255, tonumber(B) or 255, tonumber(A) or 255) end ---MeasureStringWidth @@ -72,11 +72,11 @@ end ---@return number ---@public function MeasureStringWidth(str, font, scale) - BeginTextCommandWidth("CELL_EMAIL_BCON") - AddTextComponentSubstringPlayerName(str) - SetTextFont(font or 0) - SetTextScale(1.0, scale or 0) - return EndTextCommandGetWidth(true) * 1920 + BeginTextCommandWidth("CELL_EMAIL_BCON") + AddTextComponentSubstringPlayerName(str) + SetTextFont(font or 0) + SetTextScale(1.0, scale or 0) + return EndTextCommandGetWidth(true) * 1920 end ---GetCharacterCount @@ -84,14 +84,14 @@ end ---@return number ---@public function GetCharacterCount(Str) - ---@type number - local Chars = 0 + ---@type number + local Chars = 0 - for Char in Str:gmatch("[%z\1-\127\194-\244][\128-\191]*") do - Chars = Chars + 1 - end + for Char in Str:gmatch("[%z\1-\127\194-\244][\128-\191]*") do + Chars = Chars + 1 + end - return Chars + return Chars end ---AddText @@ -99,19 +99,19 @@ end ---@return void ---@public function AddText(Text) - ---@type number - local Characters = GetCharacterCount(Text) - - if Characters < 100 then - AddTextComponentSubstringPlayerName(Text) - else - ---@type number - local StringsNeeded = (Characters % 99 == 0) and Characters / 99 or (Characters / 99) + 1 - - for Index = 0, StringsNeeded do - AddTextComponentSubstringPlayerName(Text:sub(Index * 99, (Index * 99) + 99)) - end - end + ---@type number + local Characters = GetCharacterCount(Text) + + if Characters < 100 then + AddTextComponentSubstringPlayerName(Text) + else + ---@type number + local StringsNeeded = (Characters % 99 == 0) and Characters / 99 or (Characters / 99) + 1 + + for Index = 0, StringsNeeded do + AddTextComponentSubstringPlayerName(Text:sub(Index * 99, (Index * 99) + 99)) + end + end end ---GetLineCount @@ -131,46 +131,46 @@ end ---@return function ---@public function GetLineCount(Text, X, Y, Font, Scale, R, G, B, A, Alignment, DropShadow, Outline, WordWrap) - ---@type table - local Text, X, Y = tostring(Text), (tonumber(X) or 0) / 1920, (tonumber(Y) or 0) / 1080 - - SetTextFont(Font or 0) - SetTextScale(1.0, Scale or 0) - SetTextColour(tonumber(R) or 255, tonumber(G) or 255, tonumber(B) or 255, tonumber(A) or 255) - - if DropShadow then - SetTextDropShadow() - end - - if Outline then - SetTextOutline() - end - - if Alignment ~= nil then - if Alignment == 1 or Alignment == "Center" or Alignment == "Centre" then - SetTextCentre(true) - elseif Alignment == 2 or Alignment == "Right" then - SetTextRightJustify(true) - end - end - - if tonumber(WordWrap) and tonumber(WordWrap) ~= 0 then - if Alignment == 1 or Alignment == "Center" or Alignment == "Centre" then - SetTextWrap(X - ((WordWrap / 1920) / 2), X + ((WordWrap / 1920) / 2)) - elseif Alignment == 2 or Alignment == "Right" then - SetTextWrap(0, X) - else - SetTextWrap(X, X + (WordWrap / 1920)) - end - else - if Alignment == 2 or Alignment == "Right" then - SetTextWrap(0, X) - end - end - - BeginTextCommandLineCount("CELL_EMAIL_BCON") - AddText(Text) - return EndTextCommandGetLineCount(X, Y) + ---@type table + local Text, X, Y = tostring(Text), (tonumber(X) or 0) / 1920, (tonumber(Y) or 0) / 1080 + + SetTextFont(Font or 0) + SetTextScale(1.0, Scale or 0) + SetTextColour(tonumber(R) or 255, tonumber(G) or 255, tonumber(B) or 255, tonumber(A) or 255) + + if DropShadow then + SetTextDropShadow() + end + + if Outline then + SetTextOutline() + end + + if Alignment ~= nil then + if Alignment == 1 or Alignment == "Center" or Alignment == "Centre" then + SetTextCentre(true) + elseif Alignment == 2 or Alignment == "Right" then + SetTextRightJustify(true) + end + end + + if tonumber(WordWrap) and tonumber(WordWrap) ~= 0 then + if Alignment == 1 or Alignment == "Center" or Alignment == "Centre" then + SetTextWrap(X - ((WordWrap / 1920) / 2), X + ((WordWrap / 1920) / 2)) + elseif Alignment == 2 or Alignment == "Right" then + SetTextWrap(0, X) + else + SetTextWrap(X, X + (WordWrap / 1920)) + end + else + if Alignment == 2 or Alignment == "Right" then + SetTextWrap(0, X) + end + end + + BeginTextCommandLineCount("CELL_EMAIL_BCON") + AddText(Text) + return EndTextCommandGetLineCount(X, Y) end ---RenderText @@ -190,46 +190,46 @@ end ---@return void ---@public function RenderText(Text, X, Y, Font, Scale, R, G, B, A, Alignment, DropShadow, Outline, WordWrap) - ---@type table - local Text, X, Y = tostring(Text), (tonumber(X) or 0) / 1920, (tonumber(Y) or 0) / 1080 - - SetTextFont(Font or 0) - SetTextScale(1.0, Scale or 0) - SetTextColour(tonumber(R) or 255, tonumber(G) or 255, tonumber(B) or 255, tonumber(A) or 255) - - if DropShadow then - SetTextDropShadow() - end - - if Outline then - SetTextOutline() - end - - if Alignment ~= nil then - if Alignment == 1 or Alignment == "Center" or Alignment == "Centre" then - SetTextCentre(true) - elseif Alignment == 2 or Alignment == "Right" then - SetTextRightJustify(true) - end - end - - if tonumber(WordWrap) and tonumber(WordWrap) ~= 0 then - if Alignment == 1 or Alignment == "Center" or Alignment == "Centre" then - SetTextWrap(X - ((WordWrap / 1920) / 2), X + ((WordWrap / 1920) / 2)) - elseif Alignment == 2 or Alignment == "Right" then - SetTextWrap(0, X) - else - SetTextWrap(X, X + (WordWrap / 1920)) - end - else - if Alignment == 2 or Alignment == "Right" then - SetTextWrap(0, X) - end - end - - BeginTextCommandDisplayText("CELL_EMAIL_BCON") - AddText(Text) - EndTextCommandDisplayText(X, Y) + ---@type table + local Text, X, Y = tostring(Text), (tonumber(X) or 0) / 1920, (tonumber(Y) or 0) / 1080 + + SetTextFont(Font or 0) + SetTextScale(1.0, Scale or 0) + SetTextColour(tonumber(R) or 255, tonumber(G) or 255, tonumber(B) or 255, tonumber(A) or 255) + + if DropShadow then + SetTextDropShadow() + end + + if Outline then + SetTextOutline() + end + + if Alignment ~= nil then + if Alignment == 1 or Alignment == "Center" or Alignment == "Centre" then + SetTextCentre(true) + elseif Alignment == 2 or Alignment == "Right" then + SetTextRightJustify(true) + end + end + + if tonumber(WordWrap) and tonumber(WordWrap) ~= 0 then + if Alignment == 1 or Alignment == "Center" or Alignment == "Centre" then + SetTextWrap(X - ((WordWrap / 1920) / 2), X + ((WordWrap / 1920) / 2)) + elseif Alignment == 2 or Alignment == "Right" then + SetTextWrap(0, X) + else + SetTextWrap(X, X + (WordWrap / 1920)) + end + else + if Alignment == 2 or Alignment == "Right" then + SetTextWrap(0, X) + end + end + + BeginTextCommandDisplayText("CELL_EMAIL_BCON") + AddText(Text) + EndTextCommandDisplayText(X, Y) end ---round @@ -238,7 +238,7 @@ end ---@return number ---@public function math.round(num, numDecimalPlaces) - return tonumber(string.format("%." .. (numDecimalPlaces or 0) .. "f", num)) + return tonumber(string.format("%." .. (numDecimalPlaces or 0) .. "f", num)) end ---starts @@ -247,7 +247,7 @@ end ---@return number ---@public function string.starts(String, Start) - return string.sub(String, 1, string.len(Start)) == Start + return string.sub(String, 1, string.len(Start)) == Start end ---@type table @@ -256,7 +256,7 @@ RageUI.Menus = setmetatable({}, RageUI.Menus) ---@type table ---@return boolean RageUI.Menus.__call = function() - return true + return true end ---@type table @@ -279,245 +279,245 @@ RageUI.StatisticPanelCount = 0 ---@type table RageUI.Settings = { - Debug = false, - Controls = { - Up = { - Enabled = true, - Active = false, - Pressed = false, - Keys = { - { 0, 172 }, - { 1, 172 }, - { 2, 172 }, - { 0, 241 }, - { 1, 241 }, - { 2, 241 } - } - }, - Down = { - Enabled = true, - Active = false, - Pressed = false, - Keys = { - { 0, 173 }, - { 1, 173 }, - { 2, 173 }, - { 0, 242 }, - { 1, 242 }, - { 2, 242 } - } - }, - Left = { - Enabled = true, - Active = false, - Pressed = false, - Keys = { - { 0, 174 }, - { 1, 174 }, - { 2, 174 } - } - }, - Right = { - Enabled = true, - Pressed = false, - Active = false, - Keys = { - { 0, 175 }, - { 1, 175 }, - { 2, 175 } - } - }, - SliderLeft = { - Enabled = true, - Active = false, - Pressed = false, - Keys = { - { 0, 174 }, - { 1, 174 }, - { 2, 174 } - } - }, - SliderRight = { - Enabled = true, - Pressed = false, - Active = false, - Keys = { - { 0, 175 }, - { 1, 175 }, - { 2, 175 } - } - }, - Select = { - Enabled = true, - Pressed = false, - Active = false, - Keys = { - { 0, 201 }, - { 1, 201 }, - { 2, 201 } - } - }, - Back = { - Enabled = true, - Active = false, - Pressed = false, - Keys = { - { 0, 177 }, - { 1, 177 }, - { 2, 177 }, - { 0, 199 }, - { 1, 199 }, - { 2, 199 } - } - }, - Click = { - Enabled = true, - Active = false, - Pressed = false, - Keys = { - { 0, 24 } - } - }, - Enabled = { - Controller = { - { 0, 2 }, -- Look Up and Down - { 0, 1 }, -- Look Left and Right - { 0, 25 }, -- Aim - { 0, 24 } -- Attack - }, - Keyboard = { - { 0, 201 }, -- Select - { 0, 195 }, -- X axis - { 0, 196 }, -- Y axis - { 0, 187 }, -- Down - { 0, 188 }, -- Up - { 0, 189 }, -- Left - { 0, 190 }, -- Right - { 0, 202 }, -- Back - { 0, 217 }, -- Select - { 0, 242 }, -- Scroll down - { 0, 241 }, -- Scroll up - { 0, 239 }, -- Cursor X - { 0, 240 }, -- Cursor Y - { 0, 31 }, -- Move Up and Down - { 0, 30 }, -- Move Left and Right - { 0, 21 }, -- Sprint - { 0, 22 }, -- Jump - { 0, 23 }, -- Enter - { 0, 75 }, -- Exit Vehicle - { 0, 71 }, -- Accelerate Vehicle - { 0, 72 }, -- Vehicle Brake - { 0, 59 }, -- Move Vehicle Left and Right - { 0, 89 }, -- Fly Yaw Left - { 0, 9 }, -- Fly Left and Right - { 0, 8 }, -- Fly Up and Down - { 0, 90 }, -- Fly Yaw Right - { 0, 76 }, -- Vehicle Handbrake - } - } - }, - Audio = { - Id = nil, - Use = "RageUI", - RageUI = { - UpDown = { - audioName = "HUD_FREEMODE_SOUNDSET", - audioRef = "NAV_UP_DOWN", - }, - LeftRight = { - audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", - audioRef = "NAV_LEFT_RIGHT", - }, - Select = { - audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", - audioRef = "SELECT", - }, - Back = { - audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", - audioRef = "BACK", - }, - Error = { - audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", - audioRef = "ERROR", - }, - Slider = { - audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", - audioRef = "CONTINUOUS_SLIDER", - Id = nil - } - }, - NativeUI = { - UpDown = { - audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", - audioRef = "NAV_UP_DOWN", - }, - LeftRight = { - audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", - audioRef = "NAV_LEFT_RIGHT", - }, - Select = { - audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", - audioRef = "SELECT", - }, - Back = { - audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", - audioRef = "BACK", - }, - Error = { - audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", - audioRef = "ERROR", - }, - Slider = { - audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", - audioRef = "CONTINUOUS_SLIDER", - Id = nil - } - } - }, - Items = { - Title = { - Background = { Width = 431, Height = 97 }, - Text = { X = 215, Y = 20, Scale = 1.15 } - }, - Subtitle = { - Background = { Width = 431, Height = 37 }, - Text = { X = 8, Y = 3, Scale = 0.35 }, - PreText = { X = 425, Y = 3, Scale = 0.35 } - }, - Background = { Dictionary = "commonmenu", Texture = "gradient_bgd", Y = 0, Width = 431 }, - Navigation = { - Rectangle = { Width = 431, Height = 18 }, - Offset = 5, - Arrows = { Dictionary = "commonmenu", Texture = "shop_arrows_upanddown", X = 190, Y = -6, Width = 50, Height = 50 } - }, - Description = { - Bar = { Y = 4, Width = 431, Height = 4 }, - Background = { Dictionary = "commonmenu", Texture = "gradient_bgd", Y = 4, Width = 431, Height = 30 }, - Text = { X = 8, Y = 10, Scale = 0.35 } - } - }, - Panels = { - Grid = { - Background = { Dictionary = "commonmenu", Texture = "gradient_bgd", Y = 4, Width = 431, Height = 275 }, - Grid = { Dictionary = "pause_menu_pages_char_mom_dad", Texture = "nose_grid", X = 115.5, Y = 47.5, Width = 200, Height = 200 }, - Circle = { Dictionary = "mpinventory", Texture = "in_world_circle", X = 115.5, Y = 47.5, Width = 20, Height = 20 }, - Text = { - Top = { X = 215.5, Y = 15, Scale = 0.35 }, - Bottom = { X = 215.5, Y = 250, Scale = 0.35 }, - Left = { X = 57.75, Y = 130, Scale = 0.35 }, - Right = { X = 373.25, Y = 130, Scale = 0.35 } - } - }, - Percentage = { - Background = { Dictionary = "commonmenu", Texture = "gradient_bgd", Y = 4, Width = 431, Height = 76 }, - Bar = { X = 9, Y = 50, Width = 413, Height = 10 }, - Text = { - Left = { X = 25, Y = 15, Scale = 0.35 }, - Middle = { X = 215.5, Y = 15, Scale = 0.35 }, - Right = { X = 398, Y = 15, Scale = 0.35 } - } - } - } + Debug = false, + Controls = { + Up = { + Enabled = true, + Active = false, + Pressed = false, + Keys = { + { 0, 172 }, + { 1, 172 }, + { 2, 172 }, + { 0, 241 }, + { 1, 241 }, + { 2, 241 } + } + }, + Down = { + Enabled = true, + Active = false, + Pressed = false, + Keys = { + { 0, 173 }, + { 1, 173 }, + { 2, 173 }, + { 0, 242 }, + { 1, 242 }, + { 2, 242 } + } + }, + Left = { + Enabled = true, + Active = false, + Pressed = false, + Keys = { + { 0, 174 }, + { 1, 174 }, + { 2, 174 } + } + }, + Right = { + Enabled = true, + Pressed = false, + Active = false, + Keys = { + { 0, 175 }, + { 1, 175 }, + { 2, 175 } + } + }, + SliderLeft = { + Enabled = true, + Active = false, + Pressed = false, + Keys = { + { 0, 174 }, + { 1, 174 }, + { 2, 174 } + } + }, + SliderRight = { + Enabled = true, + Pressed = false, + Active = false, + Keys = { + { 0, 175 }, + { 1, 175 }, + { 2, 175 } + } + }, + Select = { + Enabled = true, + Pressed = false, + Active = false, + Keys = { + { 0, 201 }, + { 1, 201 }, + { 2, 201 } + } + }, + Back = { + Enabled = true, + Active = false, + Pressed = false, + Keys = { + { 0, 177 }, + { 1, 177 }, + { 2, 177 }, + { 0, 199 }, + { 1, 199 }, + { 2, 199 } + } + }, + Click = { + Enabled = true, + Active = false, + Pressed = false, + Keys = { + { 0, 24 } + } + }, + Enabled = { + Controller = { + { 0, 2 }, -- Look Up and Down + { 0, 1 }, -- Look Left and Right + { 0, 25 }, -- Aim + { 0, 24 } -- Attack + }, + Keyboard = { + { 0, 201 }, -- Select + { 0, 195 }, -- X axis + { 0, 196 }, -- Y axis + { 0, 187 }, -- Down + { 0, 188 }, -- Up + { 0, 189 }, -- Left + { 0, 190 }, -- Right + { 0, 202 }, -- Back + { 0, 217 }, -- Select + { 0, 242 }, -- Scroll down + { 0, 241 }, -- Scroll up + { 0, 239 }, -- Cursor X + { 0, 240 }, -- Cursor Y + { 0, 31 }, -- Move Up and Down + { 0, 30 }, -- Move Left and Right + { 0, 21 }, -- Sprint + { 0, 22 }, -- Jump + { 0, 23 }, -- Enter + { 0, 75 }, -- Exit Vehicle + { 0, 71 }, -- Accelerate Vehicle + { 0, 72 }, -- Vehicle Brake + { 0, 59 }, -- Move Vehicle Left and Right + { 0, 89 }, -- Fly Yaw Left + { 0, 9 }, -- Fly Left and Right + { 0, 8 }, -- Fly Up and Down + { 0, 90 }, -- Fly Yaw Right + { 0, 76 }, -- Vehicle Handbrake + } + } + }, + Audio = { + Id = nil, + Use = "RageUI", + RageUI = { + UpDown = { + audioName = "HUD_FREEMODE_SOUNDSET", + audioRef = "NAV_UP_DOWN", + }, + LeftRight = { + audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", + audioRef = "NAV_LEFT_RIGHT", + }, + Select = { + audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", + audioRef = "SELECT", + }, + Back = { + audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", + audioRef = "BACK", + }, + Error = { + audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", + audioRef = "ERROR", + }, + Slider = { + audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", + audioRef = "CONTINUOUS_SLIDER", + Id = nil + } + }, + NativeUI = { + UpDown = { + audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", + audioRef = "NAV_UP_DOWN", + }, + LeftRight = { + audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", + audioRef = "NAV_LEFT_RIGHT", + }, + Select = { + audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", + audioRef = "SELECT", + }, + Back = { + audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", + audioRef = "BACK", + }, + Error = { + audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", + audioRef = "ERROR", + }, + Slider = { + audioName = "HUD_FRONTEND_DEFAULT_SOUNDSET", + audioRef = "CONTINUOUS_SLIDER", + Id = nil + } + } + }, + Items = { + Title = { + Background = { Width = 431, Height = 97 }, + Text = { X = 215, Y = 20, Scale = 1.15 } + }, + Subtitle = { + Background = { Width = 431, Height = 37 }, + Text = { X = 8, Y = 3, Scale = 0.35 }, + PreText = { X = 425, Y = 3, Scale = 0.35 } + }, + Background = { Dictionary = "commonmenu", Texture = "gradient_bgd", Y = 0, Width = 431 }, + Navigation = { + Rectangle = { Width = 431, Height = 18 }, + Offset = 5, + Arrows = { Dictionary = "commonmenu", Texture = "shop_arrows_upanddown", X = 190, Y = -6, Width = 50, Height = 50 } + }, + Description = { + Bar = { Y = 4, Width = 431, Height = 4 }, + Background = { Dictionary = "commonmenu", Texture = "gradient_bgd", Y = 4, Width = 431, Height = 30 }, + Text = { X = 8, Y = 10, Scale = 0.35 } + } + }, + Panels = { + Grid = { + Background = { Dictionary = "commonmenu", Texture = "gradient_bgd", Y = 4, Width = 431, Height = 275 }, + Grid = { Dictionary = "pause_menu_pages_char_mom_dad", Texture = "nose_grid", X = 115.5, Y = 47.5, Width = 200, Height = 200 }, + Circle = { Dictionary = "mpinventory", Texture = "in_world_circle", X = 115.5, Y = 47.5, Width = 20, Height = 20 }, + Text = { + Top = { X = 215.5, Y = 15, Scale = 0.35 }, + Bottom = { X = 215.5, Y = 250, Scale = 0.35 }, + Left = { X = 57.75, Y = 130, Scale = 0.35 }, + Right = { X = 373.25, Y = 130, Scale = 0.35 } + } + }, + Percentage = { + Background = { Dictionary = "commonmenu", Texture = "gradient_bgd", Y = 4, Width = 431, Height = 76 }, + Bar = { X = 9, Y = 50, Width = 413, Height = 10 }, + Text = { + Left = { X = 25, Y = 15, Scale = 0.35 }, + Middle = { X = 215.5, Y = 15, Scale = 0.35 }, + Right = { X = 398, Y = 15, Scale = 0.35 } + } + } + } } ---Visible @@ -526,42 +526,42 @@ RageUI.Settings = { ---@return table ---@public function RageUI.Visible(Menu, Value) - if Menu ~= nil then - if Menu() then - if type(Value) == "boolean" then - if Value then - if RageUI.CurrentMenu ~= nil then - RageUI.CurrentMenu.Open = not Value - end - - Menu:UpdateInstructionalButtons(Value) - RageUI.CurrentMenu = Menu - RageUI.Options = 0 - RageUI.ItemOffset = 0 - Menu.Open = Value - else - Menu.Open = Value - RageUI.CurrentMenu = nil - RageUI.Options = 0 - RageUI.ItemOffset = 0 - end - else - return Menu.Open - end - end - end + if Menu ~= nil then + if Menu() then + if type(Value) == "boolean" then + if Value then + if RageUI.CurrentMenu ~= nil then + RageUI.CurrentMenu.Open = not Value + end + + Menu:UpdateInstructionalButtons(Value) + RageUI.CurrentMenu = Menu + RageUI.Options = 0 + RageUI.ItemOffset = 0 + Menu.Open = Value + else + Menu.Open = Value + RageUI.CurrentMenu = nil + RageUI.Options = 0 + RageUI.ItemOffset = 0 + end + else + return Menu.Open + end + end + end end ---CloseAll ---@return void ---@public function RageUI.CloseAll() - PlaySound(RageUI.Settings.Audio.Library, RageUI.Settings.Audio.Back) - RageUI.Visible(RageUI.CurrentMenu, false) - RageUI.CurrentMenu = nil - RageUI.NextMenu = nil - RageUI.Options = 0 - RageUI.ItemOffset = 0 + PlaySound(RageUI.Settings.Audio.Library, RageUI.Settings.Audio.Back) + RageUI.Visible(RageUI.CurrentMenu, false) + RageUI.CurrentMenu = nil + RageUI.NextMenu = nil + RageUI.Options = 0 + RageUI.ItemOffset = 0 end ---PlaySound @@ -571,23 +571,23 @@ end ---@return void ---@public function RageUI.PlaySound(Library, Sound, IsLooped) - local audioId - - if not IsLooped then - PlaySoundFrontend(-1, Sound, Library, true) - else - if not audioId then - Citizen.CreateThread(function() - audioId = GetSoundId() - PlaySoundFrontend(audioId, Sound, Library, true) - Citizen.Wait(0) - - StopSound(audioId) - ReleaseSoundId(audioId) - audioId = nil - end) - end - end + local audioId + + if not IsLooped then + PlaySoundFrontend(-1, Sound, Library, true) + else + if not audioId then + Citizen.CreateThread(function() + audioId = GetSoundId() + PlaySoundFrontend(audioId, Sound, Library, true) + Citizen.Wait(0) + + StopSound(audioId) + ReleaseSoundId(audioId) + audioId = nil + end) + end + end end ---Banner @@ -595,91 +595,91 @@ end ---@public ---@param Enabled boolean function RageUI.Banner(Enabled) - if type(Enabled) == "boolean" then - if Enabled == true then - if RageUI.CurrentMenu ~= nil then - if RageUI.CurrentMenu() then - RageUI.ItemsSafeZone(RageUI.CurrentMenu) - - if RageUI.CurrentMenu.Sprite then - RenderSprite(RageUI.CurrentMenu.Sprite.Dictionary, RageUI.CurrentMenu.Sprite.Texture, RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y, RageUI.Settings.Items.Title.Background.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Title.Background.Height, 0, 255, 255, 255, 255) - else - RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y, RageUI.Settings.Items.Title.Background.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Title.Background.Height, RageUI.CurrentMenu.Rectangle.R, RageUI.CurrentMenu.Rectangle.G, RageUI.CurrentMenu.Rectangle.B, RageUI.CurrentMenu.Rectangle.A) - end - - RenderText(RageUI.CurrentMenu.Title, RageUI.CurrentMenu.X + RageUI.Settings.Items.Title.Text.X + (RageUI.CurrentMenu.WidthOffset / 2), RageUI.CurrentMenu.Y + RageUI.Settings.Items.Title.Text.Y, 1, RageUI.Settings.Items.Title.Text.Scale, 255, 255, 255, 255, 1) - RageUI.ItemOffset = RageUI.ItemOffset + RageUI.Settings.Items.Title.Background.Height - end - end - end - else - error("Enabled is not boolean") - end + if type(Enabled) == "boolean" then + if Enabled == true then + if RageUI.CurrentMenu ~= nil then + if RageUI.CurrentMenu() then + RageUI.ItemsSafeZone(RageUI.CurrentMenu) + + if RageUI.CurrentMenu.Sprite then + RenderSprite(RageUI.CurrentMenu.Sprite.Dictionary, RageUI.CurrentMenu.Sprite.Texture, RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y, RageUI.Settings.Items.Title.Background.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Title.Background.Height, 0, 255, 255, 255, 255) + else + RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y, RageUI.Settings.Items.Title.Background.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Title.Background.Height, RageUI.CurrentMenu.Rectangle.R, RageUI.CurrentMenu.Rectangle.G, RageUI.CurrentMenu.Rectangle.B, RageUI.CurrentMenu.Rectangle.A) + end + + RenderText(RageUI.CurrentMenu.Title, RageUI.CurrentMenu.X + RageUI.Settings.Items.Title.Text.X + (RageUI.CurrentMenu.WidthOffset / 2), RageUI.CurrentMenu.Y + RageUI.Settings.Items.Title.Text.Y, 1, RageUI.Settings.Items.Title.Text.Scale, 255, 255, 255, 255, 1) + RageUI.ItemOffset = RageUI.ItemOffset + RageUI.Settings.Items.Title.Background.Height + end + end + end + else + error("Enabled is not boolean") + end end ---Subtitle ---@return void ---@public function RageUI.Subtitle() - if RageUI.CurrentMenu ~= nil then - if RageUI.CurrentMenu() then - RageUI.ItemsSafeZone(RageUI.CurrentMenu) - - if RageUI.CurrentMenu.Subtitle ~= "" then - RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.ItemOffset, RageUI.Settings.Items.Subtitle.Background.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Subtitle.Background.Height + RageUI.CurrentMenu.SubtitleHeight, 0, 0, 0, 255) - RenderText(RageUI.CurrentMenu.Subtitle, RageUI.CurrentMenu.X + RageUI.Settings.Items.Subtitle.Text.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Subtitle.Text.Y + RageUI.ItemOffset, 0, RageUI.Settings.Items.Subtitle.Text.Scale, 245, 245, 245, 255, nil, false, false, RageUI.Settings.Items.Subtitle.Background.Width + RageUI.CurrentMenu.WidthOffset) - - if RageUI.CurrentMenu.Index > RageUI.CurrentMenu.Options or RageUI.CurrentMenu.Index < 0 then - RageUI.CurrentMenu.Index = 1 - end - - if RageUI.CurrentMenu.PageCounter == nil then - RenderText(RageUI.CurrentMenu.PageCounterColour .. RageUI.CurrentMenu.Index .. " / " .. RageUI.CurrentMenu.Options, RageUI.CurrentMenu.X + RageUI.Settings.Items.Subtitle.PreText.X + RageUI.CurrentMenu.WidthOffset, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Subtitle.PreText.Y + RageUI.ItemOffset, 0, RageUI.Settings.Items.Subtitle.PreText.Scale, 245, 245, 245, 255, 2) - else - RenderText(RageUI.CurrentMenu.PageCounter, RageUI.CurrentMenu.X + RageUI.Settings.Items.Subtitle.PreText.X + RageUI.CurrentMenu.WidthOffset, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Subtitle.PreText.Y + RageUI.ItemOffset, 0, RageUI.Settings.Items.Subtitle.PreText.Scale, 245, 245, 245, 255, 2) - end - - RageUI.ItemOffset = RageUI.ItemOffset + RageUI.Settings.Items.Subtitle.Background.Height - end - end - end + if RageUI.CurrentMenu ~= nil then + if RageUI.CurrentMenu() then + RageUI.ItemsSafeZone(RageUI.CurrentMenu) + + if RageUI.CurrentMenu.Subtitle ~= "" then + RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.ItemOffset, RageUI.Settings.Items.Subtitle.Background.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Subtitle.Background.Height + RageUI.CurrentMenu.SubtitleHeight, 0, 0, 0, 255) + RenderText(RageUI.CurrentMenu.Subtitle, RageUI.CurrentMenu.X + RageUI.Settings.Items.Subtitle.Text.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Subtitle.Text.Y + RageUI.ItemOffset, 0, RageUI.Settings.Items.Subtitle.Text.Scale, 245, 245, 245, 255, nil, false, false, RageUI.Settings.Items.Subtitle.Background.Width + RageUI.CurrentMenu.WidthOffset) + + if RageUI.CurrentMenu.Index > RageUI.CurrentMenu.Options or RageUI.CurrentMenu.Index < 0 then + RageUI.CurrentMenu.Index = 1 + end + + if RageUI.CurrentMenu.PageCounter == nil then + RenderText(RageUI.CurrentMenu.PageCounterColour .. RageUI.CurrentMenu.Index .. " / " .. RageUI.CurrentMenu.Options, RageUI.CurrentMenu.X + RageUI.Settings.Items.Subtitle.PreText.X + RageUI.CurrentMenu.WidthOffset, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Subtitle.PreText.Y + RageUI.ItemOffset, 0, RageUI.Settings.Items.Subtitle.PreText.Scale, 245, 245, 245, 255, 2) + else + RenderText(RageUI.CurrentMenu.PageCounter, RageUI.CurrentMenu.X + RageUI.Settings.Items.Subtitle.PreText.X + RageUI.CurrentMenu.WidthOffset, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Subtitle.PreText.Y + RageUI.ItemOffset, 0, RageUI.Settings.Items.Subtitle.PreText.Scale, 245, 245, 245, 255, 2) + end + + RageUI.ItemOffset = RageUI.ItemOffset + RageUI.Settings.Items.Subtitle.Background.Height + end + end + end end ---Background ---@return void ---@public function RageUI.Background() - if RageUI.CurrentMenu ~= nil then - if RageUI.CurrentMenu() then - RageUI.ItemsSafeZone(RageUI.CurrentMenu) - SetScriptGfxDrawOrder(0) - RenderSprite(RageUI.Settings.Items.Background.Dictionary, RageUI.Settings.Items.Background.Texture, RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Background.Y + RageUI.CurrentMenu.SubtitleHeight, RageUI.Settings.Items.Background.Width + RageUI.CurrentMenu.WidthOffset, RageUI.ItemOffset, 0, 0, 0, 255) - SetScriptGfxDrawOrder(1) - end - end + if RageUI.CurrentMenu ~= nil then + if RageUI.CurrentMenu() then + RageUI.ItemsSafeZone(RageUI.CurrentMenu) + SetScriptGfxDrawOrder(0) + RenderSprite(RageUI.Settings.Items.Background.Dictionary, RageUI.Settings.Items.Background.Texture, RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Background.Y + RageUI.CurrentMenu.SubtitleHeight, RageUI.Settings.Items.Background.Width + RageUI.CurrentMenu.WidthOffset, RageUI.ItemOffset, 0, 0, 0, 255) + SetScriptGfxDrawOrder(1) + end + end end ---Description ---@return void ---@public function RageUI.Description() - if RageUI.CurrentMenu ~= nil and RageUI.CurrentMenu.Description ~= nil and RageUI.CurrentMenu.Description ~= "" then - if RageUI.CurrentMenu() then - RageUI.ItemsSafeZone(RageUI.CurrentMenu) - RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Description.Bar.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Description.Bar.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Description.Bar.Height, 0, 0, 0, 255) - RenderSprite(RageUI.Settings.Items.Description.Background.Dictionary, RageUI.Settings.Items.Description.Background.Texture, RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Description.Background.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Description.Background.Width + RageUI.CurrentMenu.WidthOffset, RageUI.CurrentMenu.DescriptionHeight, 0, 0, 0, 255) - RenderText(RageUI.CurrentMenu.Description, RageUI.CurrentMenu.X + RageUI.Settings.Items.Description.Text.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Description.Text.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, RageUI.Settings.Items.Description.Text.Scale, 255, 255, 255, 255, nil, false, false, RageUI.Settings.Items.Description.Background.Width + RageUI.CurrentMenu.WidthOffset) - RageUI.ItemOffset = RageUI.ItemOffset + RageUI.CurrentMenu.DescriptionHeight + RageUI.Settings.Items.Description.Bar.Y - end - end + if RageUI.CurrentMenu ~= nil and RageUI.CurrentMenu.Description ~= nil and RageUI.CurrentMenu.Description ~= "" then + if RageUI.CurrentMenu() then + RageUI.ItemsSafeZone(RageUI.CurrentMenu) + RenderRectangle(RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Description.Bar.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Description.Bar.Width + RageUI.CurrentMenu.WidthOffset, RageUI.Settings.Items.Description.Bar.Height, 0, 0, 0, 255) + RenderSprite(RageUI.Settings.Items.Description.Background.Dictionary, RageUI.Settings.Items.Description.Background.Texture, RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Description.Background.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Description.Background.Width + RageUI.CurrentMenu.WidthOffset, RageUI.CurrentMenu.DescriptionHeight, 0, 0, 0, 255) + RenderText(RageUI.CurrentMenu.Description, RageUI.CurrentMenu.X + RageUI.Settings.Items.Description.Text.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Description.Text.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, RageUI.Settings.Items.Description.Text.Scale, 255, 255, 255, 255, nil, false, false, RageUI.Settings.Items.Description.Background.Width + RageUI.CurrentMenu.WidthOffset) + RageUI.ItemOffset = RageUI.ItemOffset + RageUI.CurrentMenu.DescriptionHeight + RageUI.Settings.Items.Description.Bar.Y + end + end end ---Header ---@return void ---@public function RageUI.Header(EnableBanner) - RageUI.Banner(EnableBanner) - RageUI.Subtitle() + RageUI.Banner(EnableBanner) + RageUI.Subtitle() end ---Render @@ -687,106 +687,106 @@ end ---@return void ---@public function RageUI.Render(instructionalButton) - if RageUI.CurrentMenu ~= nil then - if RageUI.CurrentMenu() then - if RageUI.Settings.Debug then - up = nil - - if RageUI.CurrentMenu.Controls.Up.Pressed then - up = "~g~True~s~" - else - up = "~r~False~s~" - end - - down = nil - - if RageUI.CurrentMenu.Controls.Down.Pressed then - down = "~g~True~s~" - else - down = "~r~False~s~" - end - - left = nil - - if RageUI.CurrentMenu.Controls.Left.Pressed then - left = "~g~True~s~" - else - left = "~r~False~s~" - end - - right = nil - - if RageUI.CurrentMenu.Controls.Right.Pressed then - right = "~g~True~s~" - else - right = "~r~False~s~" - end - - text = "~r~Debug\n~s~Options max : " .. RageUI.Options .. "\n" .. "Current index : " .. RageUI.CurrentMenu.Index .. "\nTitle : " .. RageUI.CurrentMenu.Title .. "\n~s~Subtitle : " .. RageUI.CurrentMenu.Subtitle .. "\n~s~Up pressed : " .. up .. "\nDown pressed : " .. down .. "\nRight pressed : " .. right .. "\nLeft pressed : " .. left - RenderSprite(RageUI.Settings.Items.Description.Background.Dictionary, RageUI.Settings.Items.Description.Background.Texture, RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Description.Background.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Description.Background.Width + RageUI.CurrentMenu.WidthOffset, 250, 0, 0, 0, 255) - RenderText(text, RageUI.CurrentMenu.X + RageUI.Settings.Items.Description.Text.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Description.Text.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, RageUI.Settings.Items.Description.Text.Scale, 255, 255, 255, 255, nil, false, false, RageUI.Settings.Items.Description.Background.Width + RageUI.CurrentMenu.WidthOffset) - end - - if RageUI.CurrentMenu.Safezone then - ResetScriptGfxAlign() - end - - if instructionalButton then - DrawScaleformMovieFullscreen(RageUI.CurrentMenu.InstructionalScaleform, 255, 255, 255, 255, 0) - end - - RageUI.CurrentMenu.Options = RageUI.Options - RageUI.CurrentMenu.SafeZoneSize = nil - RageUI.Controls() - RageUI.Options = 0 - RageUI.StatisticPanelCount = 0 - RageUI.ItemOffset = 0 - - if RageUI.CurrentMenu.Controls.Back.Enabled and RageUI.CurrentMenu.Closable then - if RageUI.CurrentMenu.Controls.Back.Pressed then - RageUI.CurrentMenu.Controls.Back.Pressed = false - RageUI.GoBack() - end - end - - if RageUI.NextMenu ~= nil then - if RageUI.NextMenu() then - RageUI.Visible(RageUI.CurrentMenu, false) - RageUI.Visible(RageUI.NextMenu, true) - RageUI.CurrentMenu.Controls.Select.Active = false - end - end - end - end + if RageUI.CurrentMenu ~= nil then + if RageUI.CurrentMenu() then + if RageUI.Settings.Debug then + up = nil + + if RageUI.CurrentMenu.Controls.Up.Pressed then + up = "~g~True~s~" + else + up = "~r~False~s~" + end + + down = nil + + if RageUI.CurrentMenu.Controls.Down.Pressed then + down = "~g~True~s~" + else + down = "~r~False~s~" + end + + left = nil + + if RageUI.CurrentMenu.Controls.Left.Pressed then + left = "~g~True~s~" + else + left = "~r~False~s~" + end + + right = nil + + if RageUI.CurrentMenu.Controls.Right.Pressed then + right = "~g~True~s~" + else + right = "~r~False~s~" + end + + text = "~r~Debug\n~s~Options max : " .. RageUI.Options .. "\n" .. "Current index : " .. RageUI.CurrentMenu.Index .. "\nTitle : " .. RageUI.CurrentMenu.Title .. "\n~s~Subtitle : " .. RageUI.CurrentMenu.Subtitle .. "\n~s~Up pressed : " .. up .. "\nDown pressed : " .. down .. "\nRight pressed : " .. right .. "\nLeft pressed : " .. left + RenderSprite(RageUI.Settings.Items.Description.Background.Dictionary, RageUI.Settings.Items.Description.Background.Texture, RageUI.CurrentMenu.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Description.Background.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, RageUI.Settings.Items.Description.Background.Width + RageUI.CurrentMenu.WidthOffset, 250, 0, 0, 0, 255) + RenderText(text, RageUI.CurrentMenu.X + RageUI.Settings.Items.Description.Text.X, RageUI.CurrentMenu.Y + RageUI.Settings.Items.Description.Text.Y + RageUI.CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, RageUI.Settings.Items.Description.Text.Scale, 255, 255, 255, 255, nil, false, false, RageUI.Settings.Items.Description.Background.Width + RageUI.CurrentMenu.WidthOffset) + end + + if RageUI.CurrentMenu.Safezone then + ResetScriptGfxAlign() + end + + if instructionalButton then + DrawScaleformMovieFullscreen(RageUI.CurrentMenu.InstructionalScaleform, 255, 255, 255, 255, 0) + end + + RageUI.CurrentMenu.Options = RageUI.Options + RageUI.CurrentMenu.SafeZoneSize = nil + RageUI.Controls() + RageUI.Options = 0 + RageUI.StatisticPanelCount = 0 + RageUI.ItemOffset = 0 + + if RageUI.CurrentMenu.Controls.Back.Enabled and RageUI.CurrentMenu.Closable then + if RageUI.CurrentMenu.Controls.Back.Pressed then + RageUI.CurrentMenu.Controls.Back.Pressed = false + RageUI.GoBack() + end + end + + if RageUI.NextMenu ~= nil then + if RageUI.NextMenu() then + RageUI.Visible(RageUI.CurrentMenu, false) + RageUI.Visible(RageUI.NextMenu, true) + RageUI.CurrentMenu.Controls.Select.Active = false + end + end + end + end end ---DrawContent ---@param items function ---@param panels function function RageUI.DrawContent(settings, items, panels) - if (settings.header ~= nil) then - RageUI.Header(settings.header) - else - RageUI.Header(true) - end - - if (items ~= nil) then - items() - end - - RageUI.Background() - RageUI.Navigation() - RageUI.Description() - - if (panels ~= nil) then - panels() - end - - if (settings.instructionalButton ~= nil) then - RageUI.Render(settings.instructionalButton) - else - RageUI.Render(true) - end + if (settings.header ~= nil) then + RageUI.Header(settings.header) + else + RageUI.Header(true) + end + + if (items ~= nil) then + items() + end + + RageUI.Background() + RageUI.Navigation() + RageUI.Description() + + if (panels ~= nil) then + panels() + end + + if (settings.instructionalButton ~= nil) then + RageUI.Render(settings.instructionalButton) + else + RageUI.Render(true) + end end ---ItemsDescription @@ -796,21 +796,21 @@ end ---@return void ---@public function RageUI.ItemsDescription(CurrentMenu, Description, Selected) - ---@type table - local SettingsDescription = RageUI.Settings.Items.Description + ---@type table + local SettingsDescription = RageUI.Settings.Items.Description - if Selected and CurrentMenu.Description ~= Description then - CurrentMenu.Description = Description or nil + if Selected and CurrentMenu.Description ~= Description then + CurrentMenu.Description = Description or nil - ---@type number - local DescriptionLineCount = GetLineCount(CurrentMenu.Description, CurrentMenu.X + SettingsDescription.Text.X, CurrentMenu.Y + SettingsDescription.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsDescription.Text.Scale, 255, 255, 255, 255, nil, false, false, SettingsDescription.Background.Width + CurrentMenu.WidthOffset) + ---@type number + local DescriptionLineCount = GetLineCount(CurrentMenu.Description, CurrentMenu.X + SettingsDescription.Text.X, CurrentMenu.Y + SettingsDescription.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsDescription.Text.Scale, 255, 255, 255, 255, nil, false, false, SettingsDescription.Background.Width + CurrentMenu.WidthOffset) - if DescriptionLineCount > 1 then - CurrentMenu.DescriptionHeight = SettingsDescription.Background.Height * DescriptionLineCount - else - CurrentMenu.DescriptionHeight = SettingsDescription.Background.Height + 7 - end - end + if DescriptionLineCount > 1 then + CurrentMenu.DescriptionHeight = SettingsDescription.Background.Height * DescriptionLineCount + else + CurrentMenu.DescriptionHeight = SettingsDescription.Background.Height + 7 + end + end end ---MouseBounds @@ -821,21 +821,21 @@ end ---@return boolean ---@public function RageUI.ItemsMouseBounds(CurrentMenu, Selected, Option, SettingsButton) - ---@type boolean - local Hovered = false - Hovered = RageUI.IsMouseInBounds(CurrentMenu.X + CurrentMenu.SafeZoneSize.X, CurrentMenu.Y + SettingsButton.Rectangle.Y + CurrentMenu.SafeZoneSize.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.Rectangle.Width + CurrentMenu.WidthOffset, SettingsButton.Rectangle.Height) + ---@type boolean + local Hovered = false + Hovered = RageUI.IsMouseInBounds(CurrentMenu.X + CurrentMenu.SafeZoneSize.X, CurrentMenu.Y + SettingsButton.Rectangle.Y + CurrentMenu.SafeZoneSize.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.Rectangle.Width + CurrentMenu.WidthOffset, SettingsButton.Rectangle.Height) - if Hovered and not Selected then - RenderRectangle(CurrentMenu.X, CurrentMenu.Y + SettingsButton.Rectangle.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.Rectangle.Width + CurrentMenu.WidthOffset, SettingsButton.Rectangle.Height, 255, 255, 255, 20) + if Hovered and not Selected then + RenderRectangle(CurrentMenu.X, CurrentMenu.Y + SettingsButton.Rectangle.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.Rectangle.Width + CurrentMenu.WidthOffset, SettingsButton.Rectangle.Height, 255, 255, 255, 20) - if CurrentMenu.Controls.Click.Active then - CurrentMenu.Index = Option - local Audio = RageUI.Settings.Audio - RageUI.PlaySound(Audio[Audio.Use].Error.audioName, Audio[Audio.Use].Error.audioRef) - end - end + if CurrentMenu.Controls.Click.Active then + CurrentMenu.Index = Option + local Audio = RageUI.Settings.Audio + RageUI.PlaySound(Audio[Audio.Use].Error.audioName, Audio[Audio.Use].Error.audioRef) + end + end - return Hovered + return Hovered end ---ItemsSafeZone @@ -843,11 +843,11 @@ end ---@return void ---@public function RageUI.ItemsSafeZone(CurrentMenu) - if CurrentMenu.Safezone then - CurrentMenu.SafeZoneSize = RageUI.GetSafeZoneBounds() - SetScriptGfxAlign(76, 84) - SetScriptGfxAlignParams(0, 0, 0, 0) - end + if CurrentMenu.Safezone then + CurrentMenu.SafeZoneSize = RageUI.GetSafeZoneBounds() + SetScriptGfxAlign(76, 84) + SetScriptGfxAlignParams(0, 0, 0, 0) + end end ---CreateWhile @@ -857,15 +857,15 @@ end ---@return void ---@public function RageUI.CreateWhile(wait, closure, beforeWait) - Citizen.CreateThread(function() - while true do - if (beforeWait or beforeWait == nil) then - Citizen.Wait(wait or 0.1) - closure() - else - closure() - Citizen.Wait(wait or 0.1) - end - end - end) + Citizen.CreateThread(function() + while true do + if (beforeWait or beforeWait == nil) then + Citizen.Wait(wait or 0.1) + closure() + else + closure() + Citizen.Wait(wait or 0.1) + end + end + end) end \ No newline at end of file diff --git a/dependencies/menu/elements/ItemsBadge.lua b/dependencies/menu/elements/ItemsBadge.lua index d966a58..b212486 100644 --- a/dependencies/menu/elements/ItemsBadge.lua +++ b/dependencies/menu/elements/ItemsBadge.lua @@ -1,189 +1,189 @@ RageUI.BadgeStyle = { - None = 1, - BronzeMedal = 2, - GoldMedal = 3, - SilverMedal = 4, - Alert = 5, - Crown = 6, - Ammo = 7, - Armour = 8, - Barber = 9, - Clothes = 10, - Franklin = 11, - Bike = 12, - Car = 13, - Gun = 14, - Heart = 15, - Makeup = 16, - Mask = 17, - Michael = 18, - Star = 19, - Tattoo = 20, - Trevor = 21, - Lock = 22, - Tick = 23 + None = 1, + BronzeMedal = 2, + GoldMedal = 3, + SilverMedal = 4, + Alert = 5, + Crown = 6, + Ammo = 7, + Armour = 8, + Barber = 9, + Clothes = 10, + Franklin = 11, + Bike = 12, + Car = 13, + Gun = 14, + Heart = 15, + Makeup = 16, + Mask = 17, + Michael = 18, + Star = 19, + Tattoo = 20, + Trevor = 21, + Lock = 22, + Tick = 23 } RageUI.BadgeTexture = { - [1] = function() - return "" - end, - [2] = function() - return "mp_medal_bronze" - end, - [3] = function() - return "mp_medal_gold" - end, - [4] = function() - return "medal_silver" - end, - [5] = function() - return "mp_alerttriangle" - end, - [6] = function() - return "mp_hostcrown" - end, - [7] = function(Selected) - if Selected then - return "shop_ammo_icon_b" - else - return "shop_ammo_icon_a" - end - end, - [8] = function(Selected) - if Selected then - return "shop_armour_icon_b" - else - return "shop_armour_icon_a" - end - end, - [9] = function(Selected) - if Selected then - return "shop_barber_icon_b" - else - return "shop_barber_icon_a" - end - end, - [10] = function(Selected) - if Selected then - return "shop_clothing_icon_b" - else - return "shop_clothing_icon_a" - end - end, - [11] = function(Selected) - if Selected then - return "shop_franklin_icon_b" - else - return "shop_franklin_icon_a" - end - end, - [12] = function(Selected) - if Selected then - return "shop_garage_bike_icon_b" - else - return "shop_garage_bike_icon_a" - end - end, - [13] = function(Selected) - if Selected then - return "shop_garage_icon_b" - else - return "shop_garage_icon_a" - end - end, - [14] = function(Selected) - if Selected then - return "shop_gunclub_icon_b" - else - return "shop_gunclub_icon_a" - end - end, - [15] = function(Selected) - if Selected then - return "shop_health_icon_b" - else - return "shop_health_icon_a" - end - end, - [16] = function(Selected) - if Selected then - return "shop_makeup_icon_b" - else - return "shop_makeup_icon_a" - end - end, - [17] = function(Selected) - if Selected then - return "shop_mask_icon_b" - else - return "shop_mask_icon_a" - end - end, - [18] = function(Selected) - if Selected then - return "shop_michael_icon_b" - else - return "shop_michael_icon_a" - end - end, - [19] = function() - return "shop_new_star" - end, - [20] = function(Selected) - if Selected then - return "shop_tattoos_icon_b" - else - return "shop_tattoos_icon_a" - end - end, - [21] = function(Selected) - if Selected then - return "shop_trevor_icon_b" - else - return "shop_trevor_icon_a" - end - end, - [22] = function() - return "shop_lock" - end, - [23] = function() - return "shop_tick_icon" - end + [1] = function() + return "" + end, + [2] = function() + return "mp_medal_bronze" + end, + [3] = function() + return "mp_medal_gold" + end, + [4] = function() + return "medal_silver" + end, + [5] = function() + return "mp_alerttriangle" + end, + [6] = function() + return "mp_hostcrown" + end, + [7] = function(Selected) + if Selected then + return "shop_ammo_icon_b" + else + return "shop_ammo_icon_a" + end + end, + [8] = function(Selected) + if Selected then + return "shop_armour_icon_b" + else + return "shop_armour_icon_a" + end + end, + [9] = function(Selected) + if Selected then + return "shop_barber_icon_b" + else + return "shop_barber_icon_a" + end + end, + [10] = function(Selected) + if Selected then + return "shop_clothing_icon_b" + else + return "shop_clothing_icon_a" + end + end, + [11] = function(Selected) + if Selected then + return "shop_franklin_icon_b" + else + return "shop_franklin_icon_a" + end + end, + [12] = function(Selected) + if Selected then + return "shop_garage_bike_icon_b" + else + return "shop_garage_bike_icon_a" + end + end, + [13] = function(Selected) + if Selected then + return "shop_garage_icon_b" + else + return "shop_garage_icon_a" + end + end, + [14] = function(Selected) + if Selected then + return "shop_gunclub_icon_b" + else + return "shop_gunclub_icon_a" + end + end, + [15] = function(Selected) + if Selected then + return "shop_health_icon_b" + else + return "shop_health_icon_a" + end + end, + [16] = function(Selected) + if Selected then + return "shop_makeup_icon_b" + else + return "shop_makeup_icon_a" + end + end, + [17] = function(Selected) + if Selected then + return "shop_mask_icon_b" + else + return "shop_mask_icon_a" + end + end, + [18] = function(Selected) + if Selected then + return "shop_michael_icon_b" + else + return "shop_michael_icon_a" + end + end, + [19] = function() + return "shop_new_star" + end, + [20] = function(Selected) + if Selected then + return "shop_tattoos_icon_b" + else + return "shop_tattoos_icon_a" + end + end, + [21] = function(Selected) + if Selected then + return "shop_trevor_icon_b" + else + return "shop_trevor_icon_a" + end + end, + [22] = function() + return "shop_lock" + end, + [23] = function() + return "shop_tick_icon" + end } RageUI.BadgeDictionary = { - [1] = function(Selected) - if Selected then - return "commonmenu" - else - return "commonmenu" - end - end + [1] = function(Selected) + if Selected then + return "commonmenu" + else + return "commonmenu" + end + end } RageUI.BadgeColour = { - [6] = function(Selected) - if Selected then - return 0, 0, 0, 255 - else - return 255, 255, 255, 255 - end - end, - [22] = function(Selected) - if Selected then - return 0, 0, 0, 255 - else - return 255, 255, 255, 255 - end - end, - [23] = function(Selected) - if Selected then - return 0, 0, 0, 255 - else - return 255, 255, 255, 255 - end - end + [6] = function(Selected) + if Selected then + return 0, 0, 0, 255 + else + return 255, 255, 255, 255 + end + end, + [22] = function(Selected) + if Selected then + return 0, 0, 0, 255 + else + return 255, 255, 255, 255 + end + end, + [23] = function(Selected) + if Selected then + return 0, 0, 0, 255 + else + return 255, 255, 255, 255 + end + end } ---GetBadgeTexture @@ -192,11 +192,11 @@ RageUI.BadgeColour = { ---@return table ---@public function RageUI.GetBadgeTexture(Badge, Selected) - if RageUI.BadgeTexture[Badge] then - return RageUI.BadgeTexture[Badge](Selected) - else - return "" - end + if RageUI.BadgeTexture[Badge] then + return RageUI.BadgeTexture[Badge](Selected) + else + return "" + end end ---GetBadgeDictionary @@ -205,11 +205,11 @@ end ---@return table ---@public function RageUI.GetBadgeDictionary(Badge, Selected) - if RageUI.BadgeDictionary[Badge] then - return RageUI.BadgeDictionary[Badge](Selected) - else - return "commonmenu" - end + if RageUI.BadgeDictionary[Badge] then + return RageUI.BadgeDictionary[Badge](Selected) + else + return "commonmenu" + end end ---GetBadgeColour @@ -218,11 +218,11 @@ end ---@return table ---@public function RageUI.GetBadgeColour(Badge, Selected) - if RageUI.BadgeColour[Badge] then - return RageUI.BadgeColour[Badge](Selected) - else - return 255, 255, 255, 255 - end + if RageUI.BadgeColour[Badge] then + return RageUI.BadgeColour[Badge](Selected) + else + return 255, 255, 255, 255 + end end ---CurrentIsEqualTo @@ -233,9 +233,9 @@ end ---@return table ---@public function RageUI.CurrentIsEqualTo(Current, To, Style, DefaultStyle) - if (Current == To) then - return Style - else - return DefaultStyle or {} - end + if (Current == To) then + return Style + else + return DefaultStyle or {} + end end \ No newline at end of file diff --git a/dependencies/menu/items/UIButton.lua b/dependencies/menu/items/UIButton.lua index 995b3d1..1c9cf9a 100644 --- a/dependencies/menu/items/UIButton.lua +++ b/dependencies/menu/items/UIButton.lua @@ -1,11 +1,11 @@ ---@type table local SettingsButton = { - Rectangle = { Y = 0, Width = 431, Height = 38 }, - Text = { X = 8, Y = 3, Scale = 0.33 }, - LeftBadge = { Y = -2, Width = 40, Height = 40 }, - RightBadge = { X = 385, Y = -2, Width = 40, Height = 40 }, - RightText = { X = 420, Y = 4, Scale = 0.35 }, - SelectedSprite = { Dictionary = "commonmenu", Texture = "gradient_nav", Y = 0, Width = 431, Height = 38 } + Rectangle = { Y = 0, Width = 431, Height = 38 }, + Text = { X = 8, Y = 3, Scale = 0.33 }, + LeftBadge = { Y = -2, Width = 40, Height = 40 }, + RightBadge = { X = 385, Y = -2, Width = 40, Height = 40 }, + RightText = { X = 420, Y = 4, Scale = 0.35 }, + SelectedSprite = { Dictionary = "commonmenu", Texture = "gradient_nav", Y = 0, Width = 431, Height = 38 } } ---Button @@ -17,101 +17,101 @@ local SettingsButton = { ---@return nil ---@public function RageUI.Button(Label, Description, Style, Enabled, Callback, Submenu) - ---@type table - local CurrentMenu = RageUI.CurrentMenu - - if CurrentMenu ~= nil then - if CurrentMenu() then - ---@type number - local Option = RageUI.Options + 1 - - if CurrentMenu.Pagination.Minimum <= Option and CurrentMenu.Pagination.Maximum >= Option then - ---@type boolean - local Selected = CurrentMenu.Index == Option - RageUI.ItemsSafeZone(CurrentMenu) - - local LeftBadgeOffset = ((Style?.LeftBadge == RageUI.BadgeStyle.None or tonumber(Style?.LeftBadge) == nil) and 0 or 27) - local RightBadgeOffset = ((Style?.RightBadge == RageUI.BadgeStyle.None or tonumber(Style?.RightBadge) == nil) and 0 or 32) - local Hovered = false - - if Style?.Color?.BackgroundColor ~= nil then - RenderRectangle(CurrentMenu.X, CurrentMenu.Y + SettingsButton.SelectedSprite.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.SelectedSprite.Width + CurrentMenu.WidthOffset, SettingsButton.SelectedSprite.Height, Style.Color.BackgroundColor[1],Style.Color.BackgroundColor[2],Style.Color.BackgroundColor[3]) - end - - ---@type boolean - if CurrentMenu.EnableMouse == true then - Hovered = RageUI.ItemsMouseBounds(CurrentMenu, Selected, Option, SettingsButton) - end - - if Selected then - if Style?.Color then - if Style.Color.HightLightColor then - RenderRectangle(CurrentMenu.X, CurrentMenu.Y + SettingsButton.SelectedSprite.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.SelectedSprite.Width + CurrentMenu.WidthOffset, SettingsButton.SelectedSprite.Height, Style.Color.HightLightColor[1],Style.Color.HightLightColor[2],Style.Color.HightLightColor[3]) - else - RenderSprite(SettingsButton.SelectedSprite.Dictionary, SettingsButton.SelectedSprite.Texture, CurrentMenu.X, CurrentMenu.Y + SettingsButton.SelectedSprite.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.SelectedSprite.Width + CurrentMenu.WidthOffset, SettingsButton.SelectedSprite.Height) - end - else - RenderSprite(SettingsButton.SelectedSprite.Dictionary, SettingsButton.SelectedSprite.Texture, CurrentMenu.X, CurrentMenu.Y + SettingsButton.SelectedSprite.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.SelectedSprite.Width + CurrentMenu.WidthOffset, SettingsButton.SelectedSprite.Height) - end - end - - if type(Style) == 'table' then - if Style.LeftBadge ~= nil then - if Style.LeftBadge ~= RageUI.BadgeStyle.None and tonumber(Style.LeftBadge) ~= nil then - RenderSprite(RageUI.GetBadgeDictionary(Style.LeftBadge, Selected), RageUI.GetBadgeTexture(Style.LeftBadge, Selected), CurrentMenu.X, CurrentMenu.Y + SettingsButton.LeftBadge.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.LeftBadge.Width, SettingsButton.LeftBadge.Height, RageUI.GetBadgeColour(Style.LeftBadge, Selected)) - end - end - - if Style.RightBadge ~= nil then - if Style.RightBadge ~= RageUI.BadgeStyle.None and tonumber(Style.RightBadge) ~= nil then - RenderSprite(RageUI.GetBadgeDictionary(Style.RightBadge, Selected), RageUI.GetBadgeTexture(Style.RightBadge, Selected), CurrentMenu.X + SettingsButton.RightBadge.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightBadge.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.RightBadge.Width, SettingsButton.RightBadge.Height, 0, RageUI.GetBadgeColour(Style.RightBadge, Selected)) - end - end - end - - if (Enabled) then - if Selected then - if Style?.RightLabel ~= nil and Style.RightLabel ~= "" then - RenderText(Style.RightLabel, CurrentMenu.X + SettingsButton.RightText.X - RightBadgeOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightText.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.RightText.Scale, 0, 0, 0, 255, 2) - end - - RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 0, 0, 0, 255) - else - if Style?.RightLabel ~= nil and Style.RightLabel ~= "" then - RenderText(Style.RightLabel, CurrentMenu.X + SettingsButton.RightText.X - RightBadgeOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightText.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.RightText.Scale, 245, 245, 245, 255, 2) - end - - RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 245, 245, 245, 255) - end - else - RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 163, 159, 148, 255) - end - - RageUI.ItemOffset = RageUI.ItemOffset + SettingsButton.Rectangle.Height - RageUI.ItemsDescription(CurrentMenu, Description, Selected) - - if (Enabled) then - if Callback then - Callback(Hovered, Selected, ((CurrentMenu.Controls.Select.Active or (Hovered and CurrentMenu.Controls.Click.Active)) and Selected)) - end - end - - if Selected and (CurrentMenu.Controls.Select.Active or (Hovered and CurrentMenu.Controls.Click.Active)) then - local Audio = RageUI.Settings.Audio - - if (Enabled) then - RageUI.PlaySound(Audio[Audio.Use].Select.audioName, Audio[Audio.Use].Select.audioRef) - - if Submenu and Submenu() then - RageUI.NextMenu = Submenu - end - else - RageUI.PlaySound(Audio[Audio.Use].Error.audioName, Audio[Audio.Use].Error.audioRef) - end - end - end - - RageUI.Options = RageUI.Options + 1 - end - end + ---@type table + local CurrentMenu = RageUI.CurrentMenu + + if CurrentMenu ~= nil then + if CurrentMenu() then + ---@type number + local Option = RageUI.Options + 1 + + if CurrentMenu.Pagination.Minimum <= Option and CurrentMenu.Pagination.Maximum >= Option then + ---@type boolean + local Selected = CurrentMenu.Index == Option + RageUI.ItemsSafeZone(CurrentMenu) + + local LeftBadgeOffset = ((Style?.LeftBadge == RageUI.BadgeStyle.None or tonumber(Style?.LeftBadge) == nil) and 0 or 27) + local RightBadgeOffset = ((Style?.RightBadge == RageUI.BadgeStyle.None or tonumber(Style?.RightBadge) == nil) and 0 or 32) + local Hovered = false + + if Style?.Color?.BackgroundColor ~= nil then + RenderRectangle(CurrentMenu.X, CurrentMenu.Y + SettingsButton.SelectedSprite.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.SelectedSprite.Width + CurrentMenu.WidthOffset, SettingsButton.SelectedSprite.Height, Style.Color.BackgroundColor[1],Style.Color.BackgroundColor[2],Style.Color.BackgroundColor[3]) + end + + ---@type boolean + if CurrentMenu.EnableMouse == true then + Hovered = RageUI.ItemsMouseBounds(CurrentMenu, Selected, Option, SettingsButton) + end + + if Selected then + if Style?.Color then + if Style.Color.HightLightColor then + RenderRectangle(CurrentMenu.X, CurrentMenu.Y + SettingsButton.SelectedSprite.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.SelectedSprite.Width + CurrentMenu.WidthOffset, SettingsButton.SelectedSprite.Height, Style.Color.HightLightColor[1],Style.Color.HightLightColor[2],Style.Color.HightLightColor[3]) + else + RenderSprite(SettingsButton.SelectedSprite.Dictionary, SettingsButton.SelectedSprite.Texture, CurrentMenu.X, CurrentMenu.Y + SettingsButton.SelectedSprite.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.SelectedSprite.Width + CurrentMenu.WidthOffset, SettingsButton.SelectedSprite.Height) + end + else + RenderSprite(SettingsButton.SelectedSprite.Dictionary, SettingsButton.SelectedSprite.Texture, CurrentMenu.X, CurrentMenu.Y + SettingsButton.SelectedSprite.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.SelectedSprite.Width + CurrentMenu.WidthOffset, SettingsButton.SelectedSprite.Height) + end + end + + if type(Style) == 'table' then + if Style.LeftBadge ~= nil then + if Style.LeftBadge ~= RageUI.BadgeStyle.None and tonumber(Style.LeftBadge) ~= nil then + RenderSprite(RageUI.GetBadgeDictionary(Style.LeftBadge, Selected), RageUI.GetBadgeTexture(Style.LeftBadge, Selected), CurrentMenu.X, CurrentMenu.Y + SettingsButton.LeftBadge.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.LeftBadge.Width, SettingsButton.LeftBadge.Height, RageUI.GetBadgeColour(Style.LeftBadge, Selected)) + end + end + + if Style.RightBadge ~= nil then + if Style.RightBadge ~= RageUI.BadgeStyle.None and tonumber(Style.RightBadge) ~= nil then + RenderSprite(RageUI.GetBadgeDictionary(Style.RightBadge, Selected), RageUI.GetBadgeTexture(Style.RightBadge, Selected), CurrentMenu.X + SettingsButton.RightBadge.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightBadge.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.RightBadge.Width, SettingsButton.RightBadge.Height, 0, RageUI.GetBadgeColour(Style.RightBadge, Selected)) + end + end + end + + if (Enabled) then + if Selected then + if Style?.RightLabel ~= nil and Style.RightLabel ~= "" then + RenderText(Style.RightLabel, CurrentMenu.X + SettingsButton.RightText.X - RightBadgeOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightText.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.RightText.Scale, 0, 0, 0, 255, 2) + end + + RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 0, 0, 0, 255) + else + if Style?.RightLabel ~= nil and Style.RightLabel ~= "" then + RenderText(Style.RightLabel, CurrentMenu.X + SettingsButton.RightText.X - RightBadgeOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightText.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.RightText.Scale, 245, 245, 245, 255, 2) + end + + RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 245, 245, 245, 255) + end + else + RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 163, 159, 148, 255) + end + + RageUI.ItemOffset = RageUI.ItemOffset + SettingsButton.Rectangle.Height + RageUI.ItemsDescription(CurrentMenu, Description, Selected) + + if (Enabled) then + if Callback then + Callback(Hovered, Selected, ((CurrentMenu.Controls.Select.Active or (Hovered and CurrentMenu.Controls.Click.Active)) and Selected)) + end + end + + if Selected and (CurrentMenu.Controls.Select.Active or (Hovered and CurrentMenu.Controls.Click.Active)) then + local Audio = RageUI.Settings.Audio + + if (Enabled) then + RageUI.PlaySound(Audio[Audio.Use].Select.audioName, Audio[Audio.Use].Select.audioRef) + + if Submenu and Submenu() then + RageUI.NextMenu = Submenu + end + else + RageUI.PlaySound(Audio[Audio.Use].Error.audioName, Audio[Audio.Use].Error.audioRef) + end + end + end + + RageUI.Options = RageUI.Options + 1 + end + end end \ No newline at end of file diff --git a/dependencies/menu/items/UIList.lua b/dependencies/menu/items/UIList.lua index 2b6369c..a59f1df 100644 --- a/dependencies/menu/items/UIList.lua +++ b/dependencies/menu/items/UIList.lua @@ -1,18 +1,18 @@ ---@type table local SettingsButton = { - Rectangle = { Y = 0, Width = 431, Height = 38 }, - Text = { X = 8, Y = 3, Scale = 0.33 }, - LeftBadge = { Y = -2, Width = 40, Height = 40 }, - RightBadge = { X = 385, Y = -2, Width = 40, Height = 40 }, - RightText = { X = 420, Y = 4, Scale = 0.35 }, - SelectedSprite = { Dictionary = "commonmenu", Texture = "gradient_nav", Y = 0, Width = 431, Height = 38 } + Rectangle = { Y = 0, Width = 431, Height = 38 }, + Text = { X = 8, Y = 3, Scale = 0.33 }, + LeftBadge = { Y = -2, Width = 40, Height = 40 }, + RightBadge = { X = 385, Y = -2, Width = 40, Height = 40 }, + RightText = { X = 420, Y = 4, Scale = 0.35 }, + SelectedSprite = { Dictionary = "commonmenu", Texture = "gradient_nav", Y = 0, Width = 431, Height = 38 } } ---@type table local SettingsList = { - LeftArrow = { Dictionary = "commonmenu", Texture = "arrowleft", X = 378, Y = 3, Width = 30, Height = 30 }, - RightArrow = { Dictionary = "commonmenu", Texture = "arrowright", X = 400, Y = 3, Width = 30, Height = 30 }, - Text = { X = 403, Y = 3, Scale = 0.35 } + LeftArrow = { Dictionary = "commonmenu", Texture = "arrowleft", X = 378, Y = 3, Width = 30, Height = 30 }, + RightArrow = { Dictionary = "commonmenu", Texture = "arrowright", X = 400, Y = 3, Width = 30, Height = 30 }, + Text = { X = 403, Y = 3, Scale = 0.35 } } ---List @@ -25,163 +25,163 @@ local SettingsList = { ---@return nil ---@public function RageUI.List(Label, Items, Index, Description, Style, Enabled, Callback, Submenu) - ---@type table - local CurrentMenu = RageUI.CurrentMenu - - if CurrentMenu ~= nil then - if CurrentMenu() then - ---@type number - local Option = RageUI.Options + 1 - - if CurrentMenu.Pagination.Minimum <= Option and CurrentMenu.Pagination.Maximum >= Option then - ---@type number - local Selected = CurrentMenu.Index == Option - - ---@type boolean - local LeftArrowHovered, RightArrowHovered = false, false - - RageUI.ItemsSafeZone(CurrentMenu) - - local Hovered = false - local LeftBadgeOffset = ((Style?.LeftBadge == RageUI.BadgeStyle.None or tonumber(Style?.LeftBadge) == nil) and 0 or 27) - local RightBadgeOffset = ((Style?.RightBadge == RageUI.BadgeStyle.None or tonumber(Style?.RightBadge) == nil) and 0 or 32) - local RightOffset = 0 - - ---@type boolean - if CurrentMenu.EnableMouse == true then - Hovered = RageUI.ItemsMouseBounds(CurrentMenu, Selected, Option, SettingsButton) - end - - local ListText = (type(Items[Index]) == "table") and tostring(Items[Index].Name) or tostring(Items[Index]) or "NIL" - - local name = ListText - :gsub("é", "e") - :gsub("â", "a") - :gsub("à", "a") - :gsub("è", "e") - :gsub("ê", "e") - :gsub("î", "i") - :gsub("ç", "c") - :gsub("ô", "o") - :gsub("É", "E") - - local TextOffset = MeasureStringWidth(name, 0, 0.35) - - if Selected then - RenderSprite(SettingsButton.SelectedSprite.Dictionary, SettingsButton.SelectedSprite.Texture, CurrentMenu.X, CurrentMenu.Y + SettingsButton.SelectedSprite.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.SelectedSprite.Width + CurrentMenu.WidthOffset, SettingsButton.SelectedSprite.Height) - LeftArrowHovered = RageUI.IsMouseInBounds(CurrentMenu.X + SettingsList.LeftArrow.X - TextOffset + CurrentMenu.SafeZoneSize.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.LeftArrow.Y + CurrentMenu.SafeZoneSize.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.LeftArrow.Width, SettingsList.LeftArrow.Height) - RightArrowHovered = RageUI.IsMouseInBounds(CurrentMenu.X + SettingsList.RightArrow.X + CurrentMenu.SafeZoneSize.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.RightArrow.Y + CurrentMenu.SafeZoneSize.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.RightArrow.Width, SettingsList.RightArrow.Height) - end - - if Enabled == true or Enabled == nil then - if Selected then - if Style?.RightLabel ~= nil and Style.RightLabel ~= "" then - RenderText(Style.RightLabel, CurrentMenu.X + SettingsButton.RightText.X - RightBadgeOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightText.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.RightText.Scale, 0, 0, 0, 255, 2) - RightOffset = MeasureStringWidth(Style.RightLabel,0,0.35) - end - else - if Style?.RightLabel ~= nil and Style.RightLabel ~= "" then - RightOffset = MeasureStringWidth(Style.RightLabel,0,0.35) - RenderText(Style.RightLabel, CurrentMenu.X + SettingsButton.RightText.X - RightBadgeOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightText.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.RightText.Scale, 245, 245, 245, 255, 2) - end - end - end - - RightOffset = RightBadgeOffset * 1.3 + RightOffset - - if Enabled == true or Enabled == nil then - if Selected then - RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 0, 0, 0, 255) - - RenderSprite(SettingsList.LeftArrow.Dictionary, SettingsList.LeftArrow.Texture, CurrentMenu.X + SettingsList.LeftArrow.X - TextOffset- RightOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.LeftArrow.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.LeftArrow.Width, SettingsList.LeftArrow.Height, 0, 0, 0, 0, 255) - RenderSprite(SettingsList.RightArrow.Dictionary, SettingsList.RightArrow.Texture, CurrentMenu.X + SettingsList.RightArrow.X + CurrentMenu.WidthOffset - RightOffset, CurrentMenu.Y + SettingsList.RightArrow.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.RightArrow.Width, SettingsList.RightArrow.Height, 0, 0, 0, 0, 255) - - RenderText(ListText, CurrentMenu.X + SettingsList.Text.X + CurrentMenu.WidthOffset- RightOffset, CurrentMenu.Y + SettingsList.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsList.Text.Scale, 0, 0, 0, 255, 2) - else - RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 245, 245, 245, 255) - RenderText(ListText, CurrentMenu.X + SettingsList.Text.X + 15 + CurrentMenu.WidthOffset-RightOffset, CurrentMenu.Y + SettingsList.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsList.Text.Scale, 245, 245, 245, 255, 2) - end - else - RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 163, 159, 148, 255) - - if Selected then - RenderSprite(SettingsList.LeftArrow.Dictionary, SettingsList.LeftArrow.Texture, CurrentMenu.X + SettingsList.LeftArrow.X - TextOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.LeftArrow.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.LeftArrow.Width, SettingsList.LeftArrow.Height, 0, 163, 159, 148, 255) - RenderSprite(SettingsList.RightArrow.Dictionary, SettingsList.RightArrow.Texture, CurrentMenu.X + SettingsList.RightArrow.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.RightArrow.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.RightArrow.Width, SettingsList.RightArrow.Height, 0, 163, 159, 148, 255) - - RenderText(ListText, CurrentMenu.X + SettingsList.Text.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsList.Text.Scale, 163, 159, 148, 255, 2) - else - RenderText(ListText, CurrentMenu.X + SettingsList.Text.X + 15 + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsList.Text.Scale, 163, 159, 148, 255, 2) - end - end - - if type(Style) == "table" then - if Style.Enabled == true or Style.Enabled == nil then - if type(Style) == 'table' then - if Style.LeftBadge ~= nil then - if Style.LeftBadge ~= RageUI.BadgeStyle.None and tonumber(Style.LeftBadge) ~= nil then - RenderSprite(RageUI.GetBadgeDictionary(Style.LeftBadge, Selected), RageUI.GetBadgeTexture(Style.LeftBadge, Selected), CurrentMenu.X, CurrentMenu.Y + SettingsButton.LeftBadge.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.LeftBadge.Width, SettingsButton.LeftBadge.Height, RageUI.GetBadgeColour(Style.LeftBadge, Selected)) - end - end - - if Style.RightBadge ~= nil then - if Style.RightBadge ~= RageUI.BadgeStyle.None and tonumber(Style.RightBadge) ~= nil then - RenderSprite(RageUI.GetBadgeDictionary(Style.RightBadge, Selected), RageUI.GetBadgeTexture(Style.RightBadge, Selected), CurrentMenu.X + SettingsButton.RightBadge.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightBadge.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.RightBadge.Width, SettingsButton.RightBadge.Height, 0, RageUI.GetBadgeColour(Style.RightBadge, Selected)) - end - end - end - else - ---@type table - local LeftBadge = RageUI.BadgeStyle.Lock - - ---@type number - local LeftBadgeOffset = ((LeftBadge == RageUI.BadgeStyle.None or tonumber(LeftBadge) == nil) and 0 or 27) - - if LeftBadge ~= RageUI.BadgeStyle.None and tonumber(LeftBadge) ~= nil then - RenderSprite(RageUI.GetBadgeDictionary(LeftBadge, Selected), RageUI.GetBadgeTexture(LeftBadge, Selected), CurrentMenu.X, CurrentMenu.Y + SettingsButton.LeftBadge.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.LeftBadge.Width, SettingsButton.LeftBadge.Height, nil, CheckBoxLockBadgeColor(Selected)) - end - end - end - - RageUI.ItemOffset = RageUI.ItemOffset + SettingsButton.Rectangle.Height - RageUI.ItemsDescription(CurrentMenu, Description, Selected) - - if Selected and (CurrentMenu.Controls.Left.Active or (CurrentMenu.Controls.Click.Active and LeftArrowHovered)) and not (CurrentMenu.Controls.Right.Active or (CurrentMenu.Controls.Click.Active and RightArrowHovered)) then - Index = Index - 1 - - if Index < 1 then - Index = #Items - end - - local Audio = RageUI.Settings.Audio - RageUI.PlaySound(Audio[Audio.Use].LeftRight.audioName, Audio[Audio.Use].LeftRight.audioRef) - elseif Selected and (CurrentMenu.Controls.Right.Active or (CurrentMenu.Controls.Click.Active and RightArrowHovered)) and not (CurrentMenu.Controls.Left.Active or (CurrentMenu.Controls.Click.Active and LeftArrowHovered)) then - Index = Index + 1 - - if Index > #Items then - Index = 1 - end - - local Audio = RageUI.Settings.Audio - RageUI.PlaySound(Audio[Audio.Use].LeftRight.audioName, Audio[Audio.Use].LeftRight.audioRef) - end - - if (Enabled) then - if Callback then - Callback(Hovered, Selected, ((CurrentMenu.Controls.Select.Active or ((Hovered and CurrentMenu.Controls.Click.Active) and (not LeftArrowHovered and not RightArrowHovered))) and Selected), Index) - end - end - - if Selected and (CurrentMenu.Controls.Select.Active or ((Hovered and CurrentMenu.Controls.Click.Active) and (not LeftArrowHovered and not RightArrowHovered))) then - local Audio = RageUI.Settings.Audio - RageUI.PlaySound(Audio[Audio.Use].Select.audioName, Audio[Audio.Use].Select.audioRef) - - if Submenu and Submenu() then - RageUI.NextMenu = Submenu - end - end - end - - RageUI.Options = RageUI.Options + 1 - end - end + ---@type table + local CurrentMenu = RageUI.CurrentMenu + + if CurrentMenu ~= nil then + if CurrentMenu() then + ---@type number + local Option = RageUI.Options + 1 + + if CurrentMenu.Pagination.Minimum <= Option and CurrentMenu.Pagination.Maximum >= Option then + ---@type number + local Selected = CurrentMenu.Index == Option + + ---@type boolean + local LeftArrowHovered, RightArrowHovered = false, false + + RageUI.ItemsSafeZone(CurrentMenu) + + local Hovered = false + local LeftBadgeOffset = ((Style?.LeftBadge == RageUI.BadgeStyle.None or tonumber(Style?.LeftBadge) == nil) and 0 or 27) + local RightBadgeOffset = ((Style?.RightBadge == RageUI.BadgeStyle.None or tonumber(Style?.RightBadge) == nil) and 0 or 32) + local RightOffset = 0 + + ---@type boolean + if CurrentMenu.EnableMouse == true then + Hovered = RageUI.ItemsMouseBounds(CurrentMenu, Selected, Option, SettingsButton) + end + + local ListText = (type(Items[Index]) == "table") and tostring(Items[Index].Name) or tostring(Items[Index]) or "NIL" + + local name = ListText + :gsub("é", "e") + :gsub("â", "a") + :gsub("à", "a") + :gsub("è", "e") + :gsub("ê", "e") + :gsub("î", "i") + :gsub("ç", "c") + :gsub("ô", "o") + :gsub("É", "E") + + local TextOffset = MeasureStringWidth(name, 0, 0.35) + + if Selected then + RenderSprite(SettingsButton.SelectedSprite.Dictionary, SettingsButton.SelectedSprite.Texture, CurrentMenu.X, CurrentMenu.Y + SettingsButton.SelectedSprite.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.SelectedSprite.Width + CurrentMenu.WidthOffset, SettingsButton.SelectedSprite.Height) + LeftArrowHovered = RageUI.IsMouseInBounds(CurrentMenu.X + SettingsList.LeftArrow.X - TextOffset + CurrentMenu.SafeZoneSize.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.LeftArrow.Y + CurrentMenu.SafeZoneSize.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.LeftArrow.Width, SettingsList.LeftArrow.Height) + RightArrowHovered = RageUI.IsMouseInBounds(CurrentMenu.X + SettingsList.RightArrow.X + CurrentMenu.SafeZoneSize.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.RightArrow.Y + CurrentMenu.SafeZoneSize.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.RightArrow.Width, SettingsList.RightArrow.Height) + end + + if Enabled == true or Enabled == nil then + if Selected then + if Style?.RightLabel ~= nil and Style.RightLabel ~= "" then + RenderText(Style.RightLabel, CurrentMenu.X + SettingsButton.RightText.X - RightBadgeOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightText.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.RightText.Scale, 0, 0, 0, 255, 2) + RightOffset = MeasureStringWidth(Style.RightLabel,0,0.35) + end + else + if Style?.RightLabel ~= nil and Style.RightLabel ~= "" then + RightOffset = MeasureStringWidth(Style.RightLabel,0,0.35) + RenderText(Style.RightLabel, CurrentMenu.X + SettingsButton.RightText.X - RightBadgeOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightText.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.RightText.Scale, 245, 245, 245, 255, 2) + end + end + end + + RightOffset = RightBadgeOffset * 1.3 + RightOffset + + if Enabled == true or Enabled == nil then + if Selected then + RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 0, 0, 0, 255) + + RenderSprite(SettingsList.LeftArrow.Dictionary, SettingsList.LeftArrow.Texture, CurrentMenu.X + SettingsList.LeftArrow.X - TextOffset- RightOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.LeftArrow.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.LeftArrow.Width, SettingsList.LeftArrow.Height, 0, 0, 0, 0, 255) + RenderSprite(SettingsList.RightArrow.Dictionary, SettingsList.RightArrow.Texture, CurrentMenu.X + SettingsList.RightArrow.X + CurrentMenu.WidthOffset - RightOffset, CurrentMenu.Y + SettingsList.RightArrow.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.RightArrow.Width, SettingsList.RightArrow.Height, 0, 0, 0, 0, 255) + + RenderText(ListText, CurrentMenu.X + SettingsList.Text.X + CurrentMenu.WidthOffset- RightOffset, CurrentMenu.Y + SettingsList.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsList.Text.Scale, 0, 0, 0, 255, 2) + else + RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 245, 245, 245, 255) + RenderText(ListText, CurrentMenu.X + SettingsList.Text.X + 15 + CurrentMenu.WidthOffset-RightOffset, CurrentMenu.Y + SettingsList.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsList.Text.Scale, 245, 245, 245, 255, 2) + end + else + RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + LeftBadgeOffset, CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 163, 159, 148, 255) + + if Selected then + RenderSprite(SettingsList.LeftArrow.Dictionary, SettingsList.LeftArrow.Texture, CurrentMenu.X + SettingsList.LeftArrow.X - TextOffset + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.LeftArrow.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.LeftArrow.Width, SettingsList.LeftArrow.Height, 0, 163, 159, 148, 255) + RenderSprite(SettingsList.RightArrow.Dictionary, SettingsList.RightArrow.Texture, CurrentMenu.X + SettingsList.RightArrow.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.RightArrow.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsList.RightArrow.Width, SettingsList.RightArrow.Height, 0, 163, 159, 148, 255) + + RenderText(ListText, CurrentMenu.X + SettingsList.Text.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsList.Text.Scale, 163, 159, 148, 255, 2) + else + RenderText(ListText, CurrentMenu.X + SettingsList.Text.X + 15 + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsList.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsList.Text.Scale, 163, 159, 148, 255, 2) + end + end + + if type(Style) == "table" then + if Style.Enabled == true or Style.Enabled == nil then + if type(Style) == 'table' then + if Style.LeftBadge ~= nil then + if Style.LeftBadge ~= RageUI.BadgeStyle.None and tonumber(Style.LeftBadge) ~= nil then + RenderSprite(RageUI.GetBadgeDictionary(Style.LeftBadge, Selected), RageUI.GetBadgeTexture(Style.LeftBadge, Selected), CurrentMenu.X, CurrentMenu.Y + SettingsButton.LeftBadge.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.LeftBadge.Width, SettingsButton.LeftBadge.Height, RageUI.GetBadgeColour(Style.LeftBadge, Selected)) + end + end + + if Style.RightBadge ~= nil then + if Style.RightBadge ~= RageUI.BadgeStyle.None and tonumber(Style.RightBadge) ~= nil then + RenderSprite(RageUI.GetBadgeDictionary(Style.RightBadge, Selected), RageUI.GetBadgeTexture(Style.RightBadge, Selected), CurrentMenu.X + SettingsButton.RightBadge.X + CurrentMenu.WidthOffset, CurrentMenu.Y + SettingsButton.RightBadge.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.RightBadge.Width, SettingsButton.RightBadge.Height, 0, RageUI.GetBadgeColour(Style.RightBadge, Selected)) + end + end + end + else + ---@type table + local LeftBadge = RageUI.BadgeStyle.Lock + + ---@type number + local LeftBadgeOffset = ((LeftBadge == RageUI.BadgeStyle.None or tonumber(LeftBadge) == nil) and 0 or 27) + + if LeftBadge ~= RageUI.BadgeStyle.None and tonumber(LeftBadge) ~= nil then + RenderSprite(RageUI.GetBadgeDictionary(LeftBadge, Selected), RageUI.GetBadgeTexture(LeftBadge, Selected), CurrentMenu.X, CurrentMenu.Y + SettingsButton.LeftBadge.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, SettingsButton.LeftBadge.Width, SettingsButton.LeftBadge.Height, nil, CheckBoxLockBadgeColor(Selected)) + end + end + end + + RageUI.ItemOffset = RageUI.ItemOffset + SettingsButton.Rectangle.Height + RageUI.ItemsDescription(CurrentMenu, Description, Selected) + + if Selected and (CurrentMenu.Controls.Left.Active or (CurrentMenu.Controls.Click.Active and LeftArrowHovered)) and not (CurrentMenu.Controls.Right.Active or (CurrentMenu.Controls.Click.Active and RightArrowHovered)) then + Index = Index - 1 + + if Index < 1 then + Index = #Items + end + + local Audio = RageUI.Settings.Audio + RageUI.PlaySound(Audio[Audio.Use].LeftRight.audioName, Audio[Audio.Use].LeftRight.audioRef) + elseif Selected and (CurrentMenu.Controls.Right.Active or (CurrentMenu.Controls.Click.Active and RightArrowHovered)) and not (CurrentMenu.Controls.Left.Active or (CurrentMenu.Controls.Click.Active and LeftArrowHovered)) then + Index = Index + 1 + + if Index > #Items then + Index = 1 + end + + local Audio = RageUI.Settings.Audio + RageUI.PlaySound(Audio[Audio.Use].LeftRight.audioName, Audio[Audio.Use].LeftRight.audioRef) + end + + if (Enabled) then + if Callback then + Callback(Hovered, Selected, ((CurrentMenu.Controls.Select.Active or ((Hovered and CurrentMenu.Controls.Click.Active) and (not LeftArrowHovered and not RightArrowHovered))) and Selected), Index) + end + end + + if Selected and (CurrentMenu.Controls.Select.Active or ((Hovered and CurrentMenu.Controls.Click.Active) and (not LeftArrowHovered and not RightArrowHovered))) then + local Audio = RageUI.Settings.Audio + RageUI.PlaySound(Audio[Audio.Use].Select.audioName, Audio[Audio.Use].Select.audioRef) + + if Submenu and Submenu() then + RageUI.NextMenu = Submenu + end + end + end + + RageUI.Options = RageUI.Options + 1 + end + end end \ No newline at end of file diff --git a/fxmanifest.lua b/fxmanifest.lua index 7d5690c..6c9a4c7 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -10,27 +10,27 @@ version '2.3' dependency 'es_extended' shared_scripts { - 'locale.lua', - 'locales/*.lua', - 'config.lua', - 'init.lua' + 'locale.lua', + 'locales/*.lua', + 'config.lua', + 'init.lua' } server_scripts { - '@mysql-async/lib/MySQL.lua', - 'server/main.lua' + '@mysql-async/lib/MySQL.lua', + 'server/main.lua' } client_scripts { - "dependencies/menu/RageUI.lua", - "dependencies/menu/Menu.lua", - "dependencies/menu/MenuController.lua", + "dependencies/menu/RageUI.lua", + "dependencies/menu/Menu.lua", + "dependencies/menu/MenuController.lua", - "dependencies/menu/elements/*.lua", - "dependencies/menu/items/*.lua", + "dependencies/menu/elements/*.lua", + "dependencies/menu/items/*.lua", - 'client/utils.lua', - 'client/main.lua', - 'client/showName.lua', - 'client/other.lua' + 'client/utils.lua', + 'client/main.lua', + 'client/showName.lua', + 'client/other.lua' } diff --git a/init.lua b/init.lua index f320c10..f3e1f58 100644 --- a/init.lua +++ b/init.lua @@ -1,10 +1,10 @@ VERSION = GetResourceMetadata(GetCurrentResourceName(), 'version', 0) print( - "^0======================================================================^7\n" .. - "^0[^4Author^0]^7 :^0 ^0Korioz^7\n" .. - ("^0[^3Version^0]^7 :^0 ^0%s^7\n"):format(VERSION) .. - "^0[^2Download^0]^7 :^0 ^5https://github.com/korioz/krz_personalmenu/releases^7\n" .. - "^0[^1Issues^0]^7 :^0 ^5https://github.com/korioz/krz_personalmenu/issues^7\n" .. - "^0======================================================================^7" + "^0======================================================================^7\n" .. + "^0[^4Author^0]^7 :^0 ^0Korioz^7\n" .. + ("^0[^3Version^0]^7 :^0 ^0%s^7\n"):format(VERSION) .. + "^0[^2Download^0]^7 :^0 ^5https://github.com/korioz/krz_personalmenu/releases^7\n" .. + "^0[^1Issues^0]^7 :^0 ^5https://github.com/korioz/krz_personalmenu/issues^7\n" .. + "^0======================================================================^7" ) diff --git a/locale.lua b/locale.lua index c19864a..63591d0 100644 --- a/locale.lua +++ b/locale.lua @@ -1,28 +1,28 @@ Locales = {} function i18n(str, ...) -- Translate string - if not str then - print(("[^1ERROR^7] Resource ^5%s^7 You did not specify a parameter for the Translate function or the value is nil!"):format(GetInvokingResource() or GetCurrentResourceName())) - return 'Given translate function parameter is nil!' - end + if not str then + print(("[^1ERROR^7] Resource ^5%s^7 You did not specify a parameter for the Translate function or the value is nil!"):format(GetInvokingResource() or GetCurrentResourceName())) + return 'Given translate function parameter is nil!' + end local localeCfg = Locales[Config.Locale] - if localeCfg then - if localeCfg[str] then - return string.format(localeCfg[str], ...) - elseif Config.Locale ~= 'en' and Locales['en'] and Locales['en'][str] then - return string.format(Locales['en'][str], ...) - else - return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exist' - end - elseif Config.Locale ~= 'en' and Locales['en'] and Locales['en'][str] then - return string.format(Locales['en'][str], ...) - else - return 'Locale [' .. Config.Locale .. '] does not exist' - end + if localeCfg then + if localeCfg[str] then + return string.format(localeCfg[str], ...) + elseif Config.Locale ~= 'en' and Locales['en'] and Locales['en'][str] then + return string.format(Locales['en'][str], ...) + else + return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exist' + end + elseif Config.Locale ~= 'en' and Locales['en'] and Locales['en'][str] then + return string.format(Locales['en'][str], ...) + else + return 'Locale [' .. Config.Locale .. '] does not exist' + end end function i18nU(str, ...) -- Translate string first char uppercase - return (i18n(str, ...):gsub("^%l", string.upper)) + return (i18n(str, ...):gsub("^%l", string.upper)) end \ No newline at end of file diff --git a/locales/br.lua b/locales/br.lua index 8dbe686..1ba3b02 100644 --- a/locales/br.lua +++ b/locales/br.lua @@ -1,249 +1,249 @@ Locales['br'] = { - -- DialogBox Name - ['dialogbox_playerid'] = 'ID do jogador:', - ['dialogbox_amount'] = 'Quantidade (Max. Caracteres (8) :', - ['dialogbox_amount_ammo'] = 'Quantidade de Munições (Max. Caracteres (8) ):', - ['dialogbox_vehiclespawner'] = 'Nome do Veículo (Max. Caracteres (8) ):', - ['dialogbox_xyz'] = 'Posição X Y Z (Max. Caracteres (50) ):', - - -- Menu Default Vars - ['default_gps'] = 'Desmacar', - ['default_attitude'] = 'Normal', - ['default_voice'] = 'Normal', - - -- Menu Notification - ['missing_rights'] = 'Você n\'não tem os ~r~direitos~w~', - ['no_vehicle'] = 'Você n\'não está em um veículo', - ['players_nearby'] = 'Nenhum jogador por perto', - ['amount_invalid'] = 'Quantidade inválida', - ['in_vehicle_give'] = 'Impossível dar %s em um veículo', - ['in_vehicle_drop'] = 'Impossível jogar %s em um veículo', - ['not_usable'] = '%s n\'não é utilizável', - ['not_droppable'] = '%s n\'não é descartável', - ['gave_ammo'] = 'Você deu x%s munições para %s', - ['no_ammo'] = 'Você não tem munição', - ['not_enough_ammo'] = 'Você não tem tantas munições', - ['accessories_no_ears'] = 'Vous ne possédez pas d\'Accessoire d\'Oreilles', - ['accessories_no_glasses'] = 'Você não tem um óculos', - ['accessories_no_helmet'] = 'Você não tem um capacete / chapéu', - ['accessories_no_mask'] = 'Você não tem uma máscara', - ['admin_noclipon'] = 'NoClip ~g~ativado', - ['admin_noclipoff'] = 'NoClip ~r~desativado', - ['admin_godmodeon'] = 'Godmod ~g~ativado', - ['admin_godmodeoff'] = 'Godmod ~r~desativado', - ['admin_ghoston'] = 'Ghostmod ~g~ativado', - ['admin_ghostoff'] = 'Ghostmod ~r~desativado', - ['admin_vehicleflip'] = 'Carro devolvido', - ['admin_tpmarker'] = 'Teleportado no marcador!', - ['admin_nomarker'] = 'Nenhum marcador no mapa!', - - -- Main Menu - ['mainmenu_subtitle'] = 'INTERAÇÃO MENU', - ['mainmenu_gps_button'] = 'GPS', - ['mainmenu_voice_button'] = 'Voz', - ['gps'] = 'GPS: ~b~%s', - ['approach'] = 'Estilo de andar: ~b~%s', - ['voice'] = 'Voz: ~b~%s', - - -- Menu Voice Level - ['voice_whisper'] = 'Sussurar', - ['voice_normal'] = 'Normal', - ['voice_cry'] = 'Gritar', - - -- Inventory Menu - ['inventory_title'] = 'Invetário', - ['inventory_actions_title'] = 'Invetário: Ação', - ['inventory_use_button'] = 'Usar', - ['inventory_give_button'] = 'Dar', - ['inventory_drop_button'] = 'Remover', - - -- Loadout Menu - ['loadout_title'] = 'Gestão de armas', - ['loadout_actions_title'] = 'Armas: Ação', - ['loadout_give_button'] = 'Dar', - ['loadout_givemun_button'] = 'Dar Munições', - ['loadout_drop_button'] = 'Remover', - - -- Wallet Menu - ['wallet_title'] = 'Portfólio', - ['wallet_option_give'] = 'Dar', - ['wallet_option_drop'] = 'Remover', - ['wallet_job_button'] = 'Profissão: %s - %s', - ['wallet_job2_button'] = 'Organisation: %s - %s', - ['wallet_money_button'] = 'Dinheiro: $%s', - ['wallet_bankmoney_button'] = 'Banco: $%s', - ['wallet_blackmoney_button'] = 'Dinheiro sujo: $%s', - ['wallet_show_idcard_button'] = 'Mostrar sua carteira de identidade', - ['wallet_check_idcard_button'] = 'Visualizar sua carteira de identidade', - ['wallet_show_driver_button'] = 'Mostrar sua carteira de motorista', - ['wallet_check_driver_button'] = 'Visualizar sua carteira de motorista', - ['wallet_show_firearms_button'] = 'Mostrar seu porte de armas', - ['wallet_check_firearms_button'] = 'Visualizar seu porte de armas', - - -- Bills Menu - ['bills_title'] = 'Faturas', - - -- Clothes Menu - ['clothes_title'] = 'Vestuário', - ['clothes_torso'] = 'Peito', - ['clothes_pants'] = 'Pernas', - ['clothes_shoes'] = 'Sapatos', - ['clothes_bag'] = 'Sac', - ['clothes_bproof'] = 'Colete', - - -- Accessories Menu - ['accessories_title'] = 'Acessórios', - ['accessories_ears'] = 'Accessórios para as Orelhas', - ['accessories_glasses'] = 'Óculos', - ['accessories_helmet'] = 'Chapeú / Capacete', - ['accessories_mask'] = 'Mascará', - - -- Animation Menu - ['animation_title'] = 'Animações', - - ['animation_party_title'] = 'Festivo', - ['animation_party_smoke'] = 'Fumar um cigarro', - ['animation_party_playsong'] = 'Tocando música', - ['animation_party_dj'] = 'DJ', - ['animation_party_beer'] = 'Festejando com refrigerante', - ['animation_party_dancing'] = 'Comemorar', - ['animation_party_airguitar'] = 'Guitarra no Ar', - ['animation_party_shagging'] = 'Air Shagging', - ['animation_party_rock'] = 'Rock\'n\'roll', - ['animation_party_drunk'] = 'Bourré sur place', - ['animation_party_vomit'] = 'Vômito de carro ', - ['animation_salute_title'] = 'Saudações', - ['animation_salute_saluate'] = 'Cumprimentar', - ['animation_salute_serrer'] = 'Apertar as mãos', - ['animation_salute_tchek'] = 'Eae mano!', - ['animation_salute_bandit'] = 'Cumprimentar de Bandido', - ['animation_salute_military'] = 'Cumprimentar de Militar', - ['animation_work_title'] = 'Trabalhar', - ['animation_work_suspect'] = 'Se render', - ['animation_work_fisherman'] = 'Pescador', - ['animation_work_inspect'] = 'Police : Investigar', - ['animation_work_radio'] = 'Police : Falar no rádio', - ['animation_work_circulation'] = 'Police : Circular', - ['animation_work_binoculars'] = 'Police : Binóculo', - ['animation_work_harvest'] = 'Agricultor : Colheita', - ['animation_work_repair'] = 'Dépanneur : réparer le moteur', - ['animation_work_observe'] = 'Médico : Observar', - ['animation_work_talk'] = 'Taxi : Falar com o cliente ', - ['animation_work_bill'] = 'Taxi : Cobrar a viagem', - ['animation_work_buy'] = 'Empilhador : Empilhar caixas ', - ['animation_work_shot'] = 'Barman : Servir um shot', - ['animation_work_picture'] = 'Jornalista : Tirar fotos', - ['animation_work_notes'] = 'Variados : Prancheta', - ['animation_work_hammer'] = 'Variados : Martelar paredes', - ['animation_work_beg'] = 'SDF : Esmola', - ['animation_work_statue'] = 'SDF : Estátua', - ['animation_mood_title'] = 'Humor', - ['animation_mood_felicitate'] = 'Palmas', - ['animation_mood_nice'] = 'Joinha', - ['animation_mood_you'] = 'Você', - ['animation_mood_come'] = 'Vem', - ['animation_mood_what'] = 'Qual foi mano ?', - ['animation_mood_me'] = 'A moi', - ['animation_mood_seriously'] = 'Eu sabia disso', - ['animation_mood_tired'] = 'Estou exausto', - ['animation_mood_shit'] = 'Estou fudido', - ['animation_mood_facepalm'] = 'Desapontado', - ['animation_mood_calm'] = 'Calma', - ['animation_mood_why'] = 'Qu\'est ce que j\'ai fait ?', - ['animation_mood_fear'] = 'Assustado', - ['animation_mood_fight'] = 'Se aquecendo para lutar', - ['animation_mood_notpossible'] = 'Não é possível', - ['animation_mood_embrace'] = 'Enlacer', - ['animation_mood_fuckyou'] = 'Foda-se', - ['animation_mood_wanker'] = 'Punheta', - ['animation_mood_suicide'] = 'Suicídio', - ['animation_sports_title'] = 'Esportes', - ['animation_sports_muscle'] = 'Mostrar músculos', - ['animation_sports_weightbar'] = 'Levantar barra de musculação', - ['animation_sports_pushup'] = 'Faire des pompes', - ['animation_sports_abs'] = 'Faire des abdos', - ['animation_sports_yoga'] = 'Faire du yoga', - ['animation_other_title'] = 'Variados', - ['animation_other_sit'] = 'Sauce', - ['animation_other_waitwall'] = 'Encostado fumando um cigarro', - ['animation_other_ontheback'] = 'Deitado pra cima', - ['animation_other_stomach'] = 'Deitado de costa', - ['animation_other_clean'] = 'Limpar', - ['animation_other_cooking'] = 'Preparar refeição', - ['animation_other_search'] = 'Position de Fouille', - ['animation_other_selfie'] = 'Tirar uma selfie', - ['animation_other_door'] = 'Escutar uma porta', - ['animation_pegi_title'] = 'PEGI 21', - ['animation_pegi_hsuck'] = 'Boquete no carro', - ['animation_pegi_fsuck'] = 'Femme suc** en voiture', - ['animation_pegi_hfuck'] = 'Homme bais** en voiture', - ['animation_pegi_ffuck'] = 'Femme bais** en voiture', - ['animation_pegi_scratch'] = 'Mãos nas bolas', - ['animation_pegi_charm'] = 'Fazer charme', - ['animation_pegi_golddigger'] = 'Fumar com pose', - ['animation_pegi_breast'] = 'Mostar peitinhos', - ['animation_pegi_strip1'] = 'Strip Tease 1', - ['animation_pegi_strip2'] = 'Strip Tease 2', - ['animation_pegi_stripfloor'] = 'Strip Tease au sol', - ['animation_attitudes_title'] = 'Estilo de andar', - - -- Vehicle Menu - ['vehicle_title'] = 'Gestão do veículo', - ['vehicle_engine_button'] = 'Ligar / Desligar Motor', - ['vehicle_door_button'] = 'Abrir / Fechar Porta', - ['vehicle_hood_button'] = 'Abrir / Fechar Capô', - ['vehicle_trunk_button'] = 'Abrir / Fechar Porta-malas', - ['vehicle_door_frontleft'] = 'Frente Esquerda', - ['vehicle_door_frontright'] = 'Frente Direita', - ['vehicle_door_backleft'] = 'Traseira esquerda', - ['vehicle_door_backright'] = 'Traseira direita', - - -- Boss Management Menu - ['bossmanagement_title'] = 'Gestão Empresarial', - ['bossmanagement_chest_button'] = 'Cofre empresarial:', - ['bossmanagement_hire_button'] = 'Recruta', - ['bossmanagement_fire_button'] = 'Virer', - ['bossmanagement_promote_button'] = 'Promover', - ['bossmanagement_demote_button'] = 'Remover', - - -- Boss Management 2 Menu - ['bossmanagement2_title'] = 'Gestão Organização', - ['bossmanagement2_chest_button'] = 'Cofre da organização:', - ['bossmanagement2_hire_button'] = 'Recruta', - ['bossmanagement2_fire_button'] = 'Virer', - ['bossmanagement2_promote_button'] = 'Promouvoir', - ['bossmanagement2_demote_button'] = 'Destituer', - - -- Admin Menu - ['admin_title'] = 'Administração', - ['admin_goto_button'] = 'Teleportar no jogador', - ['admin_bring_button'] = 'Teleportar jogador pra você', - ['admin_tpxyz_button'] = 'Teleportar para as coordenadas', - ['admin_noclip_button'] = 'NoClip', - ['admin_godmode_button'] = 'Godmod', - ['admin_ghostmode_button'] = 'Ghostmod', - ['admin_spawnveh_button'] = 'Spawnar Veículo', - ['admin_repairveh_button'] = 'Reparar veículo', - ['admin_flipveh_button'] = 'Puxar veículo', - ['admin_givemoney_button'] = 'Conceder dinheiro', - ['admin_givebank_button'] = 'Conceder dinheiro(Banco)', - ['admin_givedirtymoney_button'] = 'Conceda dinheiro sujo', - ['admin_showxyz_button'] = 'Mostrar / Ocultar coordenadas', - ['admin_showname_button'] = 'Mostrar / Ocultar nomes dos jogadores', - ['admin_tpmarker_button'] = 'Teleporte para a localização marcada', - ['admin_revive_button'] = 'Reviver jogador', - ['admin_changeskin_button'] = 'Mudar aparência', - ['admin_saveskin_button'] = 'Salvar aparência', - - -- GPS - ['none'] = 'No Location', -- No translated - ['police_station'] = 'Police Station', -- No translated - ['central_garage'] = 'Central garage', -- No translated - ['hospital'] = 'Hospital', -- No translated - ['dealer'] = 'Cardealer', -- No translated - ['bennys_custom'] = 'Bennys Custom', -- No translated - ['job_center'] = 'Employment center', -- No translated - ['driving_school'] = 'Driving school', -- No translated - ['tequila-la'] = 'tequila-la', -- No translated - ['bahama_mamas'] = 'bahama_mamas' -- No translated + -- DialogBox Name + ['dialogbox_playerid'] = 'ID do jogador:', + ['dialogbox_amount'] = 'Quantidade (Max. Caracteres (8) :', + ['dialogbox_amount_ammo'] = 'Quantidade de Munições (Max. Caracteres (8) ):', + ['dialogbox_vehiclespawner'] = 'Nome do Veículo (Max. Caracteres (8) ):', + ['dialogbox_xyz'] = 'Posição X Y Z (Max. Caracteres (50) ):', + + -- Menu Default Vars + ['default_gps'] = 'Desmacar', + ['default_attitude'] = 'Normal', + ['default_voice'] = 'Normal', + + -- Menu Notification + ['missing_rights'] = 'Você n\'não tem os ~r~direitos~w~', + ['no_vehicle'] = 'Você n\'não está em um veículo', + ['players_nearby'] = 'Nenhum jogador por perto', + ['amount_invalid'] = 'Quantidade inválida', + ['in_vehicle_give'] = 'Impossível dar %s em um veículo', + ['in_vehicle_drop'] = 'Impossível jogar %s em um veículo', + ['not_usable'] = '%s n\'não é utilizável', + ['not_droppable'] = '%s n\'não é descartável', + ['gave_ammo'] = 'Você deu x%s munições para %s', + ['no_ammo'] = 'Você não tem munição', + ['not_enough_ammo'] = 'Você não tem tantas munições', + ['accessories_no_ears'] = 'Vous ne possédez pas d\'Accessoire d\'Oreilles', + ['accessories_no_glasses'] = 'Você não tem um óculos', + ['accessories_no_helmet'] = 'Você não tem um capacete / chapéu', + ['accessories_no_mask'] = 'Você não tem uma máscara', + ['admin_noclipon'] = 'NoClip ~g~ativado', + ['admin_noclipoff'] = 'NoClip ~r~desativado', + ['admin_godmodeon'] = 'Godmod ~g~ativado', + ['admin_godmodeoff'] = 'Godmod ~r~desativado', + ['admin_ghoston'] = 'Ghostmod ~g~ativado', + ['admin_ghostoff'] = 'Ghostmod ~r~desativado', + ['admin_vehicleflip'] = 'Carro devolvido', + ['admin_tpmarker'] = 'Teleportado no marcador!', + ['admin_nomarker'] = 'Nenhum marcador no mapa!', + + -- Main Menu + ['mainmenu_subtitle'] = 'INTERAÇÃO MENU', + ['mainmenu_gps_button'] = 'GPS', + ['mainmenu_voice_button'] = 'Voz', + ['gps'] = 'GPS: ~b~%s', + ['approach'] = 'Estilo de andar: ~b~%s', + ['voice'] = 'Voz: ~b~%s', + + -- Menu Voice Level + ['voice_whisper'] = 'Sussurar', + ['voice_normal'] = 'Normal', + ['voice_cry'] = 'Gritar', + + -- Inventory Menu + ['inventory_title'] = 'Invetário', + ['inventory_actions_title'] = 'Invetário: Ação', + ['inventory_use_button'] = 'Usar', + ['inventory_give_button'] = 'Dar', + ['inventory_drop_button'] = 'Remover', + + -- Loadout Menu + ['loadout_title'] = 'Gestão de armas', + ['loadout_actions_title'] = 'Armas: Ação', + ['loadout_give_button'] = 'Dar', + ['loadout_givemun_button'] = 'Dar Munições', + ['loadout_drop_button'] = 'Remover', + + -- Wallet Menu + ['wallet_title'] = 'Portfólio', + ['wallet_option_give'] = 'Dar', + ['wallet_option_drop'] = 'Remover', + ['wallet_job_button'] = 'Profissão: %s - %s', + ['wallet_job2_button'] = 'Organisation: %s - %s', + ['wallet_money_button'] = 'Dinheiro: $%s', + ['wallet_bankmoney_button'] = 'Banco: $%s', + ['wallet_blackmoney_button'] = 'Dinheiro sujo: $%s', + ['wallet_show_idcard_button'] = 'Mostrar sua carteira de identidade', + ['wallet_check_idcard_button'] = 'Visualizar sua carteira de identidade', + ['wallet_show_driver_button'] = 'Mostrar sua carteira de motorista', + ['wallet_check_driver_button'] = 'Visualizar sua carteira de motorista', + ['wallet_show_firearms_button'] = 'Mostrar seu porte de armas', + ['wallet_check_firearms_button'] = 'Visualizar seu porte de armas', + + -- Bills Menu + ['bills_title'] = 'Faturas', + + -- Clothes Menu + ['clothes_title'] = 'Vestuário', + ['clothes_torso'] = 'Peito', + ['clothes_pants'] = 'Pernas', + ['clothes_shoes'] = 'Sapatos', + ['clothes_bag'] = 'Sac', + ['clothes_bproof'] = 'Colete', + + -- Accessories Menu + ['accessories_title'] = 'Acessórios', + ['accessories_ears'] = 'Accessórios para as Orelhas', + ['accessories_glasses'] = 'Óculos', + ['accessories_helmet'] = 'Chapeú / Capacete', + ['accessories_mask'] = 'Mascará', + + -- Animation Menu + ['animation_title'] = 'Animações', + + ['animation_party_title'] = 'Festivo', + ['animation_party_smoke'] = 'Fumar um cigarro', + ['animation_party_playsong'] = 'Tocando música', + ['animation_party_dj'] = 'DJ', + ['animation_party_beer'] = 'Festejando com refrigerante', + ['animation_party_dancing'] = 'Comemorar', + ['animation_party_airguitar'] = 'Guitarra no Ar', + ['animation_party_shagging'] = 'Air Shagging', + ['animation_party_rock'] = 'Rock\'n\'roll', + ['animation_party_drunk'] = 'Bourré sur place', + ['animation_party_vomit'] = 'Vômito de carro ', + ['animation_salute_title'] = 'Saudações', + ['animation_salute_saluate'] = 'Cumprimentar', + ['animation_salute_serrer'] = 'Apertar as mãos', + ['animation_salute_tchek'] = 'Eae mano!', + ['animation_salute_bandit'] = 'Cumprimentar de Bandido', + ['animation_salute_military'] = 'Cumprimentar de Militar', + ['animation_work_title'] = 'Trabalhar', + ['animation_work_suspect'] = 'Se render', + ['animation_work_fisherman'] = 'Pescador', + ['animation_work_inspect'] = 'Police : Investigar', + ['animation_work_radio'] = 'Police : Falar no rádio', + ['animation_work_circulation'] = 'Police : Circular', + ['animation_work_binoculars'] = 'Police : Binóculo', + ['animation_work_harvest'] = 'Agricultor : Colheita', + ['animation_work_repair'] = 'Dépanneur : réparer le moteur', + ['animation_work_observe'] = 'Médico : Observar', + ['animation_work_talk'] = 'Taxi : Falar com o cliente ', + ['animation_work_bill'] = 'Taxi : Cobrar a viagem', + ['animation_work_buy'] = 'Empilhador : Empilhar caixas ', + ['animation_work_shot'] = 'Barman : Servir um shot', + ['animation_work_picture'] = 'Jornalista : Tirar fotos', + ['animation_work_notes'] = 'Variados : Prancheta', + ['animation_work_hammer'] = 'Variados : Martelar paredes', + ['animation_work_beg'] = 'SDF : Esmola', + ['animation_work_statue'] = 'SDF : Estátua', + ['animation_mood_title'] = 'Humor', + ['animation_mood_felicitate'] = 'Palmas', + ['animation_mood_nice'] = 'Joinha', + ['animation_mood_you'] = 'Você', + ['animation_mood_come'] = 'Vem', + ['animation_mood_what'] = 'Qual foi mano ?', + ['animation_mood_me'] = 'A moi', + ['animation_mood_seriously'] = 'Eu sabia disso', + ['animation_mood_tired'] = 'Estou exausto', + ['animation_mood_shit'] = 'Estou fudido', + ['animation_mood_facepalm'] = 'Desapontado', + ['animation_mood_calm'] = 'Calma', + ['animation_mood_why'] = 'Qu\'est ce que j\'ai fait ?', + ['animation_mood_fear'] = 'Assustado', + ['animation_mood_fight'] = 'Se aquecendo para lutar', + ['animation_mood_notpossible'] = 'Não é possível', + ['animation_mood_embrace'] = 'Enlacer', + ['animation_mood_fuckyou'] = 'Foda-se', + ['animation_mood_wanker'] = 'Punheta', + ['animation_mood_suicide'] = 'Suicídio', + ['animation_sports_title'] = 'Esportes', + ['animation_sports_muscle'] = 'Mostrar músculos', + ['animation_sports_weightbar'] = 'Levantar barra de musculação', + ['animation_sports_pushup'] = 'Faire des pompes', + ['animation_sports_abs'] = 'Faire des abdos', + ['animation_sports_yoga'] = 'Faire du yoga', + ['animation_other_title'] = 'Variados', + ['animation_other_sit'] = 'Sauce', + ['animation_other_waitwall'] = 'Encostado fumando um cigarro', + ['animation_other_ontheback'] = 'Deitado pra cima', + ['animation_other_stomach'] = 'Deitado de costa', + ['animation_other_clean'] = 'Limpar', + ['animation_other_cooking'] = 'Preparar refeição', + ['animation_other_search'] = 'Position de Fouille', + ['animation_other_selfie'] = 'Tirar uma selfie', + ['animation_other_door'] = 'Escutar uma porta', + ['animation_pegi_title'] = 'PEGI 21', + ['animation_pegi_hsuck'] = 'Boquete no carro', + ['animation_pegi_fsuck'] = 'Femme suc** en voiture', + ['animation_pegi_hfuck'] = 'Homme bais** en voiture', + ['animation_pegi_ffuck'] = 'Femme bais** en voiture', + ['animation_pegi_scratch'] = 'Mãos nas bolas', + ['animation_pegi_charm'] = 'Fazer charme', + ['animation_pegi_golddigger'] = 'Fumar com pose', + ['animation_pegi_breast'] = 'Mostar peitinhos', + ['animation_pegi_strip1'] = 'Strip Tease 1', + ['animation_pegi_strip2'] = 'Strip Tease 2', + ['animation_pegi_stripfloor'] = 'Strip Tease au sol', + ['animation_attitudes_title'] = 'Estilo de andar', + + -- Vehicle Menu + ['vehicle_title'] = 'Gestão do veículo', + ['vehicle_engine_button'] = 'Ligar / Desligar Motor', + ['vehicle_door_button'] = 'Abrir / Fechar Porta', + ['vehicle_hood_button'] = 'Abrir / Fechar Capô', + ['vehicle_trunk_button'] = 'Abrir / Fechar Porta-malas', + ['vehicle_door_frontleft'] = 'Frente Esquerda', + ['vehicle_door_frontright'] = 'Frente Direita', + ['vehicle_door_backleft'] = 'Traseira esquerda', + ['vehicle_door_backright'] = 'Traseira direita', + + -- Boss Management Menu + ['bossmanagement_title'] = 'Gestão Empresarial', + ['bossmanagement_chest_button'] = 'Cofre empresarial:', + ['bossmanagement_hire_button'] = 'Recruta', + ['bossmanagement_fire_button'] = 'Virer', + ['bossmanagement_promote_button'] = 'Promover', + ['bossmanagement_demote_button'] = 'Remover', + + -- Boss Management 2 Menu + ['bossmanagement2_title'] = 'Gestão Organização', + ['bossmanagement2_chest_button'] = 'Cofre da organização:', + ['bossmanagement2_hire_button'] = 'Recruta', + ['bossmanagement2_fire_button'] = 'Virer', + ['bossmanagement2_promote_button'] = 'Promouvoir', + ['bossmanagement2_demote_button'] = 'Destituer', + + -- Admin Menu + ['admin_title'] = 'Administração', + ['admin_goto_button'] = 'Teleportar no jogador', + ['admin_bring_button'] = 'Teleportar jogador pra você', + ['admin_tpxyz_button'] = 'Teleportar para as coordenadas', + ['admin_noclip_button'] = 'NoClip', + ['admin_godmode_button'] = 'Godmod', + ['admin_ghostmode_button'] = 'Ghostmod', + ['admin_spawnveh_button'] = 'Spawnar Veículo', + ['admin_repairveh_button'] = 'Reparar veículo', + ['admin_flipveh_button'] = 'Puxar veículo', + ['admin_givemoney_button'] = 'Conceder dinheiro', + ['admin_givebank_button'] = 'Conceder dinheiro(Banco)', + ['admin_givedirtymoney_button'] = 'Conceda dinheiro sujo', + ['admin_showxyz_button'] = 'Mostrar / Ocultar coordenadas', + ['admin_showname_button'] = 'Mostrar / Ocultar nomes dos jogadores', + ['admin_tpmarker_button'] = 'Teleporte para a localização marcada', + ['admin_revive_button'] = 'Reviver jogador', + ['admin_changeskin_button'] = 'Mudar aparência', + ['admin_saveskin_button'] = 'Salvar aparência', + + -- GPS + ['none'] = 'No Location', -- No translated + ['police_station'] = 'Police Station', -- No translated + ['central_garage'] = 'Central garage', -- No translated + ['hospital'] = 'Hospital', -- No translated + ['dealer'] = 'Cardealer', -- No translated + ['bennys_custom'] = 'Bennys Custom', -- No translated + ['job_center'] = 'Employment center', -- No translated + ['driving_school'] = 'Driving school', -- No translated + ['tequila-la'] = 'tequila-la', -- No translated + ['bahama_mamas'] = 'bahama_mamas' -- No translated } \ No newline at end of file diff --git a/locales/de.lua b/locales/de.lua index 4c15dc8..8286808 100644 --- a/locales/de.lua +++ b/locales/de.lua @@ -1,249 +1,249 @@ Locales['de'] = { - -- DialogBox Name - ['dialogbox_playerid'] = 'Player ID (8 Zeichen Maximum):', - ['dialogbox_amount'] = 'Amount (8 Zeichen Maximum):', - ['dialogbox_amount_ammo'] = 'Amount Amount (8 Zeichen Maximum):', - ['dialogbox_vehiclespawner'] = 'Vehicle Name (50 Zeichen Maximum):', - ['dialogbox_xyz'] = 'XYZ Position (50 Zeichen Maximum):', - - -- Menu Default Vars - ['default_gps'] = 'None', - ['default_attitude'] = 'Normal', - ['default_voice'] = 'Normal', - - -- Menu Notification - ['missing_rights'] = 'Du hast nicht die ~r~Rechte~w~', - ['no_vehicle'] = 'Du bist in keinem Fahrzeug', - ['players_nearby'] = 'Keine Spieler in der Nähe', - ['amount_invalid'] = 'Ungültiger Betrag', - ['in_vehicle_give'] = '%s kann nicht im Auto gegeben werden', - ['in_vehicle_drop'] = 'Can not throw %s in a vehicle', - ['not_usable'] = '%s ist nicht verwendbar', - ['not_droppable'] = '%s ist nicht wegwerfbar', - ['gave_ammo'] = 'Du hast x %s Munition an %s gegeben', - ['no_ammo'] = 'Du hast keine Munition', - ['not_enough_ammo'] = 'Du hast nicht so viel Munition', - ['accessories_no_ears'] = 'Du hast kein Ohr Zubehör', - ['accessories_no_glasses'] = 'Du hast keine Brille', - ['accessories_no_helmet'] = 'Du hast keinen Helm/Hut', - ['accessories_no_mask'] = 'Du hast keine Maske', - ['admin_noclipon'] = 'NoClip ~g~ aktiviert', - ['admin_noclipoff'] = 'NoClip ~r~ deaktiviert', - ['admin_godmodeon'] = 'Invincible ~g~ aktiviert', - ['admin_godmodeoff'] = 'Invincible ~r~ deaktiviert', - ['admin_ghoston'] = 'Ghost mode ~g~ aktiviert', - ['admin_ghostoff'] = 'Ghost mode ~r~ deaktiviert', - ['admin_vehicleflip'] = 'Auto zurückgegeben', - ['admin_tpmarker'] = 'Teleportiert zur Markierung!', - ['admin_nomarker'] = 'Keine Markierung auf der Karte', - - -- Main Menu - ['mainmenu_subtitle'] = 'INTERAKTIONSMENÜ', - ['mainmenu_gps_button'] = 'GPS', - ['mainmenu_voice_button'] = 'Stimme', - ['gps'] = 'GPS: ~b~%s', - ['approach'] = 'Approach: ~b~%s', - ['voice'] = 'Stimme: ~b~%s', - - -- Menu Voice Level - ['voice_whisper'] = ' Flüstern', - ['voice_normal'] = 'Normal', - ['voice_cry'] = 'Schreien', - - -- Inventory Menu - ['inventory_title'] = 'Inventar', - ['inventory_actions_title'] = 'Inventar: Aktion', - ['inventory_use_button'] = 'Benutzen', - ['inventory_give_button'] = 'Geben', - ['inventory_drop_button'] = 'Verwerfen', - - -- Loadout Menu - ['loadout_title'] = 'Waffenmenü', - ['loadout_actions_title'] = 'Waffen: Aktion', - ['loadout_give_button'] = 'Geben', - ['loadout_givemun_button'] = 'Munition geben', - ['loadout_drop_button'] = 'Verwerfen', - - -- Wallet Menu - ['wallet_title'] = 'Brieftasche', - ['wallet_option_give'] = 'Geben', - ['wallet_option_drop'] = 'Verwerfen', - ['wallet_job_button'] = 'Beruf: %s - %s', - ['wallet_job2_button'] = 'Organisation: %s - %s', - ['wallet_money_button'] = 'Bargeld: $%s', - ['wallet_bankmoney_button'] = 'Bank: $%s', - ['wallet_blackmoney_button'] = 'Schwarzgeld: $%s', - ['wallet_show_idcard_button'] = 'Personalausweis zeigen', - ['wallet_check_idcard_button'] = 'Personalausweis anschauen', - ['wallet_show_driver_button'] = 'Führerschein zeigen', - ['wallet_check_driver_button'] = 'Führerschein anschauen', - ['wallet_show_firearms_button'] = 'Waffenlizenz zeigen', - ['wallet_check_firearms_button'] = 'Waffenlizenz anschauen', - - -- Bills Menu - ['bills_title'] = 'Rechnungen', - - -- Clothes Menu - ['clothes_title'] = 'Kleidungsmenü', - ['clothes_torso'] = 'Oberteil', - ['clothes_pants'] = 'Hose', - ['clothes_shoes'] = 'Schuhe', - ['clothes_bag'] = 'Rucksack', - ['clothes_bproof'] = 'Schusssichere Weste', - - -- Accessories Menu - ['accessories_title'] = 'Zubehör', - ['accessories_ears'] = 'Ohren Zubehör', - ['accessories_glasses'] = 'Brille', - ['accessories_helmet'] = 'Hut / Helm', - ['accessories_mask'] = 'Maske', - - -- Animation Menu - ['animation_title'] = 'Animationen', - - ['animation_party_title'] = 'Festivals', - ['animation_party_smoke'] = 'Smoking a cigarette', - ['animation_party_playsong'] = 'Play music', - ['animation_party_dj'] = 'DJ', - ['animation_party_beer'] = 'Beer en Zik', - ['animation_party_dancing'] = 'Make the party', - ['animation_party_airguitar'] = 'Air Guitar', - ['animation_party_shagging'] = 'Air Shagging', - ['animation_party_rock'] = 'Rock n roll', - ['animation_party_drunk'] = 'Stuck on the spot', - ['animation_party_vomit'] = 'Vomit by car', - ['animation_salute_title'] = 'Greetings', - ['animation_salute_saluate'] = 'Greet', - ['animation_salute_serrer'] = 'Shake hands', - ['animation_salute_tchek'] = 'Chek', - ['animation_salute_bandit'] = 'Hi bandit', - ['animation_salute_military'] = 'Hi Military', - ['animation_work_title'] = 'Work', - ['animation_work_suspect'] = 'surrender', - ['animation_work_fisherman'] = 'Fisherman', - ['animation_work_inspect'] = 'Font: investigate', - ['animation_work_radio'] = 'Font: talk on the radio', - ['animation_work_circulation'] = 'Font: circulation', - ['animation_work_binoculars'] = 'Font: binoculars', - ['animation_work_harvest'] = 'Agriculture: harvest', - ['animation_work_repair'] = 'Troubleshooter: repair the engine', - ['animation_work_observe'] = 'Doctor: observe', - ['animation_work_talk'] = 'Taxi: talk to the customer', - ['animation_work_bill'] = 'Taxi: give the bill', - ['animation_work_buy'] = 'Grocer: give the groceries', - ['animation_work_shot'] = 'Bartender: serve a shot', - ['animation_work_picture'] = 'Reporter: Take a picture', - ['animation_work_notes'] = 'All: Take notes', - ['animation_work_hammer'] = 'All: Hammer blow', - ['animation_work_beg'] = 'SDF: Make the round', - ['animation_work_statue'] = 'SDF: Make the statue', - ['animation_mood_title'] = 'Moods', - ['animation_mood_felicitate'] = 'Congratulate', - ['animation_mood_nice'] = 'Super', - ['animation_mood_you'] = 'You', - ['animation_mood_come'] = 'Come', - ['animation_mood_what'] = 'Keskya?', - ['animation_mood_me'] = 'To me', - ['animation_mood_seriously'] = 'I knew it, fuckin', - ['animation_mood_tired'] = 'To be exhausted', - ['animation_mood_shit'] = 'Im in the shit', - ['animation_mood_facepalm'] = 'Facepalm', - ['animation_mood_calm'] = 'Calm down', - ['animation_mood_why'] = 'What did I do?', - ['animation_mood_fear'] = 'Be afraid', - ['animation_mood_fight'] = 'Fight?', - ['animation_mood_notpossible'] = 'Its not Possible!', - ['animation_mood_embrace'] = 'Enlacer', - ['animation_mood_fuckyou'] = 'Finger of Honor', - ['animation_mood_wanker'] = 'Wanker', - ['animation_mood_suicide'] = 'Ball in the head', - ['animation_sports_title'] = 'Sports', - ['animation_sports_muscle'] = 'Show your muscles', - ['animation_sports_weightbar'] = 'Weight bar', - ['animation_sports_pushup'] = 'Make pumps', - ['animation_sports_abs'] = 'Make abs', - ['animation_sports_yoga'] = 'Do yoga', - ['animation_other_title'] = 'Miscellaneous', - ['animation_other_sit'] = 'Sit ', - ['animation_other_waitwall'] = 'Wait against a wall', - ['animation_other_ontheback'] = 'Lying on the back', - ['animation_other_stomach'] = 'Lying on the stomach', - ['animation_other_clean'] = 'Clean', - ['animation_other_cooking'] = 'Prepare to eat', - ['animation_other_search'] = 'Search Position', - ['animation_other_selfie'] = 'Take a selfie', - ['animation_other_door'] = 'Listen to a door', - ['animation_pegi_title'] = 'PEGI 21', - ['animation_pegi_hsuck'] = 'Man getting sucked in the car', - ['animation_pegi_fsuck'] = 'Woman sucks in the car', - ['animation_pegi_hfuck'] = 'Man kiss ** by car', - ['animation_pegi_ffuck'] = 'Woman fucked by car', - ['animation_pegi_scratch'] = 'Scratching the balls', - ['animation_pegi_charm'] = 'Make charm', - ['animation_pegi_golddigger'] = 'pose michto', - ['animation_pegi_breast'] = 'Show his chest', - ['animation_pegi_strip1'] = 'Strip Tease 1', - ['animation_pegi_strip2'] = 'Strip Tease 2', - ['animation_pegi_stripfloor'] = 'Strip Tease on the ground', - ['animation_attitudes_title'] = 'Approach', - - -- Vehicle Menu - ['vehicle_title'] = 'Fahrzeugmenü', - ['vehicle_engine_button'] = 'Motor an/aus schalten', - ['vehicle_door_button'] = 'Tür öffnen/schließen', - ['vehicle_hood_button'] = 'Motorhaube öffnen/schließen', - ['vehicle_trunk_button'] = 'Kofferraum öffnen/schließen', - ['vehicle_door_frontleft'] = 'Vorne Links', - ['vehicle_door_frontright'] = 'Vorne Rechts', - ['vehicle_door_backleft'] = 'Hinten Links', - ['vehicle_door_backright'] = 'Hinten Rechts', - - -- Boss Management Menu - ['bossmanagement_title'] = 'Firmen Managment', - ['bossmanagement_chest_button'] = 'Tresor: ', - ['bossmanagement_hire_button'] = 'Einstellen', - ['bossmanagement_fire_button'] = 'Entlassen', - ['bossmanagement_promote_button'] = 'Befördern', - ['bossmanagement_demote_button'] = 'Degradieren', - - -- Boss Management 2 Menu - ['bossmanagement2_title'] = 'Organisation Management', - ['bossmanagement2_chest_button'] = 'Organisation Truhe:', - ['bossmanagement2_hire_button'] = 'Einstellen', - ['bossmanagement2_fire_button'] = 'Entlassen', - ['bossmanagement2_promote_button'] = 'Befördern', - ['bossmanagement2_demote_button'] = 'Degradieren', - - -- Admin Menu - ['admin_title'] = 'Administration', - ['admin_goto_button'] = 'TP zu Spieler', - ['admin_bring_button'] = 'TP Spieler zu mir', - ['admin_tpxyz_button'] = 'TP zu Koordinaten', - ['admin_noclip_button'] = 'NoClip', - ['admin_godmode_button'] = 'GodMode', - ['admin_ghostmode_button'] = 'Unsichtbarer Modus', - ['admin_spawnveh_button'] = 'Fahrzeug spawnen', - ['admin_repairveh_button'] = 'Fahrzeug reparieren', - ['admin_flipveh_button'] = 'Rückgabe des Fahrzeugs', - ['admin_givemoney_button'] = 'Geld geben ', - ['admin_givebank_button'] = 'Geld geben (bank) ', - ['admin_givedirtymoney_button'] = 'Schwarzgeld senden', - ['admin_showxyz_button'] = 'Koordinaten ein-/ausblenden', - ['admin_showname_button'] = 'Spielernamen ein-/ausblenden', - ['admin_tpmarker_button'] = 'Zur Markierung teleportieren', - ['admin_revive_button'] = 'Spieler wiederbeleben', - ['admin_changeskin_button'] = 'Aussehen ändern', - ['admin_saveskin_button'] = 'Aussehen speichern', - - -- GPS - ['none'] = 'No Location', -- No translated - ['police_station'] = 'Police Station', -- No translated - ['central_garage'] = 'Central garage', -- No translated - ['hospital'] = 'Hospital', -- No translated - ['dealer'] = 'Cardealer', -- No translated - ['bennys_custom'] = 'Bennys Custom', -- No translated - ['job_center'] = 'Employment center', -- No translated - ['driving_school'] = 'Driving school', -- No translated - ['tequila-la'] = 'tequila-la', -- No translated - ['bahama_mamas'] = 'bahama_mamas' -- No translated + -- DialogBox Name + ['dialogbox_playerid'] = 'Player ID (8 Zeichen Maximum):', + ['dialogbox_amount'] = 'Amount (8 Zeichen Maximum):', + ['dialogbox_amount_ammo'] = 'Amount Amount (8 Zeichen Maximum):', + ['dialogbox_vehiclespawner'] = 'Vehicle Name (50 Zeichen Maximum):', + ['dialogbox_xyz'] = 'XYZ Position (50 Zeichen Maximum):', + + -- Menu Default Vars + ['default_gps'] = 'None', + ['default_attitude'] = 'Normal', + ['default_voice'] = 'Normal', + + -- Menu Notification + ['missing_rights'] = 'Du hast nicht die ~r~Rechte~w~', + ['no_vehicle'] = 'Du bist in keinem Fahrzeug', + ['players_nearby'] = 'Keine Spieler in der Nähe', + ['amount_invalid'] = 'Ungültiger Betrag', + ['in_vehicle_give'] = '%s kann nicht im Auto gegeben werden', + ['in_vehicle_drop'] = 'Can not throw %s in a vehicle', + ['not_usable'] = '%s ist nicht verwendbar', + ['not_droppable'] = '%s ist nicht wegwerfbar', + ['gave_ammo'] = 'Du hast x %s Munition an %s gegeben', + ['no_ammo'] = 'Du hast keine Munition', + ['not_enough_ammo'] = 'Du hast nicht so viel Munition', + ['accessories_no_ears'] = 'Du hast kein Ohr Zubehör', + ['accessories_no_glasses'] = 'Du hast keine Brille', + ['accessories_no_helmet'] = 'Du hast keinen Helm/Hut', + ['accessories_no_mask'] = 'Du hast keine Maske', + ['admin_noclipon'] = 'NoClip ~g~ aktiviert', + ['admin_noclipoff'] = 'NoClip ~r~ deaktiviert', + ['admin_godmodeon'] = 'Invincible ~g~ aktiviert', + ['admin_godmodeoff'] = 'Invincible ~r~ deaktiviert', + ['admin_ghoston'] = 'Ghost mode ~g~ aktiviert', + ['admin_ghostoff'] = 'Ghost mode ~r~ deaktiviert', + ['admin_vehicleflip'] = 'Auto zurückgegeben', + ['admin_tpmarker'] = 'Teleportiert zur Markierung!', + ['admin_nomarker'] = 'Keine Markierung auf der Karte', + + -- Main Menu + ['mainmenu_subtitle'] = 'INTERAKTIONSMENÜ', + ['mainmenu_gps_button'] = 'GPS', + ['mainmenu_voice_button'] = 'Stimme', + ['gps'] = 'GPS: ~b~%s', + ['approach'] = 'Approach: ~b~%s', + ['voice'] = 'Stimme: ~b~%s', + + -- Menu Voice Level + ['voice_whisper'] = ' Flüstern', + ['voice_normal'] = 'Normal', + ['voice_cry'] = 'Schreien', + + -- Inventory Menu + ['inventory_title'] = 'Inventar', + ['inventory_actions_title'] = 'Inventar: Aktion', + ['inventory_use_button'] = 'Benutzen', + ['inventory_give_button'] = 'Geben', + ['inventory_drop_button'] = 'Verwerfen', + + -- Loadout Menu + ['loadout_title'] = 'Waffenmenü', + ['loadout_actions_title'] = 'Waffen: Aktion', + ['loadout_give_button'] = 'Geben', + ['loadout_givemun_button'] = 'Munition geben', + ['loadout_drop_button'] = 'Verwerfen', + + -- Wallet Menu + ['wallet_title'] = 'Brieftasche', + ['wallet_option_give'] = 'Geben', + ['wallet_option_drop'] = 'Verwerfen', + ['wallet_job_button'] = 'Beruf: %s - %s', + ['wallet_job2_button'] = 'Organisation: %s - %s', + ['wallet_money_button'] = 'Bargeld: $%s', + ['wallet_bankmoney_button'] = 'Bank: $%s', + ['wallet_blackmoney_button'] = 'Schwarzgeld: $%s', + ['wallet_show_idcard_button'] = 'Personalausweis zeigen', + ['wallet_check_idcard_button'] = 'Personalausweis anschauen', + ['wallet_show_driver_button'] = 'Führerschein zeigen', + ['wallet_check_driver_button'] = 'Führerschein anschauen', + ['wallet_show_firearms_button'] = 'Waffenlizenz zeigen', + ['wallet_check_firearms_button'] = 'Waffenlizenz anschauen', + + -- Bills Menu + ['bills_title'] = 'Rechnungen', + + -- Clothes Menu + ['clothes_title'] = 'Kleidungsmenü', + ['clothes_torso'] = 'Oberteil', + ['clothes_pants'] = 'Hose', + ['clothes_shoes'] = 'Schuhe', + ['clothes_bag'] = 'Rucksack', + ['clothes_bproof'] = 'Schusssichere Weste', + + -- Accessories Menu + ['accessories_title'] = 'Zubehör', + ['accessories_ears'] = 'Ohren Zubehör', + ['accessories_glasses'] = 'Brille', + ['accessories_helmet'] = 'Hut / Helm', + ['accessories_mask'] = 'Maske', + + -- Animation Menu + ['animation_title'] = 'Animationen', + + ['animation_party_title'] = 'Festivals', + ['animation_party_smoke'] = 'Smoking a cigarette', + ['animation_party_playsong'] = 'Play music', + ['animation_party_dj'] = 'DJ', + ['animation_party_beer'] = 'Beer en Zik', + ['animation_party_dancing'] = 'Make the party', + ['animation_party_airguitar'] = 'Air Guitar', + ['animation_party_shagging'] = 'Air Shagging', + ['animation_party_rock'] = 'Rock n roll', + ['animation_party_drunk'] = 'Stuck on the spot', + ['animation_party_vomit'] = 'Vomit by car', + ['animation_salute_title'] = 'Greetings', + ['animation_salute_saluate'] = 'Greet', + ['animation_salute_serrer'] = 'Shake hands', + ['animation_salute_tchek'] = 'Chek', + ['animation_salute_bandit'] = 'Hi bandit', + ['animation_salute_military'] = 'Hi Military', + ['animation_work_title'] = 'Work', + ['animation_work_suspect'] = 'surrender', + ['animation_work_fisherman'] = 'Fisherman', + ['animation_work_inspect'] = 'Font: investigate', + ['animation_work_radio'] = 'Font: talk on the radio', + ['animation_work_circulation'] = 'Font: circulation', + ['animation_work_binoculars'] = 'Font: binoculars', + ['animation_work_harvest'] = 'Agriculture: harvest', + ['animation_work_repair'] = 'Troubleshooter: repair the engine', + ['animation_work_observe'] = 'Doctor: observe', + ['animation_work_talk'] = 'Taxi: talk to the customer', + ['animation_work_bill'] = 'Taxi: give the bill', + ['animation_work_buy'] = 'Grocer: give the groceries', + ['animation_work_shot'] = 'Bartender: serve a shot', + ['animation_work_picture'] = 'Reporter: Take a picture', + ['animation_work_notes'] = 'All: Take notes', + ['animation_work_hammer'] = 'All: Hammer blow', + ['animation_work_beg'] = 'SDF: Make the round', + ['animation_work_statue'] = 'SDF: Make the statue', + ['animation_mood_title'] = 'Moods', + ['animation_mood_felicitate'] = 'Congratulate', + ['animation_mood_nice'] = 'Super', + ['animation_mood_you'] = 'You', + ['animation_mood_come'] = 'Come', + ['animation_mood_what'] = 'Keskya?', + ['animation_mood_me'] = 'To me', + ['animation_mood_seriously'] = 'I knew it, fuckin', + ['animation_mood_tired'] = 'To be exhausted', + ['animation_mood_shit'] = 'Im in the shit', + ['animation_mood_facepalm'] = 'Facepalm', + ['animation_mood_calm'] = 'Calm down', + ['animation_mood_why'] = 'What did I do?', + ['animation_mood_fear'] = 'Be afraid', + ['animation_mood_fight'] = 'Fight?', + ['animation_mood_notpossible'] = 'Its not Possible!', + ['animation_mood_embrace'] = 'Enlacer', + ['animation_mood_fuckyou'] = 'Finger of Honor', + ['animation_mood_wanker'] = 'Wanker', + ['animation_mood_suicide'] = 'Ball in the head', + ['animation_sports_title'] = 'Sports', + ['animation_sports_muscle'] = 'Show your muscles', + ['animation_sports_weightbar'] = 'Weight bar', + ['animation_sports_pushup'] = 'Make pumps', + ['animation_sports_abs'] = 'Make abs', + ['animation_sports_yoga'] = 'Do yoga', + ['animation_other_title'] = 'Miscellaneous', + ['animation_other_sit'] = 'Sit ', + ['animation_other_waitwall'] = 'Wait against a wall', + ['animation_other_ontheback'] = 'Lying on the back', + ['animation_other_stomach'] = 'Lying on the stomach', + ['animation_other_clean'] = 'Clean', + ['animation_other_cooking'] = 'Prepare to eat', + ['animation_other_search'] = 'Search Position', + ['animation_other_selfie'] = 'Take a selfie', + ['animation_other_door'] = 'Listen to a door', + ['animation_pegi_title'] = 'PEGI 21', + ['animation_pegi_hsuck'] = 'Man getting sucked in the car', + ['animation_pegi_fsuck'] = 'Woman sucks in the car', + ['animation_pegi_hfuck'] = 'Man kiss ** by car', + ['animation_pegi_ffuck'] = 'Woman fucked by car', + ['animation_pegi_scratch'] = 'Scratching the balls', + ['animation_pegi_charm'] = 'Make charm', + ['animation_pegi_golddigger'] = 'pose michto', + ['animation_pegi_breast'] = 'Show his chest', + ['animation_pegi_strip1'] = 'Strip Tease 1', + ['animation_pegi_strip2'] = 'Strip Tease 2', + ['animation_pegi_stripfloor'] = 'Strip Tease on the ground', + ['animation_attitudes_title'] = 'Approach', + + -- Vehicle Menu + ['vehicle_title'] = 'Fahrzeugmenü', + ['vehicle_engine_button'] = 'Motor an/aus schalten', + ['vehicle_door_button'] = 'Tür öffnen/schließen', + ['vehicle_hood_button'] = 'Motorhaube öffnen/schließen', + ['vehicle_trunk_button'] = 'Kofferraum öffnen/schließen', + ['vehicle_door_frontleft'] = 'Vorne Links', + ['vehicle_door_frontright'] = 'Vorne Rechts', + ['vehicle_door_backleft'] = 'Hinten Links', + ['vehicle_door_backright'] = 'Hinten Rechts', + + -- Boss Management Menu + ['bossmanagement_title'] = 'Firmen Managment', + ['bossmanagement_chest_button'] = 'Tresor: ', + ['bossmanagement_hire_button'] = 'Einstellen', + ['bossmanagement_fire_button'] = 'Entlassen', + ['bossmanagement_promote_button'] = 'Befördern', + ['bossmanagement_demote_button'] = 'Degradieren', + + -- Boss Management 2 Menu + ['bossmanagement2_title'] = 'Organisation Management', + ['bossmanagement2_chest_button'] = 'Organisation Truhe:', + ['bossmanagement2_hire_button'] = 'Einstellen', + ['bossmanagement2_fire_button'] = 'Entlassen', + ['bossmanagement2_promote_button'] = 'Befördern', + ['bossmanagement2_demote_button'] = 'Degradieren', + + -- Admin Menu + ['admin_title'] = 'Administration', + ['admin_goto_button'] = 'TP zu Spieler', + ['admin_bring_button'] = 'TP Spieler zu mir', + ['admin_tpxyz_button'] = 'TP zu Koordinaten', + ['admin_noclip_button'] = 'NoClip', + ['admin_godmode_button'] = 'GodMode', + ['admin_ghostmode_button'] = 'Unsichtbarer Modus', + ['admin_spawnveh_button'] = 'Fahrzeug spawnen', + ['admin_repairveh_button'] = 'Fahrzeug reparieren', + ['admin_flipveh_button'] = 'Rückgabe des Fahrzeugs', + ['admin_givemoney_button'] = 'Geld geben ', + ['admin_givebank_button'] = 'Geld geben (bank) ', + ['admin_givedirtymoney_button'] = 'Schwarzgeld senden', + ['admin_showxyz_button'] = 'Koordinaten ein-/ausblenden', + ['admin_showname_button'] = 'Spielernamen ein-/ausblenden', + ['admin_tpmarker_button'] = 'Zur Markierung teleportieren', + ['admin_revive_button'] = 'Spieler wiederbeleben', + ['admin_changeskin_button'] = 'Aussehen ändern', + ['admin_saveskin_button'] = 'Aussehen speichern', + + -- GPS + ['none'] = 'No Location', -- No translated + ['police_station'] = 'Police Station', -- No translated + ['central_garage'] = 'Central garage', -- No translated + ['hospital'] = 'Hospital', -- No translated + ['dealer'] = 'Cardealer', -- No translated + ['bennys_custom'] = 'Bennys Custom', -- No translated + ['job_center'] = 'Employment center', -- No translated + ['driving_school'] = 'Driving school', -- No translated + ['tequila-la'] = 'tequila-la', -- No translated + ['bahama_mamas'] = 'bahama_mamas' -- No translated } diff --git a/locales/en.lua b/locales/en.lua index 659f1ff..fea36c2 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -1,248 +1,248 @@ Locales['en'] = { - -- DialogBox Name - ['dialogbox_playerid'] = 'Player ID (8 Characters Maximum):', - ['dialogbox_amount'] = 'Amount (8 Characters Maximum):', - ['dialogbox_amount_ammo'] = 'Ammo Amount (8 Characters Maximum):', - ['dialogbox_vehiclespawner'] = 'Vehicle Name (50 Characters Maximum):', - ['dialogbox_xyz'] = 'XYZ Position (50 Characters Maximum):', - - -- Menu Default Vars - ['default_gps'] = 'None', - ['default_attitude'] = 'Normal', - ['default_voice'] = 'Normal', - - -- Menu Notification - ['missing_rights'] = 'You do not have the ~r~rights~w~', - ['no_vehicle'] = 'You are not in a vehicle', - ['players_nearby'] = 'No players nearby', - ['amount_invalid'] = 'Invalid amount', - ['in_vehicle_give'] = 'Can not give %s in a vehicle', - ['in_vehicle_drop'] = 'Can not throw %s in a vehicle', - ['not_usable'] = '%s is not usable', - ['not_droppable'] = '%s is not disposable', - ['gave_ammo'] = 'You have given x %s ammo to %s', - ['no_ammo'] = 'You do not have any ammo', - ['not_enough_ammo'] = 'You do not have as many ammo', - ['accessories_no_ears'] = 'You do not have an ear accessory', - ['accessories_no_glasses'] = 'You do not have glasses', - ['accessories_no_helmet'] = 'You do not have a helmet / hat', - ['accessories_no_mask'] = 'You do not have a mask', - ['admin_noclipon'] = 'NoClip ~g~ enabled', - ['admin_noclipoff'] = 'NoClip ~r~ disabled', - ['admin_godmodeon'] = 'Invincible ~g~ enabled', - ['admin_godmodeoff'] = 'Invincible ~r~ disabled', - ['admin_ghoston'] = 'Ghost mode ~g~ enabled', - ['admin_ghostoff'] = 'Ghost mode ~r~ disabled', - ['admin_vehicleflip'] = 'Car returned', - ['admin_tpmarker'] = 'Teleported on the marker!', - ['admin_nomarker'] = 'No marker on the map!', - - -- Main Menu - ['mainmenu_subtitle'] = 'INTERACTION MENU', - ['mainmenu_gps_button'] = 'GPS', - ['mainmenu_voice_button'] = 'Voice', - ['gps'] = 'GPS: ~b~%s', - ['approach'] = 'Approach: ~b~%s', - ['voice'] = 'Voice: ~b~%s', - - -- Menu Voice Level - ['voice_whisper'] = 'Whisper', - ['voice_normal'] = 'Normal', - ['voice_cry'] = 'Shout', - - -- Inventory Menu - ['inventory_title'] = 'Inventory', - ['inventory_actions_title'] = 'Inventory: Action', - ['inventory_use_button'] = 'Use', - ['inventory_give_button'] = 'Give', - ['inventory_drop_button'] = 'Throw', - - -- Loadout Menu - ['loadout_title'] = 'Loadout', - ['loadout_actions_title'] = 'Weapons: Action', - ['loadout_give_button'] = 'Give', - ['loadout_givemun_button'] = 'Give Ammo', - ['loadout_drop_button'] = 'Throw', - - -- Wallet Menu - ['wallet_title'] = 'Portfolio', - ['wallet_option_give'] = 'Give', - ['wallet_option_drop'] = 'Throw', - ['wallet_job_button'] = 'Business: %s - %s', - ['wallet_job2_button'] = 'Organization: %s - %s', - ['wallet_money_button'] = 'Money: $%s', - ['wallet_bankmoney_button'] = 'Bank: $%s', - ['wallet_blackmoney_button'] = 'Dirty Money: $%s', - ['wallet_show_idcard_button'] = 'Show ID card', - ['wallet_check_idcard_button'] = 'Look ID card', - ['wallet_show_driver_button'] = 'Show driving license', - ['wallet_check_driver_button'] = 'Look driving license', - ['wallet_show_firearms_button'] = 'Show gun license', - ['wallet_check_firearms_button'] = 'Look gun license', - - -- Bills Menu - ['bills_title'] = 'Invoices', - - -- Clothes Menu - ['clothes_title'] = 'Clothing', - ['clothes_torso'] = 'High', - ['clothes_pants'] = 'Pants', - ['clothes_shoes'] = 'Shoes', - ['clothes_bag'] = 'Bag', - ['clothes_bproof'] = 'Bullet proof vest', - - -- Accessories Menu - ['accessories_title'] = 'Accessories', - ['accessories_ears'] = 'Ears Accessory', - ['accessories_glasses'] = 'Glasses', - ['accessories_helmet'] = 'Hat / Helmet', - ['accessories_mask'] = 'Mask', - - -- Animation Menu - ['animation_title'] = 'Animations', - ['animation_party_title'] = 'Festivals', - ['animation_party_smoke'] = 'Smoking a cigarette', - ['animation_party_playsong'] = 'Play music', - ['animation_party_dj'] = 'DJ', - ['animation_party_beer'] = 'Beer en Zik', - ['animation_party_dancing'] = 'Make the party', - ['animation_party_airguitar'] = 'Air Guitar', - ['animation_party_shagging'] = 'Air Shagging', - ['animation_party_rock'] = 'Rock n roll', - ['animation_party_drunk'] = 'Stuck on the spot', - ['animation_party_vomit'] = 'Vomit by car', - ['animation_salute_title'] = 'Greetings', - ['animation_salute_saluate'] = 'Greet', - ['animation_salute_serrer'] = 'Shake hands', - ['animation_salute_tchek'] = 'Chek', - ['animation_salute_bandit'] = 'Hi bandit', - ['animation_salute_military'] = 'Hi Military', - ['animation_work_title'] = 'Work', - ['animation_work_suspect'] = 'surrender', - ['animation_work_fisherman'] = 'Fisherman', - ['animation_work_inspect'] = 'Font: investigate', - ['animation_work_radio'] = 'Font: talk on the radio', - ['animation_work_circulation'] = 'Font: circulation', - ['animation_work_binoculars'] = 'Font: binoculars', - ['animation_work_harvest'] = 'Agriculture: harvest', - ['animation_work_repair'] = 'Troubleshooter: repair the engine', - ['animation_work_observe'] = 'Doctor: observe', - ['animation_work_talk'] = 'Taxi: talk to the customer', - ['animation_work_bill'] = 'Taxi: give the bill', - ['animation_work_buy'] = 'Grocer: give the groceries', - ['animation_work_shot'] = 'Bartender: serve a shot', - ['animation_work_picture'] = 'Reporter: Take a picture', - ['animation_work_notes'] = 'All: Take notes', - ['animation_work_hammer'] = 'All: Hammer blow', - ['animation_work_beg'] = 'SDF: Make the round', - ['animation_work_statue'] = 'SDF: Make the statue', - ['animation_mood_title'] = 'Moods', - ['animation_mood_felicitate'] = 'Congratulate', - ['animation_mood_nice'] = 'Super', - ['animation_mood_you'] = 'You', - ['animation_mood_come'] = 'Come', - ['animation_mood_what'] = 'Keskya?', - ['animation_mood_me'] = 'To me', - ['animation_mood_seriously'] = 'I knew it, fuckin', - ['animation_mood_tired'] = 'To be exhausted', - ['animation_mood_shit'] = 'Im in the shit', - ['animation_mood_facepalm'] = 'Facepalm', - ['animation_mood_calm'] = 'Calm down', - ['animation_mood_why'] = 'What did I do?', - ['animation_mood_fear'] = 'Be afraid', - ['animation_mood_fight'] = 'Fight?', - ['animation_mood_notpossible'] = 'Its not Possible!', - ['animation_mood_embrace'] = 'Enlacer', - ['animation_mood_fuckyou'] = 'Finger of Honor', - ['animation_mood_wanker'] = 'Wanker', - ['animation_mood_suicide'] = 'Ball in the head', - ['animation_sports_title'] = 'Sports', - ['animation_sports_muscle'] = 'Show your muscles', - ['animation_sports_weightbar'] = 'Weight bar', - ['animation_sports_pushup'] = 'Make pumps', - ['animation_sports_abs'] = 'Make abs', - ['animation_sports_yoga'] = 'Do yoga', - ['animation_other_title'] = 'Miscellaneous', - ['animation_other_sit'] = 'Sit ', - ['animation_other_waitwall'] = 'Wait against a wall', - ['animation_other_ontheback'] = 'Lying on the back', - ['animation_other_stomach'] = 'Lying on the stomach', - ['animation_other_clean'] = 'Clean', - ['animation_other_cooking'] = 'Prepare to eat', - ['animation_other_search'] = 'Search Position', - ['animation_other_selfie'] = 'Take a selfie', - ['animation_other_door'] = 'Listen to a door', - ['animation_pegi_title'] = 'PEGI 21', - ['animation_pegi_hsuck'] = 'Man getting sucked in the car', - ['animation_pegi_fsuck'] = 'Woman sucks in the car', - ['animation_pegi_hfuck'] = 'Man kiss ** by car', - ['animation_pegi_ffuck'] = 'Woman fucked by car', - ['animation_pegi_scratch'] = 'Scratching the balls', - ['animation_pegi_charm'] = 'Make charm', - ['animation_pegi_golddigger'] = 'pose michto', - ['animation_pegi_breast'] = 'Show his chest', - ['animation_pegi_strip1'] = 'Strip Tease 1', - ['animation_pegi_strip2'] = 'Strip Tease 2', - ['animation_pegi_stripfloor'] = 'Strip Tease on the ground', - ['animation_attitudes_title'] = 'Approach', - - -- Vehicle Menu - ['vehicle_title'] = 'Vehicle Management', - ['vehicle_engine_button'] = 'Switch on / off the engine', - ['vehicle_door_button'] = 'Open / Close Door', - ['vehicle_hood_button'] = 'Open / Close Hood', - ['vehicle_trunk_button'] = 'Open / Close Safe', - ['vehicle_door_frontleft'] = 'Front Left', - ['vehicle_door_frontright'] = 'Before Right', - ['vehicle_door_backleft'] = 'Back Left', - ['vehicle_door_backright'] = 'Rear Right', - - -- Boss Management Menu - ['bossmanagement_title'] = 'Company Management', - ['bossmanagement_chest_button'] = 'Company Safe:', - ['bossmanagement_hire_button'] = 'Recruit', - ['bossmanagement_fire_button'] = 'Fire', - ['bossmanagement_promote_button'] = 'Promote', - ['bossmanagement_demote_button'] = 'Demote', - - -- Boss Management 2 Menu - ['bossmanagement2_title'] = 'Organization Management', - ['bossmanagement2_chest_button'] = 'Organization Chest:', - ['bossmanagement2_hire_button'] = 'Recruit', - ['bossmanagement2_fire_button'] = 'Fire', - ['bossmanagement2_promote_button'] = 'Promote', - ['bossmanagement2_demote_button'] = 'Demote', - - -- Admin Menu - ['admin_title'] = 'Administration', - ['admin_goto_button'] = 'TP on Player', - ['admin_bring_button'] = 'TP Player on me', - ['admin_tpxyz_button'] = 'TP on Coordinates', - ['admin_noclip_button'] = 'NoClip', - ['admin_godmode_button'] = 'Invincible Mode', - ['admin_ghostmode_button'] = 'Ghost Mode', - ['admin_spawnveh_button'] = 'Spawn a Vehicle', - ['admin_repairveh_button'] = 'Repair Vehicle', - ['admin_flipveh_button'] = 'Return the vehicle', - ['admin_givemoney_button'] = 'Grant money ', - ['admin_givebank_button'] = 'Grant money (bank) ', - ['admin_givedirtymoney_button'] = 'Sending dirty money', - ['admin_showxyz_button'] = 'Show / Hide Coordinates', - ['admin_showname_button'] = 'Show / Hide Player Names', - ['admin_tpmarker_button'] = 'TP on the Marker', - ['admin_revive_button'] = 'Revive a Player', - ['admin_changeskin_button'] = 'Change Appearance', - ['admin_saveskin_button'] = 'Save Appearance', - - -- GPS - ['none'] = 'No Location', - ['police_station'] = 'Police Station', - ['central_garage'] = 'Central garage', - ['hospital'] = 'Hospital', - ['dealer'] = 'Cardealer', - ['bennys_custom'] = 'Bennys Custom', - ['job_center'] = 'Employment center', - ['driving_school'] = 'Driving school', - ['tequila-la'] = 'tequila-la', - ['bahama_mamas'] = 'bahama_mamas' + -- DialogBox Name + ['dialogbox_playerid'] = 'Player ID (8 Characters Maximum):', + ['dialogbox_amount'] = 'Amount (8 Characters Maximum):', + ['dialogbox_amount_ammo'] = 'Ammo Amount (8 Characters Maximum):', + ['dialogbox_vehiclespawner'] = 'Vehicle Name (50 Characters Maximum):', + ['dialogbox_xyz'] = 'XYZ Position (50 Characters Maximum):', + + -- Menu Default Vars + ['default_gps'] = 'None', + ['default_attitude'] = 'Normal', + ['default_voice'] = 'Normal', + + -- Menu Notification + ['missing_rights'] = 'You do not have the ~r~rights~w~', + ['no_vehicle'] = 'You are not in a vehicle', + ['players_nearby'] = 'No players nearby', + ['amount_invalid'] = 'Invalid amount', + ['in_vehicle_give'] = 'Can not give %s in a vehicle', + ['in_vehicle_drop'] = 'Can not throw %s in a vehicle', + ['not_usable'] = '%s is not usable', + ['not_droppable'] = '%s is not disposable', + ['gave_ammo'] = 'You have given x %s ammo to %s', + ['no_ammo'] = 'You do not have any ammo', + ['not_enough_ammo'] = 'You do not have as many ammo', + ['accessories_no_ears'] = 'You do not have an ear accessory', + ['accessories_no_glasses'] = 'You do not have glasses', + ['accessories_no_helmet'] = 'You do not have a helmet / hat', + ['accessories_no_mask'] = 'You do not have a mask', + ['admin_noclipon'] = 'NoClip ~g~ enabled', + ['admin_noclipoff'] = 'NoClip ~r~ disabled', + ['admin_godmodeon'] = 'Invincible ~g~ enabled', + ['admin_godmodeoff'] = 'Invincible ~r~ disabled', + ['admin_ghoston'] = 'Ghost mode ~g~ enabled', + ['admin_ghostoff'] = 'Ghost mode ~r~ disabled', + ['admin_vehicleflip'] = 'Car returned', + ['admin_tpmarker'] = 'Teleported on the marker!', + ['admin_nomarker'] = 'No marker on the map!', + + -- Main Menu + ['mainmenu_subtitle'] = 'INTERACTION MENU', + ['mainmenu_gps_button'] = 'GPS', + ['mainmenu_voice_button'] = 'Voice', + ['gps'] = 'GPS: ~b~%s', + ['approach'] = 'Approach: ~b~%s', + ['voice'] = 'Voice: ~b~%s', + + -- Menu Voice Level + ['voice_whisper'] = 'Whisper', + ['voice_normal'] = 'Normal', + ['voice_cry'] = 'Shout', + + -- Inventory Menu + ['inventory_title'] = 'Inventory', + ['inventory_actions_title'] = 'Inventory: Action', + ['inventory_use_button'] = 'Use', + ['inventory_give_button'] = 'Give', + ['inventory_drop_button'] = 'Throw', + + -- Loadout Menu + ['loadout_title'] = 'Loadout', + ['loadout_actions_title'] = 'Weapons: Action', + ['loadout_give_button'] = 'Give', + ['loadout_givemun_button'] = 'Give Ammo', + ['loadout_drop_button'] = 'Throw', + + -- Wallet Menu + ['wallet_title'] = 'Portfolio', + ['wallet_option_give'] = 'Give', + ['wallet_option_drop'] = 'Throw', + ['wallet_job_button'] = 'Business: %s - %s', + ['wallet_job2_button'] = 'Organization: %s - %s', + ['wallet_money_button'] = 'Money: $%s', + ['wallet_bankmoney_button'] = 'Bank: $%s', + ['wallet_blackmoney_button'] = 'Dirty Money: $%s', + ['wallet_show_idcard_button'] = 'Show ID card', + ['wallet_check_idcard_button'] = 'Look ID card', + ['wallet_show_driver_button'] = 'Show driving license', + ['wallet_check_driver_button'] = 'Look driving license', + ['wallet_show_firearms_button'] = 'Show gun license', + ['wallet_check_firearms_button'] = 'Look gun license', + + -- Bills Menu + ['bills_title'] = 'Invoices', + + -- Clothes Menu + ['clothes_title'] = 'Clothing', + ['clothes_torso'] = 'High', + ['clothes_pants'] = 'Pants', + ['clothes_shoes'] = 'Shoes', + ['clothes_bag'] = 'Bag', + ['clothes_bproof'] = 'Bullet proof vest', + + -- Accessories Menu + ['accessories_title'] = 'Accessories', + ['accessories_ears'] = 'Ears Accessory', + ['accessories_glasses'] = 'Glasses', + ['accessories_helmet'] = 'Hat / Helmet', + ['accessories_mask'] = 'Mask', + + -- Animation Menu + ['animation_title'] = 'Animations', + ['animation_party_title'] = 'Festivals', + ['animation_party_smoke'] = 'Smoking a cigarette', + ['animation_party_playsong'] = 'Play music', + ['animation_party_dj'] = 'DJ', + ['animation_party_beer'] = 'Beer en Zik', + ['animation_party_dancing'] = 'Make the party', + ['animation_party_airguitar'] = 'Air Guitar', + ['animation_party_shagging'] = 'Air Shagging', + ['animation_party_rock'] = 'Rock n roll', + ['animation_party_drunk'] = 'Stuck on the spot', + ['animation_party_vomit'] = 'Vomit by car', + ['animation_salute_title'] = 'Greetings', + ['animation_salute_saluate'] = 'Greet', + ['animation_salute_serrer'] = 'Shake hands', + ['animation_salute_tchek'] = 'Chek', + ['animation_salute_bandit'] = 'Hi bandit', + ['animation_salute_military'] = 'Hi Military', + ['animation_work_title'] = 'Work', + ['animation_work_suspect'] = 'surrender', + ['animation_work_fisherman'] = 'Fisherman', + ['animation_work_inspect'] = 'Font: investigate', + ['animation_work_radio'] = 'Font: talk on the radio', + ['animation_work_circulation'] = 'Font: circulation', + ['animation_work_binoculars'] = 'Font: binoculars', + ['animation_work_harvest'] = 'Agriculture: harvest', + ['animation_work_repair'] = 'Troubleshooter: repair the engine', + ['animation_work_observe'] = 'Doctor: observe', + ['animation_work_talk'] = 'Taxi: talk to the customer', + ['animation_work_bill'] = 'Taxi: give the bill', + ['animation_work_buy'] = 'Grocer: give the groceries', + ['animation_work_shot'] = 'Bartender: serve a shot', + ['animation_work_picture'] = 'Reporter: Take a picture', + ['animation_work_notes'] = 'All: Take notes', + ['animation_work_hammer'] = 'All: Hammer blow', + ['animation_work_beg'] = 'SDF: Make the round', + ['animation_work_statue'] = 'SDF: Make the statue', + ['animation_mood_title'] = 'Moods', + ['animation_mood_felicitate'] = 'Congratulate', + ['animation_mood_nice'] = 'Super', + ['animation_mood_you'] = 'You', + ['animation_mood_come'] = 'Come', + ['animation_mood_what'] = 'Keskya?', + ['animation_mood_me'] = 'To me', + ['animation_mood_seriously'] = 'I knew it, fuckin', + ['animation_mood_tired'] = 'To be exhausted', + ['animation_mood_shit'] = 'Im in the shit', + ['animation_mood_facepalm'] = 'Facepalm', + ['animation_mood_calm'] = 'Calm down', + ['animation_mood_why'] = 'What did I do?', + ['animation_mood_fear'] = 'Be afraid', + ['animation_mood_fight'] = 'Fight?', + ['animation_mood_notpossible'] = 'Its not Possible!', + ['animation_mood_embrace'] = 'Enlacer', + ['animation_mood_fuckyou'] = 'Finger of Honor', + ['animation_mood_wanker'] = 'Wanker', + ['animation_mood_suicide'] = 'Ball in the head', + ['animation_sports_title'] = 'Sports', + ['animation_sports_muscle'] = 'Show your muscles', + ['animation_sports_weightbar'] = 'Weight bar', + ['animation_sports_pushup'] = 'Make pumps', + ['animation_sports_abs'] = 'Make abs', + ['animation_sports_yoga'] = 'Do yoga', + ['animation_other_title'] = 'Miscellaneous', + ['animation_other_sit'] = 'Sit ', + ['animation_other_waitwall'] = 'Wait against a wall', + ['animation_other_ontheback'] = 'Lying on the back', + ['animation_other_stomach'] = 'Lying on the stomach', + ['animation_other_clean'] = 'Clean', + ['animation_other_cooking'] = 'Prepare to eat', + ['animation_other_search'] = 'Search Position', + ['animation_other_selfie'] = 'Take a selfie', + ['animation_other_door'] = 'Listen to a door', + ['animation_pegi_title'] = 'PEGI 21', + ['animation_pegi_hsuck'] = 'Man getting sucked in the car', + ['animation_pegi_fsuck'] = 'Woman sucks in the car', + ['animation_pegi_hfuck'] = 'Man kiss ** by car', + ['animation_pegi_ffuck'] = 'Woman fucked by car', + ['animation_pegi_scratch'] = 'Scratching the balls', + ['animation_pegi_charm'] = 'Make charm', + ['animation_pegi_golddigger'] = 'pose michto', + ['animation_pegi_breast'] = 'Show his chest', + ['animation_pegi_strip1'] = 'Strip Tease 1', + ['animation_pegi_strip2'] = 'Strip Tease 2', + ['animation_pegi_stripfloor'] = 'Strip Tease on the ground', + ['animation_attitudes_title'] = 'Approach', + + -- Vehicle Menu + ['vehicle_title'] = 'Vehicle Management', + ['vehicle_engine_button'] = 'Switch on / off the engine', + ['vehicle_door_button'] = 'Open / Close Door', + ['vehicle_hood_button'] = 'Open / Close Hood', + ['vehicle_trunk_button'] = 'Open / Close Safe', + ['vehicle_door_frontleft'] = 'Front Left', + ['vehicle_door_frontright'] = 'Before Right', + ['vehicle_door_backleft'] = 'Back Left', + ['vehicle_door_backright'] = 'Rear Right', + + -- Boss Management Menu + ['bossmanagement_title'] = 'Company Management', + ['bossmanagement_chest_button'] = 'Company Safe:', + ['bossmanagement_hire_button'] = 'Recruit', + ['bossmanagement_fire_button'] = 'Fire', + ['bossmanagement_promote_button'] = 'Promote', + ['bossmanagement_demote_button'] = 'Demote', + + -- Boss Management 2 Menu + ['bossmanagement2_title'] = 'Organization Management', + ['bossmanagement2_chest_button'] = 'Organization Chest:', + ['bossmanagement2_hire_button'] = 'Recruit', + ['bossmanagement2_fire_button'] = 'Fire', + ['bossmanagement2_promote_button'] = 'Promote', + ['bossmanagement2_demote_button'] = 'Demote', + + -- Admin Menu + ['admin_title'] = 'Administration', + ['admin_goto_button'] = 'TP on Player', + ['admin_bring_button'] = 'TP Player on me', + ['admin_tpxyz_button'] = 'TP on Coordinates', + ['admin_noclip_button'] = 'NoClip', + ['admin_godmode_button'] = 'Invincible Mode', + ['admin_ghostmode_button'] = 'Ghost Mode', + ['admin_spawnveh_button'] = 'Spawn a Vehicle', + ['admin_repairveh_button'] = 'Repair Vehicle', + ['admin_flipveh_button'] = 'Return the vehicle', + ['admin_givemoney_button'] = 'Grant money ', + ['admin_givebank_button'] = 'Grant money (bank) ', + ['admin_givedirtymoney_button'] = 'Sending dirty money', + ['admin_showxyz_button'] = 'Show / Hide Coordinates', + ['admin_showname_button'] = 'Show / Hide Player Names', + ['admin_tpmarker_button'] = 'TP on the Marker', + ['admin_revive_button'] = 'Revive a Player', + ['admin_changeskin_button'] = 'Change Appearance', + ['admin_saveskin_button'] = 'Save Appearance', + + -- GPS + ['none'] = 'No Location', + ['police_station'] = 'Police Station', + ['central_garage'] = 'Central garage', + ['hospital'] = 'Hospital', + ['dealer'] = 'Cardealer', + ['bennys_custom'] = 'Bennys Custom', + ['job_center'] = 'Employment center', + ['driving_school'] = 'Driving school', + ['tequila-la'] = 'tequila-la', + ['bahama_mamas'] = 'bahama_mamas' } \ No newline at end of file diff --git a/locales/es.lua b/locales/es.lua index 57b9371..7e6fa81 100644 --- a/locales/es.lua +++ b/locales/es.lua @@ -1,248 +1,248 @@ Locales['es'] = { - -- DialogBox Name - ['dialogbox_playerid'] = 'ID Jugador (8 Caracteres Máximo):', - ['dialogbox_amount'] = 'Cantidad (8 Caracteres Máximo):', - ['dialogbox_amount_ammo'] = 'Cantidad Cantidad (8 Caracteres Máximo):', - ['dialogbox_vehiclespawner'] = 'Nombre vehiculo (50 Caracteres Máximo):', - ['dialogbox_xyz'] = 'Posicion XYZ (50 Caracteres Máximo):', - - -- Menu Default Vars - ['default_gps'] = 'Ninguna', - ['default_attitude'] = 'Normal', - ['default_voice'] = 'Normal', - - -- Menu Notification - ['missing_rights'] = 'No tienes los suficientes derechos ~r~derechos~w~', - ['no_vehicle'] = 'No estás en un vehículo', - ['players_nearby'] = 'No hay jugadores cerca', - ['amount_invalid'] = 'Cantidad no válida', - ['in_vehicle_give'] = 'No puedes dar %s en un vehiculo', - ['in_vehicle_drop'] = 'No puedes tirar %s en un vehiculo', - ['not_usable'] = '%s no se puede usar', - ['not_droppable'] = '%s no se puede tirar', - ['gave_ammo'] = 'Distes x %s munición a %s', - ['no_ammo'] = 'No tienes munición', - ['not_enough_ammo'] = 'No tienes suficiente munición', - ['accessories_no_ears'] = 'No tienes un accesorio de oreja', - ['accessories_no_glasses'] = 'No tienes gafas', - ['accessories_no_helmet'] = 'No tienes casco / gorra / gorro', - ['accessories_no_mask'] = 'No tienes una máscara', - ['admin_noclipon'] = 'NoClip ~g~ habilitado', - ['admin_noclipoff'] = 'NoClip ~r~ deshabilitado', - ['admin_godmodeon'] = 'Invencible ~g~ habilitado', - ['admin_godmodeoff'] = 'Invencible ~r~ deshabilitado', - ['admin_ghoston'] = 'Modo Ghost ~g~ habilitado', - ['admin_ghostoff'] = 'Modo Ghost ~r~ deshabilitado', - ['admin_vehicleflip'] = 'Coche devuelto', - ['admin_tpmarker'] = '¡Teletransportado al marcador!', - ['admin_nomarker'] = '¡No hay marcador en el mapa!', - - -- Main Menu - ['mainmenu_subtitle'] = 'MENU INTERACCION', - ['mainmenu_gps_button'] = 'GPS', - ['mainmenu_voice_button'] = 'Voz', - ['gps'] = 'GPS: ~b~%s', - ['approach'] = 'Aproximar: ~b~%s', - ['voice'] = 'Voz: ~b~%s', - - -- Menu Voice Level - ['voice_whisper'] = 'Susurrar', - ['voice_normal'] = 'Normal', - ['voice_cry'] = 'Gritar', - - -- Inventory Menu - ['inventory_title'] = 'Inventario', - ['inventory_actions_title'] = 'Inventario: Acción', - ['inventory_use_button'] = 'Usar', - ['inventory_give_button'] = 'Dar', - ['inventory_drop_button'] = 'Descartar', - - -- Loadout Menu - ['loadout_title'] = 'Armas', - ['loadout_actions_title'] = 'Armas: Acción', - ['loadout_give_button'] = 'Dar', - ['loadout_givemun_button'] = 'Dar munición', - ['loadout_drop_button'] = 'Tirar', - - -- Wallet Menu - ['wallet_title'] = 'Tu personaje', - ['wallet_option_give'] = 'Give', - ['wallet_option_drop'] = 'Tirar', - ['wallet_job_button'] = 'Negocio: %s - %s', - ['wallet_job2_button'] = 'Organización: %s - %s', - ['wallet_money_button'] = 'Dinero: $%s', - ['wallet_bankmoney_button'] = 'Banco: $%s', - ['wallet_blackmoney_button'] = 'Dinero sucio: $%s', - ['wallet_show_idcard_button'] = 'Mostrar DNI', - ['wallet_check_idcard_button'] = 'Mirar DNI', - ['wallet_show_driver_button'] = 'Mostrar carnet de conduncir', - ['wallet_check_driver_button'] = 'Mirar carnet de conducir', - ['wallet_show_firearms_button'] = 'Mostrar licencia de armas', - ['wallet_check_firearms_button'] = 'Mirar licencia de armas', - - -- Bills Menu - ['bills_title'] = 'Facturas', - - -- Clothes Menu - ['clothes_title'] = 'Ropa', - ['clothes_torso'] = 'Torso', - ['clothes_pants'] = 'Pantalones', - ['clothes_shoes'] = 'Zapatos', - ['clothes_bag'] = 'Bolso/a', - ['clothes_bproof'] = 'Chaleco Anti-Balas', - - -- Accessories Menu - ['accessories_title'] = 'Accesorios', - ['accessories_ears'] = 'Accesorios de oreja', - ['accessories_glasses'] = 'Gafas', - ['accessories_helmet'] = 'Gorra / Casco', - ['accessories_mask'] = 'Máscara', - - -- Animation Menu - ['animation_title'] = 'Animaciones', - ['animation_party_title'] = 'Festivales', - ['animation_party_smoke'] = 'Fumar un cigarro', - ['animation_party_playsong'] = 'Poner música', - ['animation_party_dj'] = 'DJ', - ['animation_party_beer'] = 'Cerveza', - ['animation_party_dancing'] = 'Montar una fiesta', - ['animation_party_airguitar'] = 'Tocar la guitarra', - ['animation_party_shagging'] = 'Fornicar al aire', - ['animation_party_rock'] = 'Rock n roll', - ['animation_party_drunk'] = 'Borracho', - ['animation_party_vomit'] = 'Vomitar', - ['animation_salute_title'] = 'Saludos', - ['animation_salute_saluate'] = 'Saludar', - ['animation_salute_serrer'] = 'Dar la mano', - ['animation_salute_tchek'] = 'Chek', - ['animation_salute_bandit'] = 'Saludo bandido', - ['animation_salute_military'] = 'Saludo militar', - ['animation_work_title'] = 'Trabajo', - ['animation_work_suspect'] = 'Rendirse', - ['animation_work_fisherman'] = 'Pescadero', - ['animation_work_inspect'] = 'Policia: investigar', - ['animation_work_radio'] = 'Policia: hablar en la radio', - ['animation_work_circulation'] = 'Policia: circulación', - ['animation_work_binoculars'] = 'Font: prismáticos', - ['animation_work_harvest'] = 'Agricultura: cosecha', - ['animation_work_repair'] = 'Mecánico: arreglar el motor', - ['animation_work_observe'] = 'Médico: observar', - ['animation_work_talk'] = 'Taxi: hablar con el cliente', - ['animation_work_bill'] = 'Taxi: entregar factura', - ['animation_work_buy'] = 'Dependiente: entregar la compra', - ['animation_work_shot'] = 'Camarero: servir un chupito', - ['animation_work_picture'] = 'Reportero: sacar una foto', - ['animation_work_notes'] = 'Todos: Tomar notas', - ['animation_work_hammer'] = 'Todos: Golpe de martillo', - ['animation_work_beg'] = 'SDF: hacer la ronda', - ['animation_work_statue'] = 'SDF: hacer la estatua', - ['animation_mood_title'] = 'Estado', - ['animation_mood_felicitate'] = 'Felicitar', - ['animation_mood_nice'] = 'Guay', - ['animation_mood_you'] = 'Tu', - ['animation_mood_come'] = 'Vienes', - ['animation_mood_what'] = 'Que?', - ['animation_mood_me'] = 'A mi', - ['animation_mood_seriously'] = 'Lo sabia, joder', - ['animation_mood_tired'] = 'Exhausto', - ['animation_mood_shit'] = 'Estoy en la mierda', - ['animation_mood_facepalm'] = 'Facepalm', - ['animation_mood_calm'] = 'Tranquilizate', - ['animation_mood_why'] = 'Que hice?', - ['animation_mood_fear'] = 'Cagate', - ['animation_mood_fight'] = 'Pelea?', - ['animation_mood_notpossible'] = 'No es posible!', - ['animation_mood_embrace'] = 'Abrazar', - ['animation_mood_fuckyou'] = 'Dedo del medio', - ['animation_mood_wanker'] = 'Una buena paja', - ['animation_mood_suicide'] = 'Bala en la cabeza', - ['animation_sports_title'] = 'Deportes', - ['animation_sports_muscle'] = 'Mostrar tus músculos', - ['animation_sports_weightbar'] = 'Barra de pesas', - ['animation_sports_pushup'] = 'Hacer flexiones', - ['animation_sports_abs'] = 'Hacer abdominales', - ['animation_sports_yoga'] = 'Hacer yoga', - ['animation_other_title'] = 'Random', - ['animation_other_sit'] = 'Sentarse', - ['animation_other_waitwall'] = 'Apoyarse contra el muro', - ['animation_other_ontheback'] = 'Tumbarse de frente', - ['animation_other_stomach'] = 'Tumbarse de espaldas', - ['animation_other_clean'] = 'Limpiar', - ['animation_other_cooking'] = 'Preparar la comida', - ['animation_other_search'] = 'Buscar posición', - ['animation_other_selfie'] = 'Sacar un selfie', - ['animation_other_door'] = 'Escuchar por la puerta', - ['animation_pegi_title'] = 'PEGI 18', - ['animation_pegi_hsuck'] = 'Hombre recibiendo felación', - ['animation_pegi_fsuck'] = 'Mujer chupa en el coche', - ['animation_pegi_hfuck'] = 'Hombre fornica ** en el coche', - ['animation_pegi_ffuck'] = 'Mujer fornicando en coche', - ['animation_pegi_scratch'] = 'Rascarse la pelotas', - ['animation_pegi_charm'] = 'Producir encanto', - ['animation_pegi_golddigger'] = 'Pose de flipao', - ['animation_pegi_breast'] = 'Mostrar tetas', - ['animation_pegi_strip1'] = 'Strip Tease 1', - ['animation_pegi_strip2'] = 'Strip Tease 2', - ['animation_pegi_stripfloor'] = 'Strip Tease en el suelo', - ['animation_attitudes_title'] = 'Acercarse', - - -- Vehicle Menu - ['vehicle_title'] = 'Vehículos', - ['vehicle_engine_button'] = 'Encender / Apagar motor', - ['vehicle_door_button'] = 'Abrir / Cerrar Puerta', - ['vehicle_hood_button'] = 'Abrir / Cerrar Capó', - ['vehicle_trunk_button'] = 'Abrir / Cerrar Maletero', - ['vehicle_door_frontleft'] = 'Puerta delantera izquierda', - ['vehicle_door_frontright'] = 'Puerta delantera derecha', - ['vehicle_door_backleft'] = 'Puerta trasera izquierda', - ['vehicle_door_backright'] = 'Puerta trasera derecha', - - -- Boss Management Menu - ['bossmanagement_title'] = 'Negocios', - ['bossmanagement_chest_button'] = 'Negocio Cofre:', - ['bossmanagement_hire_button'] = 'Reclutar', - ['bossmanagement_fire_button'] = 'Despedir', - ['bossmanagement_promote_button'] = 'Promocionar', - ['bossmanagement_demote_button'] = 'Degradar', - - -- Boss Management 2 Menu - ['bossmanagement2_title'] = 'Organización', - ['bossmanagement2_chest_button'] = 'Organization Cofre:', - ['bossmanagement2_hire_button'] = 'Reclutar', - ['bossmanagement2_fire_button'] = 'Despedir', - ['bossmanagement2_promote_button'] = 'Promocionar', - ['bossmanagement2_demote_button'] = 'Degradar', - - -- Admin Menu - ['admin_title'] = 'Administración', - ['admin_goto_button'] = 'TP a jugador', - ['admin_bring_button'] = 'TP jugador a mí', - ['admin_tpxyz_button'] = 'TP a coordenadas', - ['admin_noclip_button'] = 'NoClip', - ['admin_godmode_button'] = 'Modo invencible', - ['admin_ghostmode_button'] = 'Modo invisible', - ['admin_spawnveh_button'] = 'Respawnear vehiculo', - ['admin_repairveh_button'] = 'Reparar vehiculo', - ['admin_flipveh_button'] = 'Devolver un vehiculo', - ['admin_givemoney_button'] = 'Dar dinero ', - ['admin_givebank_button'] = 'Dar dinero (banco) ', - ['admin_givedirtymoney_button'] = 'Dar dinero sucio', - ['admin_showxyz_button'] = 'Mostrar / Ocultar Coordenadas', - ['admin_showname_button'] = 'Mostrar / Ocultar Nombres de jugadores', - ['admin_tpmarker_button'] = 'TP al marcador', - ['admin_revive_button'] = 'Revivir un jugador', - ['admin_changeskin_button'] = 'Cambiar apariencia', - ['admin_saveskin_button'] = 'Guardar apariencia', - - -- GPS - ['none'] = 'No Location', -- No translated - ['police_station'] = 'Police Station', -- No translated - ['central_garage'] = 'Central garage', -- No translated - ['hospital'] = 'Hospital', -- No translated - ['dealer'] = 'Cardealer', -- No translated - ['bennys_custom'] = 'Bennys Custom', -- No translated - ['job_center'] = 'Employment center', -- No translated - ['driving_school'] = 'Driving school', -- No translated - ['tequila-la'] = 'tequila-la', -- No translated - ['bahama_mamas'] = 'bahama_mamas' -- No translated + -- DialogBox Name + ['dialogbox_playerid'] = 'ID Jugador (8 Caracteres Máximo):', + ['dialogbox_amount'] = 'Cantidad (8 Caracteres Máximo):', + ['dialogbox_amount_ammo'] = 'Cantidad Cantidad (8 Caracteres Máximo):', + ['dialogbox_vehiclespawner'] = 'Nombre vehiculo (50 Caracteres Máximo):', + ['dialogbox_xyz'] = 'Posicion XYZ (50 Caracteres Máximo):', + + -- Menu Default Vars + ['default_gps'] = 'Ninguna', + ['default_attitude'] = 'Normal', + ['default_voice'] = 'Normal', + + -- Menu Notification + ['missing_rights'] = 'No tienes los suficientes derechos ~r~derechos~w~', + ['no_vehicle'] = 'No estás en un vehículo', + ['players_nearby'] = 'No hay jugadores cerca', + ['amount_invalid'] = 'Cantidad no válida', + ['in_vehicle_give'] = 'No puedes dar %s en un vehiculo', + ['in_vehicle_drop'] = 'No puedes tirar %s en un vehiculo', + ['not_usable'] = '%s no se puede usar', + ['not_droppable'] = '%s no se puede tirar', + ['gave_ammo'] = 'Distes x %s munición a %s', + ['no_ammo'] = 'No tienes munición', + ['not_enough_ammo'] = 'No tienes suficiente munición', + ['accessories_no_ears'] = 'No tienes un accesorio de oreja', + ['accessories_no_glasses'] = 'No tienes gafas', + ['accessories_no_helmet'] = 'No tienes casco / gorra / gorro', + ['accessories_no_mask'] = 'No tienes una máscara', + ['admin_noclipon'] = 'NoClip ~g~ habilitado', + ['admin_noclipoff'] = 'NoClip ~r~ deshabilitado', + ['admin_godmodeon'] = 'Invencible ~g~ habilitado', + ['admin_godmodeoff'] = 'Invencible ~r~ deshabilitado', + ['admin_ghoston'] = 'Modo Ghost ~g~ habilitado', + ['admin_ghostoff'] = 'Modo Ghost ~r~ deshabilitado', + ['admin_vehicleflip'] = 'Coche devuelto', + ['admin_tpmarker'] = '¡Teletransportado al marcador!', + ['admin_nomarker'] = '¡No hay marcador en el mapa!', + + -- Main Menu + ['mainmenu_subtitle'] = 'MENU INTERACCION', + ['mainmenu_gps_button'] = 'GPS', + ['mainmenu_voice_button'] = 'Voz', + ['gps'] = 'GPS: ~b~%s', + ['approach'] = 'Aproximar: ~b~%s', + ['voice'] = 'Voz: ~b~%s', + + -- Menu Voice Level + ['voice_whisper'] = 'Susurrar', + ['voice_normal'] = 'Normal', + ['voice_cry'] = 'Gritar', + + -- Inventory Menu + ['inventory_title'] = 'Inventario', + ['inventory_actions_title'] = 'Inventario: Acción', + ['inventory_use_button'] = 'Usar', + ['inventory_give_button'] = 'Dar', + ['inventory_drop_button'] = 'Descartar', + + -- Loadout Menu + ['loadout_title'] = 'Armas', + ['loadout_actions_title'] = 'Armas: Acción', + ['loadout_give_button'] = 'Dar', + ['loadout_givemun_button'] = 'Dar munición', + ['loadout_drop_button'] = 'Tirar', + + -- Wallet Menu + ['wallet_title'] = 'Tu personaje', + ['wallet_option_give'] = 'Give', + ['wallet_option_drop'] = 'Tirar', + ['wallet_job_button'] = 'Negocio: %s - %s', + ['wallet_job2_button'] = 'Organización: %s - %s', + ['wallet_money_button'] = 'Dinero: $%s', + ['wallet_bankmoney_button'] = 'Banco: $%s', + ['wallet_blackmoney_button'] = 'Dinero sucio: $%s', + ['wallet_show_idcard_button'] = 'Mostrar DNI', + ['wallet_check_idcard_button'] = 'Mirar DNI', + ['wallet_show_driver_button'] = 'Mostrar carnet de conduncir', + ['wallet_check_driver_button'] = 'Mirar carnet de conducir', + ['wallet_show_firearms_button'] = 'Mostrar licencia de armas', + ['wallet_check_firearms_button'] = 'Mirar licencia de armas', + + -- Bills Menu + ['bills_title'] = 'Facturas', + + -- Clothes Menu + ['clothes_title'] = 'Ropa', + ['clothes_torso'] = 'Torso', + ['clothes_pants'] = 'Pantalones', + ['clothes_shoes'] = 'Zapatos', + ['clothes_bag'] = 'Bolso/a', + ['clothes_bproof'] = 'Chaleco Anti-Balas', + + -- Accessories Menu + ['accessories_title'] = 'Accesorios', + ['accessories_ears'] = 'Accesorios de oreja', + ['accessories_glasses'] = 'Gafas', + ['accessories_helmet'] = 'Gorra / Casco', + ['accessories_mask'] = 'Máscara', + + -- Animation Menu + ['animation_title'] = 'Animaciones', + ['animation_party_title'] = 'Festivales', + ['animation_party_smoke'] = 'Fumar un cigarro', + ['animation_party_playsong'] = 'Poner música', + ['animation_party_dj'] = 'DJ', + ['animation_party_beer'] = 'Cerveza', + ['animation_party_dancing'] = 'Montar una fiesta', + ['animation_party_airguitar'] = 'Tocar la guitarra', + ['animation_party_shagging'] = 'Fornicar al aire', + ['animation_party_rock'] = 'Rock n roll', + ['animation_party_drunk'] = 'Borracho', + ['animation_party_vomit'] = 'Vomitar', + ['animation_salute_title'] = 'Saludos', + ['animation_salute_saluate'] = 'Saludar', + ['animation_salute_serrer'] = 'Dar la mano', + ['animation_salute_tchek'] = 'Chek', + ['animation_salute_bandit'] = 'Saludo bandido', + ['animation_salute_military'] = 'Saludo militar', + ['animation_work_title'] = 'Trabajo', + ['animation_work_suspect'] = 'Rendirse', + ['animation_work_fisherman'] = 'Pescadero', + ['animation_work_inspect'] = 'Policia: investigar', + ['animation_work_radio'] = 'Policia: hablar en la radio', + ['animation_work_circulation'] = 'Policia: circulación', + ['animation_work_binoculars'] = 'Font: prismáticos', + ['animation_work_harvest'] = 'Agricultura: cosecha', + ['animation_work_repair'] = 'Mecánico: arreglar el motor', + ['animation_work_observe'] = 'Médico: observar', + ['animation_work_talk'] = 'Taxi: hablar con el cliente', + ['animation_work_bill'] = 'Taxi: entregar factura', + ['animation_work_buy'] = 'Dependiente: entregar la compra', + ['animation_work_shot'] = 'Camarero: servir un chupito', + ['animation_work_picture'] = 'Reportero: sacar una foto', + ['animation_work_notes'] = 'Todos: Tomar notas', + ['animation_work_hammer'] = 'Todos: Golpe de martillo', + ['animation_work_beg'] = 'SDF: hacer la ronda', + ['animation_work_statue'] = 'SDF: hacer la estatua', + ['animation_mood_title'] = 'Estado', + ['animation_mood_felicitate'] = 'Felicitar', + ['animation_mood_nice'] = 'Guay', + ['animation_mood_you'] = 'Tu', + ['animation_mood_come'] = 'Vienes', + ['animation_mood_what'] = 'Que?', + ['animation_mood_me'] = 'A mi', + ['animation_mood_seriously'] = 'Lo sabia, joder', + ['animation_mood_tired'] = 'Exhausto', + ['animation_mood_shit'] = 'Estoy en la mierda', + ['animation_mood_facepalm'] = 'Facepalm', + ['animation_mood_calm'] = 'Tranquilizate', + ['animation_mood_why'] = 'Que hice?', + ['animation_mood_fear'] = 'Cagate', + ['animation_mood_fight'] = 'Pelea?', + ['animation_mood_notpossible'] = 'No es posible!', + ['animation_mood_embrace'] = 'Abrazar', + ['animation_mood_fuckyou'] = 'Dedo del medio', + ['animation_mood_wanker'] = 'Una buena paja', + ['animation_mood_suicide'] = 'Bala en la cabeza', + ['animation_sports_title'] = 'Deportes', + ['animation_sports_muscle'] = 'Mostrar tus músculos', + ['animation_sports_weightbar'] = 'Barra de pesas', + ['animation_sports_pushup'] = 'Hacer flexiones', + ['animation_sports_abs'] = 'Hacer abdominales', + ['animation_sports_yoga'] = 'Hacer yoga', + ['animation_other_title'] = 'Random', + ['animation_other_sit'] = 'Sentarse', + ['animation_other_waitwall'] = 'Apoyarse contra el muro', + ['animation_other_ontheback'] = 'Tumbarse de frente', + ['animation_other_stomach'] = 'Tumbarse de espaldas', + ['animation_other_clean'] = 'Limpiar', + ['animation_other_cooking'] = 'Preparar la comida', + ['animation_other_search'] = 'Buscar posición', + ['animation_other_selfie'] = 'Sacar un selfie', + ['animation_other_door'] = 'Escuchar por la puerta', + ['animation_pegi_title'] = 'PEGI 18', + ['animation_pegi_hsuck'] = 'Hombre recibiendo felación', + ['animation_pegi_fsuck'] = 'Mujer chupa en el coche', + ['animation_pegi_hfuck'] = 'Hombre fornica ** en el coche', + ['animation_pegi_ffuck'] = 'Mujer fornicando en coche', + ['animation_pegi_scratch'] = 'Rascarse la pelotas', + ['animation_pegi_charm'] = 'Producir encanto', + ['animation_pegi_golddigger'] = 'Pose de flipao', + ['animation_pegi_breast'] = 'Mostrar tetas', + ['animation_pegi_strip1'] = 'Strip Tease 1', + ['animation_pegi_strip2'] = 'Strip Tease 2', + ['animation_pegi_stripfloor'] = 'Strip Tease en el suelo', + ['animation_attitudes_title'] = 'Acercarse', + + -- Vehicle Menu + ['vehicle_title'] = 'Vehículos', + ['vehicle_engine_button'] = 'Encender / Apagar motor', + ['vehicle_door_button'] = 'Abrir / Cerrar Puerta', + ['vehicle_hood_button'] = 'Abrir / Cerrar Capó', + ['vehicle_trunk_button'] = 'Abrir / Cerrar Maletero', + ['vehicle_door_frontleft'] = 'Puerta delantera izquierda', + ['vehicle_door_frontright'] = 'Puerta delantera derecha', + ['vehicle_door_backleft'] = 'Puerta trasera izquierda', + ['vehicle_door_backright'] = 'Puerta trasera derecha', + + -- Boss Management Menu + ['bossmanagement_title'] = 'Negocios', + ['bossmanagement_chest_button'] = 'Negocio Cofre:', + ['bossmanagement_hire_button'] = 'Reclutar', + ['bossmanagement_fire_button'] = 'Despedir', + ['bossmanagement_promote_button'] = 'Promocionar', + ['bossmanagement_demote_button'] = 'Degradar', + + -- Boss Management 2 Menu + ['bossmanagement2_title'] = 'Organización', + ['bossmanagement2_chest_button'] = 'Organization Cofre:', + ['bossmanagement2_hire_button'] = 'Reclutar', + ['bossmanagement2_fire_button'] = 'Despedir', + ['bossmanagement2_promote_button'] = 'Promocionar', + ['bossmanagement2_demote_button'] = 'Degradar', + + -- Admin Menu + ['admin_title'] = 'Administración', + ['admin_goto_button'] = 'TP a jugador', + ['admin_bring_button'] = 'TP jugador a mí', + ['admin_tpxyz_button'] = 'TP a coordenadas', + ['admin_noclip_button'] = 'NoClip', + ['admin_godmode_button'] = 'Modo invencible', + ['admin_ghostmode_button'] = 'Modo invisible', + ['admin_spawnveh_button'] = 'Respawnear vehiculo', + ['admin_repairveh_button'] = 'Reparar vehiculo', + ['admin_flipveh_button'] = 'Devolver un vehiculo', + ['admin_givemoney_button'] = 'Dar dinero ', + ['admin_givebank_button'] = 'Dar dinero (banco) ', + ['admin_givedirtymoney_button'] = 'Dar dinero sucio', + ['admin_showxyz_button'] = 'Mostrar / Ocultar Coordenadas', + ['admin_showname_button'] = 'Mostrar / Ocultar Nombres de jugadores', + ['admin_tpmarker_button'] = 'TP al marcador', + ['admin_revive_button'] = 'Revivir un jugador', + ['admin_changeskin_button'] = 'Cambiar apariencia', + ['admin_saveskin_button'] = 'Guardar apariencia', + + -- GPS + ['none'] = 'No Location', -- No translated + ['police_station'] = 'Police Station', -- No translated + ['central_garage'] = 'Central garage', -- No translated + ['hospital'] = 'Hospital', -- No translated + ['dealer'] = 'Cardealer', -- No translated + ['bennys_custom'] = 'Bennys Custom', -- No translated + ['job_center'] = 'Employment center', -- No translated + ['driving_school'] = 'Driving school', -- No translated + ['tequila-la'] = 'tequila-la', -- No translated + ['bahama_mamas'] = 'bahama_mamas' -- No translated } \ No newline at end of file diff --git a/locales/fr.lua b/locales/fr.lua index 5a4348f..bb15722 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -1,249 +1,249 @@ Locales['fr'] = { - -- DialogBox Name - ['dialogbox_playerid'] = 'ID du Joueur (8 Caractères Maximum):', - ['dialogbox_amount'] = 'Montant (8 Caractères Maximum):', - ['dialogbox_amount_ammo'] = 'Montant de Munitions (8 Caractères Maximum):', - ['dialogbox_vehiclespawner'] = 'Nom du Véhicule (50 Caractères Maximum):', - ['dialogbox_xyz'] = 'Position XYZ (50 Caractères Maximum):', - - -- Menu Default Vars - ['default_gps'] = 'Aucun', - ['default_attitude'] = 'Normal', - ['default_voice'] = 'Normal', - - -- Menu Notification - ['missing_rights'] = 'Vous n\'avez pas les ~r~droits~w~', - ['no_vehicle'] = 'Vous n\'êtes pas dans un véhicule', - ['players_nearby'] = 'Aucun joueur à proximité', - ['amount_invalid'] = 'Montant Invalide', - ['in_vehicle_give'] = 'Impossible de donner %s dans un véhicule', - ['in_vehicle_drop'] = 'Impossible de jeter %s dans un véhicule', - ['not_usable'] = '%s n\'est pas utilisable', - ['not_droppable'] = '%s n\'est pas jetable', - ['gave_ammo'] = 'Vous avez donné x%s munitions à %s', - ['no_ammo'] = 'Vous ne possédez pas de munitions', - ['not_enough_ammo'] = 'Vous ne possédez pas autant de munitions', - ['accessories_no_ears'] = 'Vous ne possédez pas d\'accessoire d\'oreilles', - ['accessories_no_glasses'] = 'Vous ne possédez pas de lunettes', - ['accessories_no_helmet'] = 'Vous ne possédez pas de casque / chapeau', - ['accessories_no_mask'] = 'Vous ne possédez pas de masque', - ['admin_noclipon'] = 'NoClip ~g~activé', - ['admin_noclipoff'] = 'NoClip ~r~désactivé', - ['admin_godmodeon'] = 'Mode invincible ~g~activé', - ['admin_godmodeoff'] = 'Mode invincible ~r~désactivé', - ['admin_ghoston'] = 'Mode fantôme ~g~activé', - ['admin_ghostoff'] = 'Mode fantôme ~r~désactivé', - ['admin_vehicleflip'] = 'Voiture retourné', - ['admin_tpmarker'] = 'Téléporté sur le marqueur !', - ['admin_nomarker'] = 'Pas de marqueur sur la carte !', - - -- Main Menu - ['mainmenu_subtitle'] = 'MENU INTERACTION', - ['mainmenu_gps_button'] = 'Destination GPS', - ['mainmenu_voice_button'] = 'Voix', - ['gps'] = 'GPS: ~b~%s', - ['approach'] = 'Démarche: ~b~%s', - ['voice'] = 'Voix: ~b~%s', - - -- Menu Voice Level - ['voice_whisper'] = 'Chuchoter', - ['voice_normal'] = 'Normal', - ['voice_cry'] = 'Crier', - - -- Inventory Menu - ['inventory_title'] = 'Inventaire', - ['inventory_actions_title'] = 'Inventaire: Action', - ['inventory_use_button'] = 'Utiliser', - ['inventory_give_button'] = 'Donner', - ['inventory_drop_button'] = 'Jeter', - - -- Loadout Menu - ['loadout_title'] = 'Gestion des Armes', - ['loadout_actions_title'] = 'Armes: Action', - ['loadout_give_button'] = 'Donner', - ['loadout_givemun_button'] = 'Donner Munitions', - ['loadout_drop_button'] = 'Jeter', - - -- Wallet Menu - ['wallet_title'] = 'Portefeuille', - ['wallet_option_give'] = 'Donner', - ['wallet_option_drop'] = 'Jeter', - ['wallet_job_button'] = 'Métier: %s - %s', - ['wallet_job2_button'] = 'Organisation: %s - %s', - ['wallet_money_button'] = 'Argent: $%s', - ['wallet_bankmoney_button'] = 'Banque: $%s', - ['wallet_blackmoney_button'] = 'Argent Sale: $%s', - ['wallet_show_idcard_button'] = 'Montrer sa carte d\'identité', - ['wallet_check_idcard_button'] = 'Regarder sa carte d\'identité', - ['wallet_show_driver_button'] = 'Montrer son permis de conduire', - ['wallet_check_driver_button'] = 'Regarder son permis de conduire', - ['wallet_show_firearms_button'] = 'Montrer son permis port d\'armes', - ['wallet_check_firearms_button'] = 'Regarder son permis port d\'armes', - - -- Bills Menu - ['bills_title'] = 'Factures', - - -- Clothes Menu - ['clothes_title'] = 'Vêtements', - ['clothes_torso'] = 'Haut', - ['clothes_pants'] = 'Bas', - ['clothes_shoes'] = 'Chaussures', - ['clothes_bag'] = 'Sac', - ['clothes_bproof'] = 'Gilet par Balle', - - -- Accessories Menu - ['accessories_title'] = 'Accessoires', - ['accessories_ears'] = 'Accessoire d\'Oreilles', - ['accessories_glasses'] = 'Lunettes', - ['accessories_helmet'] = 'Chapeau/Casque', - ['accessories_mask'] = 'Masque', - - -- Animation Menu - ['animation_title'] = 'Animations', - - ['animation_party_title'] = 'Festives', - ['animation_party_smoke'] = 'Fumer une cigarette', - ['animation_party_playsong'] = 'Jouer de la musique', - ['animation_party_dj'] = 'DJ', - ['animation_party_beer'] = 'Bière en Zik', - ['animation_party_dancing'] = 'Faire la Fête', - ['animation_party_airguitar'] = 'Air Guitar', - ['animation_party_shagging'] = 'Air Shagging', - ['animation_party_rock'] = 'Rock\'n\'roll', - ['animation_party_drunk'] = 'Bourré sur place', - ['animation_party_vomit'] = 'Vomir en voiture', - ['animation_salute_title'] = 'Salutations', - ['animation_salute_saluate'] = 'Saluer', - ['animation_salute_serrer'] = 'Serrer la main', - ['animation_salute_tchek'] = 'Tchek', - ['animation_salute_bandit'] = 'Salut bandit', - ['animation_salute_military'] = 'Salut Militaire', - ['animation_work_title'] = 'Travail', - ['animation_work_suspect'] = 'Se rendre', - ['animation_work_fisherman'] = 'Pêcheur', - ['animation_work_inspect'] = 'Police : enquêter', - ['animation_work_radio'] = 'Police : parler à la radio', - ['animation_work_circulation'] = 'Police : circulation', - ['animation_work_binoculars'] = 'Police : jumelles', - ['animation_work_harvest'] = 'Agriculture : récolter', - ['animation_work_repair'] = 'Dépanneur : réparer le moteur', - ['animation_work_observe'] = 'Médecin : observer', - ['animation_work_talk'] = 'Taxi : parler au client', - ['animation_work_bill'] = 'Taxi : donner la facture', - ['animation_work_buy'] = 'Epicier : donner les courses', - ['animation_work_shot'] = 'Barman : servir un shot', - ['animation_work_picture'] = 'Journaliste : Prendre une photo', - ['animation_work_notes'] = 'Tout : Prendre des notes', - ['animation_work_hammer'] = 'Tout : Coup de marteau', - ['animation_work_beg'] = 'SDF : Faire la manche', - ['animation_work_statue'] = 'SDF : Faire la statue', - ['animation_mood_title'] = 'Humeurs', - ['animation_mood_felicitate'] = 'Féliciter', - ['animation_mood_nice'] = 'Super', - ['animation_mood_you'] = 'Toi', - ['animation_mood_come'] = 'Viens', - ['animation_mood_what'] = 'Keskya ?', - ['animation_mood_me'] = 'A moi', - ['animation_mood_seriously'] = 'Je le savais, putain', - ['animation_mood_tired'] = 'Etre épuisé', - ['animation_mood_shit'] = 'Je suis dans la merde', - ['animation_mood_facepalm'] = 'Facepalm', - ['animation_mood_calm'] = 'Calme-toi', - ['animation_mood_why'] = 'Qu\'est ce que j\'ai fait ?', - ['animation_mood_fear'] = 'Avoir peur', - ['animation_mood_fight'] = 'Fight ?', - ['animation_mood_notpossible'] = 'C\'est pas Possible !', - ['animation_mood_embrace'] = 'Enlacer', - ['animation_mood_fuckyou'] = 'Doigt d\'honneur', - ['animation_mood_wanker'] = 'Branleur', - ['animation_mood_suicide'] = 'Balle dans la tête', - ['animation_sports_title'] = 'Sports', - ['animation_sports_muscle'] = 'Montrer ses muscles', - ['animation_sports_weightbar'] = 'Barre de musculation', - ['animation_sports_pushup'] = 'Faire des pompes', - ['animation_sports_abs'] = 'Faire des abdos', - ['animation_sports_yoga'] = 'Faire du yoga', - ['animation_other_title'] = 'Divers', - ['animation_other_sit'] = 'S\'asseoir', - ['animation_other_waitwall'] = 'Attendre contre un mur', - ['animation_other_ontheback'] = 'Couché sur le dos', - ['animation_other_stomach'] = 'Couché sur le ventre', - ['animation_other_clean'] = 'Nettoyer', - ['animation_other_cooking'] = 'Préparer à manger', - ['animation_other_search'] = 'Position de Fouille', - ['animation_other_selfie'] = 'Prendre un selfie', - ['animation_other_door'] = 'Ecouter à une porte', - ['animation_pegi_title'] = 'PEGI 21', - ['animation_pegi_hsuck'] = 'Homme se faire suc** en voiture', - ['animation_pegi_fsuck'] = 'Femme suc** en voiture', - ['animation_pegi_hfuck'] = 'Homme bais** en voiture', - ['animation_pegi_ffuck'] = 'Femme bais** en voiture', - ['animation_pegi_scratch'] = 'Se gratter les couilles', - ['animation_pegi_charm'] = 'Faire du charme', - ['animation_pegi_golddigger'] = 'Pose michto', - ['animation_pegi_breast'] = 'Montrer sa poitrine', - ['animation_pegi_strip1'] = 'Strip Tease 1', - ['animation_pegi_strip2'] = 'Strip Tease 2', - ['animation_pegi_stripfloor'] = 'Strip Tease au sol', - ['animation_attitudes_title'] = 'Démarche', - - -- Vehicle Menu - ['vehicle_title'] = 'Gestion Véhicule', - ['vehicle_engine_button'] = 'Allumer/Eteindre le Moteur', - ['vehicle_door_button'] = 'Ouvrir/Fermer Porte', - ['vehicle_hood_button'] = 'Ouvrir/Fermer Capot', - ['vehicle_trunk_button'] = 'Ouvrir/Fermer Coffre', - ['vehicle_door_frontleft'] = 'Avant Gauche', - ['vehicle_door_frontright'] = 'Avant Droite', - ['vehicle_door_backleft'] = 'Arrière Gauche', - ['vehicle_door_backright'] = 'Arrière Droite', - - -- Boss Management Menu - ['bossmanagement_title'] = 'Gestion Entreprise', - ['bossmanagement_chest_button'] = 'Coffre Entreprise:', - ['bossmanagement_hire_button'] = 'Recruter', - ['bossmanagement_fire_button'] = 'Virer', - ['bossmanagement_promote_button'] = 'Promouvoir', - ['bossmanagement_demote_button'] = 'Destituer', - - -- Boss Management 2 Menu - ['bossmanagement2_title'] = 'Gestion Organisation', - ['bossmanagement2_chest_button'] = 'Coffre Organisation:', - ['bossmanagement2_hire_button'] = 'Recruter', - ['bossmanagement2_fire_button'] = 'Virer', - ['bossmanagement2_promote_button'] = 'Promouvoir', - ['bossmanagement2_demote_button'] = 'Destituer', - - -- Admin Menu - ['admin_title'] = 'Administration', - ['admin_goto_button'] = 'TP sur Joueur', - ['admin_bring_button'] = 'TP Joueur sur moi', - ['admin_tpxyz_button'] = 'TP sur Coordonées', - ['admin_noclip_button'] = 'NoClip', - ['admin_godmode_button'] = 'Mode Invincible', - ['admin_ghostmode_button'] = 'Mode Fantôme', - ['admin_spawnveh_button'] = 'Faire apparaître un Véhicule', - ['admin_repairveh_button'] = 'Réparer Véhicule', - ['admin_flipveh_button'] = 'Retourner le véhicule', - ['admin_givemoney_button'] = 'S\'octroyer de l\'argent', - ['admin_givebank_button'] = 'S\'octroyer de l\'argent (banque)', - ['admin_givedirtymoney_button'] = 'S\'octroyer de l\'argent sale', - ['admin_showxyz_button'] = 'Afficher/Cacher Coordonnées', - ['admin_showname_button'] = 'Afficher/Cacher Noms des Joueurs', - ['admin_tpmarker_button'] = 'TP sur le Marqueur', - ['admin_revive_button'] = 'Réanimer un Joueur', - ['admin_changeskin_button'] = 'Changer l\'Apparence', - ['admin_saveskin_button'] = 'Sauvegarder l\'Apparence', - - -- GPS - ['none'] = 'Aucun', - ['police_station'] = 'Poste de Police', - ['central_garage'] = 'Garage Central', - ['hospital'] = 'Hôpital', - ['dealer'] = 'Concessionnaire', - ['bennys_custom'] = 'Benny\'s Custom', - ['job_center'] = 'Pôle Emploie', - ['driving_school'] = 'Auto école', - ['tequila-la'] = 'Téquila-la', - ['bahama_mamas'] = 'Bahama Mamas' + -- DialogBox Name + ['dialogbox_playerid'] = 'ID du Joueur (8 Caractères Maximum):', + ['dialogbox_amount'] = 'Montant (8 Caractères Maximum):', + ['dialogbox_amount_ammo'] = 'Montant de Munitions (8 Caractères Maximum):', + ['dialogbox_vehiclespawner'] = 'Nom du Véhicule (50 Caractères Maximum):', + ['dialogbox_xyz'] = 'Position XYZ (50 Caractères Maximum):', + + -- Menu Default Vars + ['default_gps'] = 'Aucun', + ['default_attitude'] = 'Normal', + ['default_voice'] = 'Normal', + + -- Menu Notification + ['missing_rights'] = 'Vous n\'avez pas les ~r~droits~w~', + ['no_vehicle'] = 'Vous n\'êtes pas dans un véhicule', + ['players_nearby'] = 'Aucun joueur à proximité', + ['amount_invalid'] = 'Montant Invalide', + ['in_vehicle_give'] = 'Impossible de donner %s dans un véhicule', + ['in_vehicle_drop'] = 'Impossible de jeter %s dans un véhicule', + ['not_usable'] = '%s n\'est pas utilisable', + ['not_droppable'] = '%s n\'est pas jetable', + ['gave_ammo'] = 'Vous avez donné x%s munitions à %s', + ['no_ammo'] = 'Vous ne possédez pas de munitions', + ['not_enough_ammo'] = 'Vous ne possédez pas autant de munitions', + ['accessories_no_ears'] = 'Vous ne possédez pas d\'accessoire d\'oreilles', + ['accessories_no_glasses'] = 'Vous ne possédez pas de lunettes', + ['accessories_no_helmet'] = 'Vous ne possédez pas de casque / chapeau', + ['accessories_no_mask'] = 'Vous ne possédez pas de masque', + ['admin_noclipon'] = 'NoClip ~g~activé', + ['admin_noclipoff'] = 'NoClip ~r~désactivé', + ['admin_godmodeon'] = 'Mode invincible ~g~activé', + ['admin_godmodeoff'] = 'Mode invincible ~r~désactivé', + ['admin_ghoston'] = 'Mode fantôme ~g~activé', + ['admin_ghostoff'] = 'Mode fantôme ~r~désactivé', + ['admin_vehicleflip'] = 'Voiture retourné', + ['admin_tpmarker'] = 'Téléporté sur le marqueur !', + ['admin_nomarker'] = 'Pas de marqueur sur la carte !', + + -- Main Menu + ['mainmenu_subtitle'] = 'MENU INTERACTION', + ['mainmenu_gps_button'] = 'Destination GPS', + ['mainmenu_voice_button'] = 'Voix', + ['gps'] = 'GPS: ~b~%s', + ['approach'] = 'Démarche: ~b~%s', + ['voice'] = 'Voix: ~b~%s', + + -- Menu Voice Level + ['voice_whisper'] = 'Chuchoter', + ['voice_normal'] = 'Normal', + ['voice_cry'] = 'Crier', + + -- Inventory Menu + ['inventory_title'] = 'Inventaire', + ['inventory_actions_title'] = 'Inventaire: Action', + ['inventory_use_button'] = 'Utiliser', + ['inventory_give_button'] = 'Donner', + ['inventory_drop_button'] = 'Jeter', + + -- Loadout Menu + ['loadout_title'] = 'Gestion des Armes', + ['loadout_actions_title'] = 'Armes: Action', + ['loadout_give_button'] = 'Donner', + ['loadout_givemun_button'] = 'Donner Munitions', + ['loadout_drop_button'] = 'Jeter', + + -- Wallet Menu + ['wallet_title'] = 'Portefeuille', + ['wallet_option_give'] = 'Donner', + ['wallet_option_drop'] = 'Jeter', + ['wallet_job_button'] = 'Métier: %s - %s', + ['wallet_job2_button'] = 'Organisation: %s - %s', + ['wallet_money_button'] = 'Argent: $%s', + ['wallet_bankmoney_button'] = 'Banque: $%s', + ['wallet_blackmoney_button'] = 'Argent Sale: $%s', + ['wallet_show_idcard_button'] = 'Montrer sa carte d\'identité', + ['wallet_check_idcard_button'] = 'Regarder sa carte d\'identité', + ['wallet_show_driver_button'] = 'Montrer son permis de conduire', + ['wallet_check_driver_button'] = 'Regarder son permis de conduire', + ['wallet_show_firearms_button'] = 'Montrer son permis port d\'armes', + ['wallet_check_firearms_button'] = 'Regarder son permis port d\'armes', + + -- Bills Menu + ['bills_title'] = 'Factures', + + -- Clothes Menu + ['clothes_title'] = 'Vêtements', + ['clothes_torso'] = 'Haut', + ['clothes_pants'] = 'Bas', + ['clothes_shoes'] = 'Chaussures', + ['clothes_bag'] = 'Sac', + ['clothes_bproof'] = 'Gilet par Balle', + + -- Accessories Menu + ['accessories_title'] = 'Accessoires', + ['accessories_ears'] = 'Accessoire d\'Oreilles', + ['accessories_glasses'] = 'Lunettes', + ['accessories_helmet'] = 'Chapeau/Casque', + ['accessories_mask'] = 'Masque', + + -- Animation Menu + ['animation_title'] = 'Animations', + + ['animation_party_title'] = 'Festives', + ['animation_party_smoke'] = 'Fumer une cigarette', + ['animation_party_playsong'] = 'Jouer de la musique', + ['animation_party_dj'] = 'DJ', + ['animation_party_beer'] = 'Bière en Zik', + ['animation_party_dancing'] = 'Faire la Fête', + ['animation_party_airguitar'] = 'Air Guitar', + ['animation_party_shagging'] = 'Air Shagging', + ['animation_party_rock'] = 'Rock\'n\'roll', + ['animation_party_drunk'] = 'Bourré sur place', + ['animation_party_vomit'] = 'Vomir en voiture', + ['animation_salute_title'] = 'Salutations', + ['animation_salute_saluate'] = 'Saluer', + ['animation_salute_serrer'] = 'Serrer la main', + ['animation_salute_tchek'] = 'Tchek', + ['animation_salute_bandit'] = 'Salut bandit', + ['animation_salute_military'] = 'Salut Militaire', + ['animation_work_title'] = 'Travail', + ['animation_work_suspect'] = 'Se rendre', + ['animation_work_fisherman'] = 'Pêcheur', + ['animation_work_inspect'] = 'Police : enquêter', + ['animation_work_radio'] = 'Police : parler à la radio', + ['animation_work_circulation'] = 'Police : circulation', + ['animation_work_binoculars'] = 'Police : jumelles', + ['animation_work_harvest'] = 'Agriculture : récolter', + ['animation_work_repair'] = 'Dépanneur : réparer le moteur', + ['animation_work_observe'] = 'Médecin : observer', + ['animation_work_talk'] = 'Taxi : parler au client', + ['animation_work_bill'] = 'Taxi : donner la facture', + ['animation_work_buy'] = 'Epicier : donner les courses', + ['animation_work_shot'] = 'Barman : servir un shot', + ['animation_work_picture'] = 'Journaliste : Prendre une photo', + ['animation_work_notes'] = 'Tout : Prendre des notes', + ['animation_work_hammer'] = 'Tout : Coup de marteau', + ['animation_work_beg'] = 'SDF : Faire la manche', + ['animation_work_statue'] = 'SDF : Faire la statue', + ['animation_mood_title'] = 'Humeurs', + ['animation_mood_felicitate'] = 'Féliciter', + ['animation_mood_nice'] = 'Super', + ['animation_mood_you'] = 'Toi', + ['animation_mood_come'] = 'Viens', + ['animation_mood_what'] = 'Keskya ?', + ['animation_mood_me'] = 'A moi', + ['animation_mood_seriously'] = 'Je le savais, putain', + ['animation_mood_tired'] = 'Etre épuisé', + ['animation_mood_shit'] = 'Je suis dans la merde', + ['animation_mood_facepalm'] = 'Facepalm', + ['animation_mood_calm'] = 'Calme-toi', + ['animation_mood_why'] = 'Qu\'est ce que j\'ai fait ?', + ['animation_mood_fear'] = 'Avoir peur', + ['animation_mood_fight'] = 'Fight ?', + ['animation_mood_notpossible'] = 'C\'est pas Possible !', + ['animation_mood_embrace'] = 'Enlacer', + ['animation_mood_fuckyou'] = 'Doigt d\'honneur', + ['animation_mood_wanker'] = 'Branleur', + ['animation_mood_suicide'] = 'Balle dans la tête', + ['animation_sports_title'] = 'Sports', + ['animation_sports_muscle'] = 'Montrer ses muscles', + ['animation_sports_weightbar'] = 'Barre de musculation', + ['animation_sports_pushup'] = 'Faire des pompes', + ['animation_sports_abs'] = 'Faire des abdos', + ['animation_sports_yoga'] = 'Faire du yoga', + ['animation_other_title'] = 'Divers', + ['animation_other_sit'] = 'S\'asseoir', + ['animation_other_waitwall'] = 'Attendre contre un mur', + ['animation_other_ontheback'] = 'Couché sur le dos', + ['animation_other_stomach'] = 'Couché sur le ventre', + ['animation_other_clean'] = 'Nettoyer', + ['animation_other_cooking'] = 'Préparer à manger', + ['animation_other_search'] = 'Position de Fouille', + ['animation_other_selfie'] = 'Prendre un selfie', + ['animation_other_door'] = 'Ecouter à une porte', + ['animation_pegi_title'] = 'PEGI 21', + ['animation_pegi_hsuck'] = 'Homme se faire suc** en voiture', + ['animation_pegi_fsuck'] = 'Femme suc** en voiture', + ['animation_pegi_hfuck'] = 'Homme bais** en voiture', + ['animation_pegi_ffuck'] = 'Femme bais** en voiture', + ['animation_pegi_scratch'] = 'Se gratter les couilles', + ['animation_pegi_charm'] = 'Faire du charme', + ['animation_pegi_golddigger'] = 'Pose michto', + ['animation_pegi_breast'] = 'Montrer sa poitrine', + ['animation_pegi_strip1'] = 'Strip Tease 1', + ['animation_pegi_strip2'] = 'Strip Tease 2', + ['animation_pegi_stripfloor'] = 'Strip Tease au sol', + ['animation_attitudes_title'] = 'Démarche', + + -- Vehicle Menu + ['vehicle_title'] = 'Gestion Véhicule', + ['vehicle_engine_button'] = 'Allumer/Eteindre le Moteur', + ['vehicle_door_button'] = 'Ouvrir/Fermer Porte', + ['vehicle_hood_button'] = 'Ouvrir/Fermer Capot', + ['vehicle_trunk_button'] = 'Ouvrir/Fermer Coffre', + ['vehicle_door_frontleft'] = 'Avant Gauche', + ['vehicle_door_frontright'] = 'Avant Droite', + ['vehicle_door_backleft'] = 'Arrière Gauche', + ['vehicle_door_backright'] = 'Arrière Droite', + + -- Boss Management Menu + ['bossmanagement_title'] = 'Gestion Entreprise', + ['bossmanagement_chest_button'] = 'Coffre Entreprise:', + ['bossmanagement_hire_button'] = 'Recruter', + ['bossmanagement_fire_button'] = 'Virer', + ['bossmanagement_promote_button'] = 'Promouvoir', + ['bossmanagement_demote_button'] = 'Destituer', + + -- Boss Management 2 Menu + ['bossmanagement2_title'] = 'Gestion Organisation', + ['bossmanagement2_chest_button'] = 'Coffre Organisation:', + ['bossmanagement2_hire_button'] = 'Recruter', + ['bossmanagement2_fire_button'] = 'Virer', + ['bossmanagement2_promote_button'] = 'Promouvoir', + ['bossmanagement2_demote_button'] = 'Destituer', + + -- Admin Menu + ['admin_title'] = 'Administration', + ['admin_goto_button'] = 'TP sur Joueur', + ['admin_bring_button'] = 'TP Joueur sur moi', + ['admin_tpxyz_button'] = 'TP sur Coordonées', + ['admin_noclip_button'] = 'NoClip', + ['admin_godmode_button'] = 'Mode Invincible', + ['admin_ghostmode_button'] = 'Mode Fantôme', + ['admin_spawnveh_button'] = 'Faire apparaître un Véhicule', + ['admin_repairveh_button'] = 'Réparer Véhicule', + ['admin_flipveh_button'] = 'Retourner le véhicule', + ['admin_givemoney_button'] = 'S\'octroyer de l\'argent', + ['admin_givebank_button'] = 'S\'octroyer de l\'argent (banque)', + ['admin_givedirtymoney_button'] = 'S\'octroyer de l\'argent sale', + ['admin_showxyz_button'] = 'Afficher/Cacher Coordonnées', + ['admin_showname_button'] = 'Afficher/Cacher Noms des Joueurs', + ['admin_tpmarker_button'] = 'TP sur le Marqueur', + ['admin_revive_button'] = 'Réanimer un Joueur', + ['admin_changeskin_button'] = 'Changer l\'Apparence', + ['admin_saveskin_button'] = 'Sauvegarder l\'Apparence', + + -- GPS + ['none'] = 'Aucun', + ['police_station'] = 'Poste de Police', + ['central_garage'] = 'Garage Central', + ['hospital'] = 'Hôpital', + ['dealer'] = 'Concessionnaire', + ['bennys_custom'] = 'Benny\'s Custom', + ['job_center'] = 'Pôle Emploie', + ['driving_school'] = 'Auto école', + ['tequila-la'] = 'Téquila-la', + ['bahama_mamas'] = 'Bahama Mamas' } diff --git a/locales/it.lua b/locales/it.lua index 643081a..c3278eb 100644 --- a/locales/it.lua +++ b/locales/it.lua @@ -1,249 +1,249 @@ Locales['it'] = { - -- DialogBox Name - ['dialogbox_playerid'] = 'ID giocatore (8 caratteri massimo):', - ['dialogbox_amount'] = 'Importo (8 caratteri massimo):', - ['dialogbox_amount_ammo'] = 'Importo (8 caratteri massimo):', - ['dialogbox_vehiclespawner'] = 'Nome del veicolo (massimo 50 caratteri):', - ['dialogbox_xyz'] = 'Posizione XYZ (massimo 50 caratteri):', - - -- Menu Default Vars - ['default_attitude'] = 'Normale', - ['default_voice'] = 'Normale', - - -- Menu Notification - ['missing_rights'] = 'Non hai il ~r~diritto~w~', - ['no_vehicle'] = 'Non sei in un veicolo', - ['players_nearby'] = 'Nessun giocatore nelle vicinanze', - ['amount_invalid'] = 'Importo non valido', - ['in_vehicle_give'] = 'Non puoi dare %s da dentro il veicolo', - ['in_vehicle_drop'] = 'Non puoi gettare %s dal veicolo', - ['not_usable'] = '%s Non è utilizzabile', - ['not_droppable'] = '%s Non è usa e getta', - ['gave_ammo'] = 'Hai dato x %s munizioni per %s', - ['no_ammo'] = 'Non hai munizioni', - ['not_enough_ammo'] = 'Non hai tante munizioni', - ['accessories_no_ears'] = 'Non hai un accessorio per l\'orecchio', - ['accessories_no_glasses'] = 'Non hai gli occhiali', - ['accessories_no_helmet'] = 'Non hai un casco/cappello', - ['accessories_no_mask'] = 'Non hai una maschera', - ['admin_noclipon'] = 'NoClip attivato', - ['admin_noclipoff'] = 'NoClip disattivato', - ['admin_godmodeon'] = 'Modalità invincibile attivata', - ['admin_godmodeoff'] = 'Modalità invincibile disattivata', - ['admin_ghoston'] = 'Modalità fantasma attivata', - ['admin_ghostoff'] = 'Modalita fantasma disattivata', - ['admin_vehicleflip'] = 'Auto restituita', - ['admin_tpmarker'] = 'Teletrasportato sul segnalino!', - ['admin_nomarker'] = 'Nessun indicatore sulla mappa!', - - -- Main Menu - ['mainmenu_subtitle'] = 'MENU INTERAZIONE', - ['approach'] = 'Approccio: ~b~%s', - ['voice'] = 'Voce: ~b~%s', - - -- Menu Voice Level - ['voice_whisper'] = 'Sussurro', - ['voice_normal'] = 'Normale', - ['voice_cry'] = 'Urlo', - - -- Inventory Menu - ['inventory_title'] = 'Inventario', - ['inventory_actions_title'] = 'Inventario: Azioni', - ['inventory_use_button'] = 'Usa', - ['inventory_give_button'] = 'Dai', - ['inventory_drop_button'] = 'Butta', - - -- Loadout Menu - ['loadout_title'] = 'Gestione armi', - ['loadout_actions_title'] = 'Armi: Azioni', - ['loadout_give_button'] = 'Dai', - ['loadout_givemun_button'] = 'Dai munizioni', - ['loadout_drop_button'] = 'Butta', - - -- Wallet Menu - ['wallet_title'] = 'Portafoglio', - ['wallet_option_give'] = 'Dai', - ['wallet_option_drop'] = 'Butta', - ['wallet_job_button'] = 'Attività commerciale: %s - %s', - ['wallet_job2_button'] = 'Organizzazione: %s - %s', - ['wallet_money_button'] = 'Denaro: $%s', - ['wallet_bankmoney_button'] = 'Banca: $%s', - ['wallet_blackmoney_button'] = 'Soldi sporchi: $%s', - ['wallet_show_idcard_button'] = 'Mostra carta d\'identità', - ['wallet_check_idcard_button'] = 'Guarda la carta d\'identità', - ['wallet_show_driver_button'] = 'Mostra patente di guida', - ['wallet_check_driver_button'] = 'Guarda patente di guida', - ['wallet_show_firearms_button'] = 'Mostra porto d\'armi', - ['wallet_check_firearms_button'] = 'Guarda porto d\'armi', - - -- Bills Menu - ['bills_title'] = 'Fatture', - - -- Clothes Menu - ['clothes_title'] = 'Capi di abbigliamento', - ['clothes_torso'] = 'Torso', - ['clothes_pants'] = 'Pants', - ['clothes_shoes'] = 'Scarpe', - ['clothes_bag'] = 'Borsa', - ['clothes_bproof'] = 'Giubbotto antiproiettile', - - -- Accessories Menu - ['accessories_title'] = 'Accessori', - ['accessories_ears'] = 'Accessorio per le orecchie', - ['accessories_glasses'] = 'Occhiali', - ['accessories_helmet'] = 'Cappello / Casco', - ['accessories_mask'] = 'Maschera', - - -- Animation Menu - ['animation_title'] = 'Animazioni', - ['animation_party_title'] = 'Animazioni Festive', - ['animation_party_smoke'] = 'Fuma una sigaretta', - ['animation_party_playsong'] = 'Ascolta una canzone', - ['animation_party_dj'] = 'Animazione DJ', - ['animation_party_beer'] = 'Ubriaco beve birra', - ['animation_party_dancing'] = 'Festeggia', - ['animation_party_airguitar'] = 'Suona finta chitarra', - ['animation_party_shagging'] = 'sc*pata finta', - ['animation_party_rock'] = 'Rock n roll con le mani', - ['animation_party_drunk'] = 'Ubriaco sul posto', - ['animation_party_vomit'] = 'Vomita dalla macchina', - ['animation_salute_title'] = 'Saluti Vari', - ['animation_salute_saluate'] = 'Saluto veloce', - ['animation_salute_serrer'] = 'Stringi la mano', - ['animation_salute_tchek'] = 'Saluto da duro', - ['animation_salute_bandit'] = 'Saluto tra fratelli', - ['animation_salute_military'] = 'Saluto Militare', - ['animation_work_title'] = 'Lavori', - ['animation_work_suspect'] = 'Arrenditi', - ['animation_work_fisherman'] = 'Pesca', - ['animation_work_inspect'] = 'Detective: investigatore', - ['animation_work_radio'] = 'Agente: Parla nella radio', - ['animation_work_circulation'] = 'Assistenza Stradale: circolazione', - ['animation_work_binoculars'] = 'Font: osserva con il binocolo', - ['animation_work_harvest'] = 'Giardiniere: coltiva piante', - ['animation_work_repair'] = 'Meccanico: ripara il motore', - ['animation_work_observe'] = 'Dottore: osserva il ferito', - ['animation_work_talk'] = 'Taxi: parla con il cliente', - ['animation_work_bill'] = 'Taxi: dai la mancia', - ['animation_work_buy'] = 'Droghiere: Servi cassa di alcolici', - ['animation_work_shot'] = 'Barman: servi un drink', - ['animation_work_picture'] = 'Reporter: Paparazzo', - ['animation_work_notes'] = 'Tutti: Prendi Appunti', - ['animation_work_hammer'] = 'Muratore: Martella il muro', - ['animation_work_beg'] = 'Senzatetto: chiedi soldi', - ['animation_work_statue'] = 'mimo: Fai la statua', - ['animation_mood_title'] = 'Gesti', - ['animation_mood_felicitate'] = 'Congratulati', - ['animation_mood_nice'] = 'Sei stato super', - ['animation_mood_you'] = 'tu (indica qualcuno)', - ['animation_mood_come'] = 'Vieni con me', - ['animation_mood_what'] = 'Keskya?', - ['animation_mood_me'] = 'Indica te stesso', - ['animation_mood_seriously'] = 'Lo so, ca**o', - ['animation_mood_tired'] = 'sii esaustivo', - ['animation_mood_shit'] = 'Sono nella mer*a', - ['animation_mood_facepalm'] = 'Mano sulla faccia', - ['animation_mood_calm'] = 'Calmati', - ['animation_mood_why'] = 'Cosa posso fare?', - ['animation_mood_fear'] = 'Rimani intimorito', - ['animation_mood_fight'] = 'Vuoi combattere? ', - ['animation_mood_notpossible'] = 'Non è possibile!', - ['animation_mood_embrace'] = 'Abbraccio', - ['animation_mood_fuckyou'] = 'Dito medio', - ['animation_mood_wanker'] = 'Fai una se*a', - ['animation_mood_suicide'] = 'sparati in testa', - ['animation_sports_title'] = 'Animazioni Sport', - ['animation_sports_muscle'] = 'Mostra i muscoli', - ['animation_sports_weightbar'] = 'Alza barra bilancere', - ['animation_sports_pushup'] = 'Fai flessioni', - ['animation_sports_abs'] = 'Fai addominali', - ['animation_sports_yoga'] = 'Fai Yoga', - ['animation_other_title'] = 'Animazioni Varie', - ['animation_other_sit'] = 'Siediti ', - ['animation_other_waitwall'] = 'Aspetta al muro', - ['animation_other_ontheback'] = 'Sdraiati guardando il cielo', - ['animation_other_stomach'] = 'Sdraiati sulla pancia', - ['animation_other_clean'] = 'Pulisci i vetri', - ['animation_other_cooking'] = 'Prepara da mangiare', - ['animation_other_search'] = 'Bussola umana', - ['animation_other_selfie'] = 'Fatti un selfie', - ['animation_other_door'] = 'Ascolta alla porta', - ['animation_pegi_title'] = 'PEGI 21', - ['animation_pegi_hsuck'] = 'Fatti fare un bo***ino in macchina', - ['animation_pegi_fsuck'] = 'Donna lecca la macchina', - ['animation_pegi_hfuck'] = 'Uomo lucca la macchina', - ['animation_pegi_ffuck'] = 'Donna s***a in macchina', - ['animation_pegi_scratch'] = 'Grattati le balle', - ['animation_pegi_charm'] = 'Donna: saluto provocante', - ['animation_pegi_golddigger'] = 'Donna: posa provocante', - ['animation_pegi_breast'] = 'Doona: Mostra le t***e', - ['animation_pegi_strip1'] = 'Esibizione Donna stript club 1', - ['animation_pegi_strip2'] = 'Esibizione Donna stript club 2', - ['animation_pegi_stripfloor'] = 'Danza Donna stript club per terra', - ['animation_attitudes_title'] = 'Approccio', - - -- Vehicle Menu - ['vehicle_title'] = 'Gestione veicolo', - ['vehicle_engine_button'] = 'Accendi/spegni il motore', - ['vehicle_door_button'] = 'Apri/Chiudi la porta', - ['vehicle_hood_button'] = 'Apri/Chiudi Cofano', - ['vehicle_trunk_button'] = 'Apri/Chiudi bagagliaio', - ['vehicle_door_frontleft'] = 'Anteriore sinistro', - ['vehicle_door_frontright'] = 'Anteriore destro', - ['vehicle_door_backleft'] = 'Posteriore sinistro', - ['vehicle_door_backright'] = 'Posteriore destro', - - -- Boss Management Menu - ['bossmanagement_title'] = 'Gestione aziendale', - ['bossmanagement_chest_button'] = 'Conto Aziendale:', - ['bossmanagement_hire_button'] = 'Recluta', - ['bossmanagement_fire_button'] = 'Licenzia', - ['bossmanagement_promote_button'] = 'Promuovi', - ['bossmanagement_demote_button'] = 'Degrada', - - -- Boss Management 2 Menu - ['bossmanagement2_title'] = 'Gestione azienda', - ['bossmanagement2_chest_button'] = 'Gestione conto aziendale:', - ['bossmanagement2_hire_button'] = 'Reclutamento aziendale', - ['bossmanagement2_fire_button'] = 'Licenzia dipendente', - ['bossmanagement2_promote_button'] = 'Promuovi dipendente', - ['bossmanagement2_demote_button'] = 'Degrada dipendente', - - -- Main Menu - ['mainmenu_gps_button'] = 'GPS', - ['mainmenu_voice_button'] = 'Voce', - ['gps'] = 'GPS: ~b~%s', - - -- Admin Menu - ['admin_title'] = 'Amministrazione', - ['admin_goto_button'] = 'TP su Player', - ['admin_bring_button'] = 'TP Player su di me', - ['admin_tpxyz_button'] = 'TP su Coordinate', - ['admin_noclip_button'] = 'NoClip', - ['admin_givemoney_button'] = 'Dai denaro ', - ['admin_godmode_button'] = 'Modalità invincibile', - ['admin_ghostmode_button'] = 'Modalità fantasma', - ['admin_spawnveh_button'] = 'Spawna un veicolo', - ['admin_repairveh_button'] = 'Ripara il veicolo', - ['admin_flipveh_button'] = 'Rimetti il veicolo in posizione', - ['admin_givebank_button'] = 'Dai del denaro in banca', - ['admin_givedirtymoney_button'] = 'Dai del denaro sporco', - ['admin_showxyz_button'] = 'Mostra / Nascondi coordinate', - ['admin_showname_button'] = 'Mostra/Nascondi i nomi dei giocatori', - ['admin_tpmarker_button'] = 'TP sul Marker', - ['admin_revive_button'] = 'Rianima Player', - ['admin_changeskin_button'] = 'Cambia aspetto', - ['admin_saveskin_button'] = 'Salva aspetto', - - -- GPS - ['none'] = 'Nessuna Posizione', - ['police_station'] = 'Stazione di polizia', - ['central_garage'] = 'Garage Centrale', - ['hospital'] = 'Ospedale', - ['dealer'] = 'Concessionario', - ['bennys_custom'] = 'Bennys Custom', - ['job_center'] = 'Centro per l\'Impiego', - ['driving_school'] = 'Scuola Guida', - ['tequila-la'] = 'tequila-la', - ['bahama_mamas'] = 'bahama_mamas' + -- DialogBox Name + ['dialogbox_playerid'] = 'ID giocatore (8 caratteri massimo):', + ['dialogbox_amount'] = 'Importo (8 caratteri massimo):', + ['dialogbox_amount_ammo'] = 'Importo (8 caratteri massimo):', + ['dialogbox_vehiclespawner'] = 'Nome del veicolo (massimo 50 caratteri):', + ['dialogbox_xyz'] = 'Posizione XYZ (massimo 50 caratteri):', + + -- Menu Default Vars + ['default_attitude'] = 'Normale', + ['default_voice'] = 'Normale', + + -- Menu Notification + ['missing_rights'] = 'Non hai il ~r~diritto~w~', + ['no_vehicle'] = 'Non sei in un veicolo', + ['players_nearby'] = 'Nessun giocatore nelle vicinanze', + ['amount_invalid'] = 'Importo non valido', + ['in_vehicle_give'] = 'Non puoi dare %s da dentro il veicolo', + ['in_vehicle_drop'] = 'Non puoi gettare %s dal veicolo', + ['not_usable'] = '%s Non è utilizzabile', + ['not_droppable'] = '%s Non è usa e getta', + ['gave_ammo'] = 'Hai dato x %s munizioni per %s', + ['no_ammo'] = 'Non hai munizioni', + ['not_enough_ammo'] = 'Non hai tante munizioni', + ['accessories_no_ears'] = 'Non hai un accessorio per l\'orecchio', + ['accessories_no_glasses'] = 'Non hai gli occhiali', + ['accessories_no_helmet'] = 'Non hai un casco/cappello', + ['accessories_no_mask'] = 'Non hai una maschera', + ['admin_noclipon'] = 'NoClip attivato', + ['admin_noclipoff'] = 'NoClip disattivato', + ['admin_godmodeon'] = 'Modalità invincibile attivata', + ['admin_godmodeoff'] = 'Modalità invincibile disattivata', + ['admin_ghoston'] = 'Modalità fantasma attivata', + ['admin_ghostoff'] = 'Modalita fantasma disattivata', + ['admin_vehicleflip'] = 'Auto restituita', + ['admin_tpmarker'] = 'Teletrasportato sul segnalino!', + ['admin_nomarker'] = 'Nessun indicatore sulla mappa!', + + -- Main Menu + ['mainmenu_subtitle'] = 'MENU INTERAZIONE', + ['approach'] = 'Approccio: ~b~%s', + ['voice'] = 'Voce: ~b~%s', + + -- Menu Voice Level + ['voice_whisper'] = 'Sussurro', + ['voice_normal'] = 'Normale', + ['voice_cry'] = 'Urlo', + + -- Inventory Menu + ['inventory_title'] = 'Inventario', + ['inventory_actions_title'] = 'Inventario: Azioni', + ['inventory_use_button'] = 'Usa', + ['inventory_give_button'] = 'Dai', + ['inventory_drop_button'] = 'Butta', + + -- Loadout Menu + ['loadout_title'] = 'Gestione armi', + ['loadout_actions_title'] = 'Armi: Azioni', + ['loadout_give_button'] = 'Dai', + ['loadout_givemun_button'] = 'Dai munizioni', + ['loadout_drop_button'] = 'Butta', + + -- Wallet Menu + ['wallet_title'] = 'Portafoglio', + ['wallet_option_give'] = 'Dai', + ['wallet_option_drop'] = 'Butta', + ['wallet_job_button'] = 'Attività commerciale: %s - %s', + ['wallet_job2_button'] = 'Organizzazione: %s - %s', + ['wallet_money_button'] = 'Denaro: $%s', + ['wallet_bankmoney_button'] = 'Banca: $%s', + ['wallet_blackmoney_button'] = 'Soldi sporchi: $%s', + ['wallet_show_idcard_button'] = 'Mostra carta d\'identità', + ['wallet_check_idcard_button'] = 'Guarda la carta d\'identità', + ['wallet_show_driver_button'] = 'Mostra patente di guida', + ['wallet_check_driver_button'] = 'Guarda patente di guida', + ['wallet_show_firearms_button'] = 'Mostra porto d\'armi', + ['wallet_check_firearms_button'] = 'Guarda porto d\'armi', + + -- Bills Menu + ['bills_title'] = 'Fatture', + + -- Clothes Menu + ['clothes_title'] = 'Capi di abbigliamento', + ['clothes_torso'] = 'Torso', + ['clothes_pants'] = 'Pants', + ['clothes_shoes'] = 'Scarpe', + ['clothes_bag'] = 'Borsa', + ['clothes_bproof'] = 'Giubbotto antiproiettile', + + -- Accessories Menu + ['accessories_title'] = 'Accessori', + ['accessories_ears'] = 'Accessorio per le orecchie', + ['accessories_glasses'] = 'Occhiali', + ['accessories_helmet'] = 'Cappello / Casco', + ['accessories_mask'] = 'Maschera', + + -- Animation Menu + ['animation_title'] = 'Animazioni', + ['animation_party_title'] = 'Animazioni Festive', + ['animation_party_smoke'] = 'Fuma una sigaretta', + ['animation_party_playsong'] = 'Ascolta una canzone', + ['animation_party_dj'] = 'Animazione DJ', + ['animation_party_beer'] = 'Ubriaco beve birra', + ['animation_party_dancing'] = 'Festeggia', + ['animation_party_airguitar'] = 'Suona finta chitarra', + ['animation_party_shagging'] = 'sc*pata finta', + ['animation_party_rock'] = 'Rock n roll con le mani', + ['animation_party_drunk'] = 'Ubriaco sul posto', + ['animation_party_vomit'] = 'Vomita dalla macchina', + ['animation_salute_title'] = 'Saluti Vari', + ['animation_salute_saluate'] = 'Saluto veloce', + ['animation_salute_serrer'] = 'Stringi la mano', + ['animation_salute_tchek'] = 'Saluto da duro', + ['animation_salute_bandit'] = 'Saluto tra fratelli', + ['animation_salute_military'] = 'Saluto Militare', + ['animation_work_title'] = 'Lavori', + ['animation_work_suspect'] = 'Arrenditi', + ['animation_work_fisherman'] = 'Pesca', + ['animation_work_inspect'] = 'Detective: investigatore', + ['animation_work_radio'] = 'Agente: Parla nella radio', + ['animation_work_circulation'] = 'Assistenza Stradale: circolazione', + ['animation_work_binoculars'] = 'Font: osserva con il binocolo', + ['animation_work_harvest'] = 'Giardiniere: coltiva piante', + ['animation_work_repair'] = 'Meccanico: ripara il motore', + ['animation_work_observe'] = 'Dottore: osserva il ferito', + ['animation_work_talk'] = 'Taxi: parla con il cliente', + ['animation_work_bill'] = 'Taxi: dai la mancia', + ['animation_work_buy'] = 'Droghiere: Servi cassa di alcolici', + ['animation_work_shot'] = 'Barman: servi un drink', + ['animation_work_picture'] = 'Reporter: Paparazzo', + ['animation_work_notes'] = 'Tutti: Prendi Appunti', + ['animation_work_hammer'] = 'Muratore: Martella il muro', + ['animation_work_beg'] = 'Senzatetto: chiedi soldi', + ['animation_work_statue'] = 'mimo: Fai la statua', + ['animation_mood_title'] = 'Gesti', + ['animation_mood_felicitate'] = 'Congratulati', + ['animation_mood_nice'] = 'Sei stato super', + ['animation_mood_you'] = 'tu (indica qualcuno)', + ['animation_mood_come'] = 'Vieni con me', + ['animation_mood_what'] = 'Keskya?', + ['animation_mood_me'] = 'Indica te stesso', + ['animation_mood_seriously'] = 'Lo so, ca**o', + ['animation_mood_tired'] = 'sii esaustivo', + ['animation_mood_shit'] = 'Sono nella mer*a', + ['animation_mood_facepalm'] = 'Mano sulla faccia', + ['animation_mood_calm'] = 'Calmati', + ['animation_mood_why'] = 'Cosa posso fare?', + ['animation_mood_fear'] = 'Rimani intimorito', + ['animation_mood_fight'] = 'Vuoi combattere? ', + ['animation_mood_notpossible'] = 'Non è possibile!', + ['animation_mood_embrace'] = 'Abbraccio', + ['animation_mood_fuckyou'] = 'Dito medio', + ['animation_mood_wanker'] = 'Fai una se*a', + ['animation_mood_suicide'] = 'sparati in testa', + ['animation_sports_title'] = 'Animazioni Sport', + ['animation_sports_muscle'] = 'Mostra i muscoli', + ['animation_sports_weightbar'] = 'Alza barra bilancere', + ['animation_sports_pushup'] = 'Fai flessioni', + ['animation_sports_abs'] = 'Fai addominali', + ['animation_sports_yoga'] = 'Fai Yoga', + ['animation_other_title'] = 'Animazioni Varie', + ['animation_other_sit'] = 'Siediti ', + ['animation_other_waitwall'] = 'Aspetta al muro', + ['animation_other_ontheback'] = 'Sdraiati guardando il cielo', + ['animation_other_stomach'] = 'Sdraiati sulla pancia', + ['animation_other_clean'] = 'Pulisci i vetri', + ['animation_other_cooking'] = 'Prepara da mangiare', + ['animation_other_search'] = 'Bussola umana', + ['animation_other_selfie'] = 'Fatti un selfie', + ['animation_other_door'] = 'Ascolta alla porta', + ['animation_pegi_title'] = 'PEGI 21', + ['animation_pegi_hsuck'] = 'Fatti fare un bo***ino in macchina', + ['animation_pegi_fsuck'] = 'Donna lecca la macchina', + ['animation_pegi_hfuck'] = 'Uomo lucca la macchina', + ['animation_pegi_ffuck'] = 'Donna s***a in macchina', + ['animation_pegi_scratch'] = 'Grattati le balle', + ['animation_pegi_charm'] = 'Donna: saluto provocante', + ['animation_pegi_golddigger'] = 'Donna: posa provocante', + ['animation_pegi_breast'] = 'Doona: Mostra le t***e', + ['animation_pegi_strip1'] = 'Esibizione Donna stript club 1', + ['animation_pegi_strip2'] = 'Esibizione Donna stript club 2', + ['animation_pegi_stripfloor'] = 'Danza Donna stript club per terra', + ['animation_attitudes_title'] = 'Approccio', + + -- Vehicle Menu + ['vehicle_title'] = 'Gestione veicolo', + ['vehicle_engine_button'] = 'Accendi/spegni il motore', + ['vehicle_door_button'] = 'Apri/Chiudi la porta', + ['vehicle_hood_button'] = 'Apri/Chiudi Cofano', + ['vehicle_trunk_button'] = 'Apri/Chiudi bagagliaio', + ['vehicle_door_frontleft'] = 'Anteriore sinistro', + ['vehicle_door_frontright'] = 'Anteriore destro', + ['vehicle_door_backleft'] = 'Posteriore sinistro', + ['vehicle_door_backright'] = 'Posteriore destro', + + -- Boss Management Menu + ['bossmanagement_title'] = 'Gestione aziendale', + ['bossmanagement_chest_button'] = 'Conto Aziendale:', + ['bossmanagement_hire_button'] = 'Recluta', + ['bossmanagement_fire_button'] = 'Licenzia', + ['bossmanagement_promote_button'] = 'Promuovi', + ['bossmanagement_demote_button'] = 'Degrada', + + -- Boss Management 2 Menu + ['bossmanagement2_title'] = 'Gestione azienda', + ['bossmanagement2_chest_button'] = 'Gestione conto aziendale:', + ['bossmanagement2_hire_button'] = 'Reclutamento aziendale', + ['bossmanagement2_fire_button'] = 'Licenzia dipendente', + ['bossmanagement2_promote_button'] = 'Promuovi dipendente', + ['bossmanagement2_demote_button'] = 'Degrada dipendente', + + -- Main Menu + ['mainmenu_gps_button'] = 'GPS', + ['mainmenu_voice_button'] = 'Voce', + ['gps'] = 'GPS: ~b~%s', + + -- Admin Menu + ['admin_title'] = 'Amministrazione', + ['admin_goto_button'] = 'TP su Player', + ['admin_bring_button'] = 'TP Player su di me', + ['admin_tpxyz_button'] = 'TP su Coordinate', + ['admin_noclip_button'] = 'NoClip', + ['admin_givemoney_button'] = 'Dai denaro ', + ['admin_godmode_button'] = 'Modalità invincibile', + ['admin_ghostmode_button'] = 'Modalità fantasma', + ['admin_spawnveh_button'] = 'Spawna un veicolo', + ['admin_repairveh_button'] = 'Ripara il veicolo', + ['admin_flipveh_button'] = 'Rimetti il veicolo in posizione', + ['admin_givebank_button'] = 'Dai del denaro in banca', + ['admin_givedirtymoney_button'] = 'Dai del denaro sporco', + ['admin_showxyz_button'] = 'Mostra / Nascondi coordinate', + ['admin_showname_button'] = 'Mostra/Nascondi i nomi dei giocatori', + ['admin_tpmarker_button'] = 'TP sul Marker', + ['admin_revive_button'] = 'Rianima Player', + ['admin_changeskin_button'] = 'Cambia aspetto', + ['admin_saveskin_button'] = 'Salva aspetto', + + -- GPS + ['none'] = 'Nessuna Posizione', + ['police_station'] = 'Stazione di polizia', + ['central_garage'] = 'Garage Centrale', + ['hospital'] = 'Ospedale', + ['dealer'] = 'Concessionario', + ['bennys_custom'] = 'Bennys Custom', + ['job_center'] = 'Centro per l\'Impiego', + ['driving_school'] = 'Scuola Guida', + ['tequila-la'] = 'tequila-la', + ['bahama_mamas'] = 'bahama_mamas' } \ No newline at end of file diff --git a/server/main.lua b/server/main.lua index de31c08..b0b9d88 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1,370 +1,370 @@ ESX = exports["es_extended"]:getSharedObject() do - local origRegisterServerEvent = RegisterServerEvent - local origEsxRegisterServerCallback = ESX.RegisterServerCallback - - --[[ - If you are a server developer and you have some players kicked seeing this message : - - Server detected a potentially abusive behaviour. - If you're not an abuser please contact the server owner so he can fix the underlying issue. - - - - DEBUG INFO - - Resource Name : ? - Event Name : ? - - This means you probably have resources which are using `krz_personalmenu` old network event names prefix. - Please update the event names prefix from `KorioZ-PersonalMenu` to `krz_personalmenu`. - ]] - - RegisterServerEvent = function(eventName, ...) - local endIdx = ('krz_personalmenu:'):len() - - if eventName:sub(1, endIdx) == 'krz_personalmenu' then - local oldEventName = ('KorioZ-PersonalMenu:%s'):format(eventName:sub(endIdx + 1)) - - origRegisterServerEvent(oldEventName) - AddEventHandler(oldEventName, function() - DropPlayer(source, - ( - "Server detected a potentially abusive behaviour.\n" - .. "If you're not an abuser please contact the server owner so he can fix the underlying issue.\n\n" - .. "- DEBUG INFO -\n" - .. "Resource Name : %s\n" - .. "Event Name : %s" - ):format( - GetCurrentResourceName(), - oldEventName - ) - ) - end) - end - - return origRegisterServerEvent(eventName, ...) - end - - ESX.RegisterServerCallback = function(eventName, ...) - local endIdx = ('krz_personalmenu:'):len() - - if eventName:sub(1, endIdx) == 'krz_personalmenu' then - local oldEventName = ('KorioZ-PersonalMenu:%s'):format(eventName:sub(endIdx + 1)) - - origEsxRegisterServerCallback(oldEventName, function(source) - DropPlayer(source, - ( - "Server detected a potentially abusive behaviour.\n" - .. "If you're not an abuser please contact the server owner so he can fix the underlying issue.\n\n" - .. "- DEBUG INFO -\n" - .. "Resource Name : %s\n" - .. "Event Name : %s" - ):format( - GetCurrentResourceName(), - oldEventName - ) - ) - end) - end - - return origEsxRegisterServerCallback(eventName, ...) - end + local origRegisterServerEvent = RegisterServerEvent + local origEsxRegisterServerCallback = ESX.RegisterServerCallback + + --[[ + If you are a server developer and you have some players kicked seeing this message : + + Server detected a potentially abusive behaviour. + If you're not an abuser please contact the server owner so he can fix the underlying issue. + + + - DEBUG INFO - + Resource Name : ? + Event Name : ? + + This means you probably have resources which are using `krz_personalmenu` old network event names prefix. + Please update the event names prefix from `KorioZ-PersonalMenu` to `krz_personalmenu`. + ]] + + RegisterServerEvent = function(eventName, ...) + local endIdx = ('krz_personalmenu:'):len() + + if eventName:sub(1, endIdx) == 'krz_personalmenu' then + local oldEventName = ('KorioZ-PersonalMenu:%s'):format(eventName:sub(endIdx + 1)) + + origRegisterServerEvent(oldEventName) + AddEventHandler(oldEventName, function() + DropPlayer(source, + ( + "Server detected a potentially abusive behaviour.\n" + .. "If you're not an abuser please contact the server owner so he can fix the underlying issue.\n\n" + .. "- DEBUG INFO -\n" + .. "Resource Name : %s\n" + .. "Event Name : %s" + ):format( + GetCurrentResourceName(), + oldEventName + ) + ) + end) + end + + return origRegisterServerEvent(eventName, ...) + end + + ESX.RegisterServerCallback = function(eventName, ...) + local endIdx = ('krz_personalmenu:'):len() + + if eventName:sub(1, endIdx) == 'krz_personalmenu' then + local oldEventName = ('KorioZ-PersonalMenu:%s'):format(eventName:sub(endIdx + 1)) + + origEsxRegisterServerCallback(oldEventName, function(source) + DropPlayer(source, + ( + "Server detected a potentially abusive behaviour.\n" + .. "If you're not an abuser please contact the server owner so he can fix the underlying issue.\n\n" + .. "- DEBUG INFO -\n" + .. "Resource Name : %s\n" + .. "Event Name : %s" + ):format( + GetCurrentResourceName(), + oldEventName + ) + ) + end) + end + + return origEsxRegisterServerCallback(eventName, ...) + end end function getMaximumGrade(jobName) - local p = promise.new() + local p = promise.new() - MySQL.Async.fetchScalar('SELECT grade FROM job_grades WHERE job_name = @job_name ORDER BY `grade` DESC', { ['@job_name'] = jobName }, function(result) - p:resolve(result) - end) + MySQL.Async.fetchScalar('SELECT grade FROM job_grades WHERE job_name = @job_name ORDER BY `grade` DESC', { ['@job_name'] = jobName }, function(result) + p:resolve(result) + end) - local queryResult = Citizen.Await(p) + local queryResult = Citizen.Await(p) - return tonumber(queryResult) + return tonumber(queryResult) end -function getAdminCommand(name) - for i = 1, #Config.Admin do - if Config.Admin[i].name == name then - return i - end - end +function isAuthorizedForAdminCommand(adminCommandId, group) + for i = 1, #Config.AdminCommands do + local adminCommandCfg = Config.AdminCommands[i] - return false -end + if adminCommandCfg.id == adminCommandId then + for j = 1, #adminCommandCfg.groups do + if adminCommandCfg.groups[j] == group then + return true + end + end -function isAuthorized(index, group) - for i = 1, #Config.Admin[index].groups do - if Config.Admin[index].groups[i] == group then - return true - end - end + break + end + end - return false + return false end ESX.RegisterServerCallback('krz_personalmenu:Bill_getBills', function(source, cb) - local xPlayer = ESX.GetPlayerFromId(source) - - MySQL.Async.fetchAll('SELECT * FROM billing WHERE identifier = @identifier', { - ['@identifier'] = xPlayer.identifier - }, function(result) - local bills = {} - - for i = 1, #result do - bills[#bills + 1] = { - id = result[i].id, - label = result[i].label, - amount = result[i].amount - } - end - - cb(bills) - end) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.Async.fetchAll('SELECT * FROM billing WHERE identifier = @identifier', { + ['@identifier'] = xPlayer.identifier + }, function(result) + local bills = {} + + for i = 1, #result do + bills[#bills + 1] = { + id = result[i].id, + label = result[i].label, + amount = result[i].amount + } + end + + cb(bills) + end) end) ESX.RegisterServerCallback('krz_personalmenu:Admin_getUsergroup', function(source, cb) - cb(ESX.GetPlayerFromId(source).getGroup() or 'user') + cb(ESX.GetPlayerFromId(source).getGroup() or 'user') end) local function makeTargetedEventFunction(fn) - return function(target, ...) - if tonumber(target) == -1 then return end - fn(target, ...) - end + return function(targetServerId, ...) + if tonumber(targetServerId) == -1 then return end + fn(targetServerId, ...) + end end -- Weapon Menu -- -RegisterServerEvent('krz_personalmenu:Weapon_addAmmoToPedS') -AddEventHandler('krz_personalmenu:Weapon_addAmmoToPedS', makeTargetedEventFunction(function(target, value, quantity) - if #(GetEntityCoords(source, false) - GetEntityCoords(target, false)) <= 3.0 then - TriggerClientEvent('krz_personalmenu:Weapon_addAmmoToPedC', target, value, quantity) - end +RegisterServerEvent('krz_personalmenu:Weapon_addAmmoToPedS', makeTargetedEventFunction(function(targetServerId, value, quantity) + if #(GetEntityCoords(GetPlayerPed(source), false) - GetEntityCoords(GetPlayerPed(targetServerId), false)) > 3.0 then return end + TriggerClientEvent('krz_personalmenu:Weapon_addAmmoToPedC', targetServerId, value, quantity) end)) -- Admin Menu -- -RegisterServerEvent('krz_personalmenu:Admin_BringS') -AddEventHandler('krz_personalmenu:Admin_BringS', makeTargetedEventFunction(function(playerId, target) - local xPlayer = ESX.GetPlayerFromId(source) - local plyGroup = xPlayer.getGroup() - - if isAuthorized(getAdminCommand('bring'), plyGroup) or isAuthorized(getAdminCommand('goto'), plyGroup) then - TriggerClientEvent('krz_personalmenu:Admin_BringC', playerId, GetEntityCoords(GetPlayerPed(target))) - end +RegisterServerEvent('krz_personalmenu:Admin_BringS', makeTargetedEventFunction(function(playerId, targetServerId) + local xPlayer = ESX.GetPlayerFromId(source) + local plyGroup = xPlayer.getGroup() + + if not isAuthorizedForAdminCommand('bring', plyGroup) and not isAuthorizedForAdminCommand('goto', plyGroup) then return end + + TriggerClientEvent('krz_personalmenu:Admin_BringC', playerId, GetEntityCoords(GetPlayerPed(targetServerId))) end)) -RegisterServerEvent('krz_personalmenu:Admin_giveCash') -AddEventHandler('krz_personalmenu:Admin_giveCash', function(amount) - local xPlayer = ESX.GetPlayerFromId(source) - local plyGroup = xPlayer.getGroup() +RegisterServerEvent('krz_personalmenu:Admin_giveCash', function(amount) + local xPlayer = ESX.GetPlayerFromId(source) + local plyGroup = xPlayer.getGroup() - if isAuthorized(getAdminCommand('givemoney'), plyGroup) then - xPlayer.addAccountMoney('cash', amount) - TriggerClientEvent('esx:showNotification', xPlayer.source, ('GIVE de %i$'):format(amount)) - end + if not isAuthorizedForAdminCommand('givemoney', plyGroup) then return end + + xPlayer.addAccountMoney('cash', amount) + TriggerClientEvent('esx:showNotification', xPlayer.source, ('GIVE de %i$'):format(amount)) end) -RegisterServerEvent('krz_personalmenu:Admin_giveBank') -AddEventHandler('krz_personalmenu:Admin_giveBank', function(amount) - local xPlayer = ESX.GetPlayerFromId(source) - local plyGroup = xPlayer.getGroup() +RegisterServerEvent('krz_personalmenu:Admin_giveBank', function(amount) + local xPlayer = ESX.GetPlayerFromId(source) + local plyGroup = xPlayer.getGroup() + + if not isAuthorizedForAdminCommand('givebank', plyGroup) then return end - if isAuthorized(getAdminCommand('givebank'), plyGroup) then - xPlayer.addAccountMoney('bank', amount) - TriggerClientEvent('esx:showNotification', xPlayer.source, ('GIVE de %i$ en banque'):format(amount)) - end + xPlayer.addAccountMoney('bank', amount) + TriggerClientEvent('esx:showNotification', xPlayer.source, ('GIVE de %i$ en banque'):format(amount)) end) -RegisterServerEvent('krz_personalmenu:Admin_giveDirtyMoney') -AddEventHandler('krz_personalmenu:Admin_giveDirtyMoney', function(amount) - local xPlayer = ESX.GetPlayerFromId(source) - local plyGroup = xPlayer.getGroup() +RegisterServerEvent('krz_personalmenu:Admin_giveDirtyMoney', function(amount) + local xPlayer = ESX.GetPlayerFromId(source) + local plyGroup = xPlayer.getGroup() + + if not isAuthorizedForAdminCommand('givedirtymoney', plyGroup) then return end - if isAuthorized(getAdminCommand('givedirtymoney'), plyGroup) then - xPlayer.addAccountMoney('black_money', amount) - TriggerClientEvent('esx:showNotification', xPlayer.source, ('GIVE de %i$ sale'):format(amount)) - end + xPlayer.addAccountMoney('black_money', amount) + TriggerClientEvent('esx:showNotification', xPlayer.source, ('GIVE de %i$ sale'):format(amount)) end) -- Grade Menu -- -RegisterServerEvent('krz_personalmenu:Boss_promouvoirplayer') -AddEventHandler('krz_personalmenu:Boss_promouvoirplayer', makeTargetedEventFunction(function(target) - local sourceXPlayer = ESX.GetPlayerFromId(source) - local sourceJob = sourceXPlayer.getJob() - - if sourceJob.grade_name == 'boss' then - local targetXPlayer = ESX.GetPlayerFromId(target) - local targetJob = targetXPlayer.getJob() - - if sourceJob.name == targetJob.name then - local newGrade = tonumber(targetJob.grade) + 1 - - if newGrade ~= getMaximumGrade(targetJob.name) then - targetXPlayer.setJob(targetJob.name, newGrade) - - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~g~promu %s~w~.'):format(targetXPlayer.name)) - TriggerClientEvent('esx:showNotification', target, ('Vous avez été ~g~promu par %s~w~.'):format(sourceXPlayer.name)) - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous devez demander une autorisation ~r~Gouvernementale~w~.') - end - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre entreprise.') - end - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') - end +RegisterServerEvent('krz_personalmenu:Boss_promouvoirplayer', makeTargetedEventFunction(function(targetServerId) + local sourceXPlayer = ESX.GetPlayerFromId(source) + local sourceJob = sourceXPlayer.getJob() + + if sourceJob.grade_name ~= 'boss' then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') + return + end + + local targetXPlayer = ESX.GetPlayerFromId(targetServerId) + local targetJob = targetXPlayer.getJob() + + if sourceJob.name ~= targetJob.name then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre entreprise.') + return + end + + local newGrade = tonumber(targetJob.grade) + 1 + + if newGrade == getMaximumGrade(targetJob.name) then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous devez demander une autorisation ~r~Gouvernementale~w~.') + return + end + + targetXPlayer.setJob(targetJob.name, newGrade) + + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~g~promu %s~w~.'):format(targetXPlayer.name)) + TriggerClientEvent('esx:showNotification', targetServerId, ('Vous avez été ~g~promu par %s~w~.'):format(sourceXPlayer.name)) end)) -RegisterServerEvent('krz_personalmenu:Boss_destituerplayer') -AddEventHandler('krz_personalmenu:Boss_destituerplayer', makeTargetedEventFunction(function(target) - local sourceXPlayer = ESX.GetPlayerFromId(source) - local sourceJob = sourceXPlayer.getJob() - - if sourceJob.grade_name == 'boss' then - local targetXPlayer = ESX.GetPlayerFromId(target) - local targetJob = targetXPlayer.getJob() - - if sourceJob.name == targetJob.name then - local newGrade = tonumber(targetJob.grade) - 1 - - if newGrade >= 0 then - targetXPlayer.setJob(targetJob.name, newGrade) - - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~r~rétrogradé %s~w~.'):format(targetXPlayer.name)) - TriggerClientEvent('esx:showNotification', target, ('Vous avez été ~r~rétrogradé par %s~w~.'):format(sourceXPlayer.name)) - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous ne pouvez pas ~r~rétrograder~w~ d\'avantage.') - end - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre organisation.') - end - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') - end +RegisterServerEvent('krz_personalmenu:Boss_destituerplayer', makeTargetedEventFunction(function(targetServerId) + local sourceXPlayer = ESX.GetPlayerFromId(source) + local sourceJob = sourceXPlayer.getJob() + + if sourceJob.grade_name ~= 'boss' then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') + return + end + + local targetXPlayer = ESX.GetPlayerFromId(targetServerId) + local targetJob = targetXPlayer.getJob() + + if sourceJob.name ~= targetJob.name then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre organisation.') + return + end + + local newGrade = tonumber(targetJob.grade) - 1 + + if newGrade < 0 then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous ne pouvez pas ~r~rétrograder~w~ d\'avantage.') + return + end + + targetXPlayer.setJob(targetJob.name, newGrade) + + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~r~rétrogradé %s~w~.'):format(targetXPlayer.name)) + TriggerClientEvent('esx:showNotification', targetServerId, ('Vous avez été ~r~rétrogradé par %s~w~.'):format(sourceXPlayer.name)) end)) -RegisterServerEvent('krz_personalmenu:Boss_recruterplayer') -AddEventHandler('krz_personalmenu:Boss_recruterplayer', makeTargetedEventFunction(function(target) - local sourceXPlayer = ESX.GetPlayerFromId(source) - local sourceJob = sourceXPlayer.getJob() +RegisterServerEvent('krz_personalmenu:Boss_recruterplayer', makeTargetedEventFunction(function(targetServerId) + local sourceXPlayer = ESX.GetPlayerFromId(source) + local sourceJob = sourceXPlayer.getJob() - if sourceJob.grade_name == 'boss' then - local targetXPlayer = ESX.GetPlayerFromId(target) + if sourceJob.grade_name ~= 'boss' then return end - targetXPlayer.setJob(sourceJob.name, 0) - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~g~recruté %s~w~.'):format(targetXPlayer.name)) - TriggerClientEvent('esx:showNotification', target, ('Vous avez été ~g~embauché par %s~w~.'):format(sourceXPlayer.name)) - end + local targetXPlayer = ESX.GetPlayerFromId(targetServerId) + + targetXPlayer.setJob(sourceJob.name, 0) + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~g~recruté %s~w~.'):format(targetXPlayer.name)) + TriggerClientEvent('esx:showNotification', targetServerId, ('Vous avez été ~g~embauché par %s~w~.'):format(sourceXPlayer.name)) end)) -RegisterServerEvent('krz_personalmenu:Boss_virerplayer') -AddEventHandler('krz_personalmenu:Boss_virerplayer', makeTargetedEventFunction(function(target) - local sourceXPlayer = ESX.GetPlayerFromId(source) - local sourceJob = sourceXPlayer.getJob() - - if sourceJob.grade_name == 'boss' then - local targetXPlayer = ESX.GetPlayerFromId(target) - local targetJob = targetXPlayer.getJob() - - if sourceJob.name == targetJob.name then - targetXPlayer.setJob('unemployed', 0) - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~r~viré %s~w~.'):format(targetXPlayer.name)) - TriggerClientEvent('esx:showNotification', target, ('Vous avez été ~g~viré par %s~w~.'):format(sourceXPlayer.name)) - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre entreprise.') - end - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') - end +RegisterServerEvent('krz_personalmenu:Boss_virerplayer', makeTargetedEventFunction(function(targetServerId) + local sourceXPlayer = ESX.GetPlayerFromId(source) + local sourceJob = sourceXPlayer.getJob() + + if sourceJob.grade_name ~= 'boss' then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') + return + end + + local targetXPlayer = ESX.GetPlayerFromId(targetServerId) + local targetJob = targetXPlayer.getJob() + + if sourceJob.name ~= targetJob.name then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre entreprise.') + return + end + + targetXPlayer.setJob('unemployed', 0) + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~r~viré %s~w~.'):format(targetXPlayer.name)) + TriggerClientEvent('esx:showNotification', targetServerId, ('Vous avez été ~g~viré par %s~w~.'):format(sourceXPlayer.name)) end)) -RegisterServerEvent('krz_personalmenu:Boss_promouvoirplayer2') -AddEventHandler('krz_personalmenu:Boss_promouvoirplayer2', makeTargetedEventFunction(function(target) - local sourceXPlayer = ESX.GetPlayerFromId(source) - local sourceJob2 = sourceXPlayer.getJob2() - - if sourceJob2.grade_name == 'boss' then - local targetXPlayer = ESX.GetPlayerFromId(target) - local targetJob2 = targetXPlayer.getJob2() - - if sourceJob2.name == targetJob2.name then - local newGrade = tonumber(targetJob2.grade) + 1 - - if newGrade ~= getMaximumGrade(targetJob2.name) then - targetXPlayer.setJob2(targetJob2.name, newGrade) - - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~g~promu %s~w~.'):format(targetXPlayer.name)) - TriggerClientEvent('esx:showNotification', target, ('Vous avez été ~g~promu par %s~w~.'):format(sourceXPlayer.name)) - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous devez demander une autorisation ~r~Gouvernementale~w~.') - end - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre organisation.') - end - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') - end +RegisterServerEvent('krz_personalmenu:Boss_promouvoirplayer2', makeTargetedEventFunction(function(targetServerId) + local sourceXPlayer = ESX.GetPlayerFromId(source) + local sourceJob = sourceXPlayer.getJob2() + + if sourceJob.grade_name ~= 'boss' then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') + return + end + + local targetXPlayer = ESX.GetPlayerFromId(targetServerId) + local targetJob = targetXPlayer.getJob2() + + if sourceJob.name ~= targetJob.name then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre organisation.') + return + end + + local newGrade = tonumber(targetJob.grade) + 1 + + if newGrade == getMaximumGrade(targetJob.name) then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous devez demander une autorisation ~r~Gouvernementale~w~.') + return + end + + targetXPlayer.setJob2(targetJob.name, newGrade) + + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~g~promu %s~w~.'):format(targetXPlayer.name)) + TriggerClientEvent('esx:showNotification', targetServerId, ('Vous avez été ~g~promu par %s~w~.'):format(sourceXPlayer.name)) end)) -RegisterServerEvent('krz_personalmenu:Boss_destituerplayer2') -AddEventHandler('krz_personalmenu:Boss_destituerplayer2', makeTargetedEventFunction(function(target) - local sourceXPlayer = ESX.GetPlayerFromId(source) - local sourceJob2 = sourceXPlayer.getJob2() - - if sourceJob2.grade_name == 'boss' then - local targetXPlayer = ESX.GetPlayerFromId(target) - local targetJob2 = targetXPlayer.getJob2() - - if sourceJob2.name == targetJob2.name then - local newGrade = tonumber(targetJob2.grade) - 1 - - if newGrade >= 0 then - targetXPlayer.setJob2(targetJob2.name, newGrade) - - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~r~rétrogradé %s~w~.'):format(targetXPlayer.name)) - TriggerClientEvent('esx:showNotification', target, ('Vous avez été ~r~rétrogradé par %s~w~.'):format(sourceXPlayer.name)) - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous ne pouvez pas ~r~rétrograder~w~ d\'avantage.') - end - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre organisation.') - end - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') - end +RegisterServerEvent('krz_personalmenu:Boss_destituerplayer2', makeTargetedEventFunction(function(targetServerId) + local sourceXPlayer = ESX.GetPlayerFromId(source) + local sourceJob = sourceXPlayer.getJob2() + + if sourceJob.grade_name ~= 'boss' then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') + return + end + + local targetXPlayer = ESX.GetPlayerFromId(targetServerId) + local targetJob = targetXPlayer.getJob2() + + if sourceJob.name ~= targetJob.name then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre organisation.') + return + end + + local newGrade = tonumber(targetJob.grade) - 1 + + if newGrade < 0 then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous ne pouvez pas ~r~rétrograder~w~ d\'avantage.') + return + end + + targetXPlayer.setJob2(targetJob.name, newGrade) + + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~r~rétrogradé %s~w~.'):format(targetXPlayer.name)) + TriggerClientEvent('esx:showNotification', targetServerId, ('Vous avez été ~r~rétrogradé par %s~w~.'):format(sourceXPlayer.name)) end)) -RegisterServerEvent('krz_personalmenu:Boss_recruterplayer2') -AddEventHandler('krz_personalmenu:Boss_recruterplayer2', makeTargetedEventFunction(function(target, grade2) - local sourceXPlayer = ESX.GetPlayerFromId(source) - local sourceJob2 = sourceXPlayer.getJob2() +RegisterServerEvent('krz_personalmenu:Boss_recruterplayer2', makeTargetedEventFunction(function(targetServerId, grade2) + local sourceXPlayer = ESX.GetPlayerFromId(source) + local sourceJob = sourceXPlayer.getJob2() - if sourceJob2.grade_name == 'boss' then - local targetXPlayer = ESX.GetPlayerFromId(target) + if sourceJob.grade_name ~= 'boss' then return end - targetXPlayer.setJob2(sourceJob2.name, 0) - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~g~recruté %s~w~.'):format(targetXPlayer.name)) - TriggerClientEvent('esx:showNotification', target, ('Vous avez été ~g~embauché par %s~w~.'):format(sourceXPlayer.name)) - end + local targetXPlayer = ESX.GetPlayerFromId(targetServerId) + + targetXPlayer.setJob2(sourceJob.name, 0) + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~g~recruté %s~w~.'):format(targetXPlayer.name)) + TriggerClientEvent('esx:showNotification', targetServerId, ('Vous avez été ~g~embauché par %s~w~.'):format(sourceXPlayer.name)) end)) -RegisterServerEvent('krz_personalmenu:Boss_virerplayer2') -AddEventHandler('krz_personalmenu:Boss_virerplayer2', makeTargetedEventFunction(function(target) - local sourceXPlayer = ESX.GetPlayerFromId(source) - local sourceJob2 = sourceXPlayer.getJob2() - - if sourceJob2.grade_name == 'boss' then - local targetXPlayer = ESX.GetPlayerFromId(target) - local targetJob2 = targetXPlayer.getJob2() - - if sourceJob2.name == targetJob2.name then - targetXPlayer.setJob2('unemployed2', 0) - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~r~viré %s~w~.'):format(targetXPlayer.name)) - TriggerClientEvent('esx:showNotification', target, ('Vous avez été ~g~viré par %s~w~.'):format(sourceXPlayer.name)) - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre organisation.') - end - else - TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') - end +RegisterServerEvent('krz_personalmenu:Boss_virerplayer2', makeTargetedEventFunction(function(targetServerId) + local sourceXPlayer = ESX.GetPlayerFromId(source) + local sourceJob = sourceXPlayer.getJob2() + + if sourceJob.grade_name ~= 'boss' then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Vous n\'avez pas ~r~l\'autorisation~w~.') + return + end + + local targetXPlayer = ESX.GetPlayerFromId(targetServerId) + local targetJob = targetXPlayer.getJob2() + + if sourceJob.name ~= targetJob.name then + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, 'Le joueur n\'es pas dans votre organisation.') + return + end + + targetXPlayer.setJob2('unemployed2', 0) + TriggerClientEvent('esx:showNotification', sourceXPlayer.source, ('Vous avez ~r~viré %s~w~.'):format(targetXPlayer.name)) + TriggerClientEvent('esx:showNotification', targetServerId, ('Vous avez été ~g~viré par %s~w~.'):format(sourceXPlayer.name)) end)) \ No newline at end of file