diff --git a/server-data/resources/[bpt_addons]/bpt_streetfight/client/client.lua b/server-data/resources/[bpt_addons]/bpt_streetfight/client/client.lua index b297d61f9..8d8259a98 100644 --- a/server-data/resources/[bpt_addons]/bpt_streetfight/client/client.lua +++ b/server-data/resources/[bpt_addons]/bpt_streetfight/client/client.lua @@ -16,13 +16,12 @@ local winner = nil ESX = exports["es_extended"]:getSharedObject() CreateThread(function() - CreateBlip(Config.BLIP.coords, Config.BLIP.text, Config.BLIP.sprite, Config.BLIP.color, Config.BLIP.scale) - RunThread() + CreateBlip(Config.BLIP.coords, Config.BLIP.text, Config.BLIP.sprite, Config.BLIP.color, Config.BLIP.scale) + RunThread() end) -RegisterNetEvent('bpt_streetfight:playerJoined') -AddEventHandler('bpt_streetfight:playerJoined', function(side, id) - +RegisterNetEvent("bpt_streetfight:playerJoined") +AddEventHandler("bpt_streetfight:playerJoined", function(side, id) if side == 1 then blueJoined = true else @@ -35,14 +34,12 @@ AddEventHandler('bpt_streetfight:playerJoined', function(side, id) end players = players + 1 fightStatus = STATUS_JOINED - end) -RegisterNetEvent('bpt_streetfight:startFight') -AddEventHandler('bpt_streetfight:startFight', function(fightData) - - for _,value in ipairs(fightData) do - if(value.id ~= GetPlayerServerId(PlayerId())) then +RegisterNetEvent("bpt_streetfight:startFight") +AddEventHandler("bpt_streetfight:startFight", function(fightData) + for _, value in ipairs(fightData) do + if value.id ~= GetPlayerServerId(PlayerId()) then rival = value.id elseif value.id == GetPlayerServerId(PlayerId()) then participating = true @@ -52,49 +49,45 @@ AddEventHandler('bpt_streetfight:startFight', function(fightData) fightStatus = STATUS_STARTED showCountDown = true countdown() - end) -RegisterNetEvent('bpt_streetfight:playerLeaveFight') -AddEventHandler('bpt_streetfight:playerLeaveFight', function(id) - +RegisterNetEvent("bpt_streetfight:playerLeaveFight") +AddEventHandler("bpt_streetfight:playerLeaveFight", function(id) if id == GetPlayerServerId(PlayerId()) then - ESX.ShowNotification(_U('you_toofar')) + ESX.ShowNotification(_U("you_toofar")) SetPedMaxHealth(PlayerPedId(), 200) SetEntityHealth(PlayerPedId(), 200) removeGloves() elseif participating == true then - TriggerServerEvent('bpt_streetfight:pay', betAmount) - ESX.ShowNotification(_U('you_win') .. (betAmount * 2) .. '$') + TriggerServerEvent("bpt_streetfight:pay", betAmount) + ESX.ShowNotification(_U("you_win") .. (betAmount * 2) .. "$") SetPedMaxHealth(PlayerPedId(), 200) SetEntityHealth(PlayerPedId(), 200) removeGloves() end reset() - end) -RegisterNetEvent('bpt_streetfight:fightFinished') -AddEventHandler('bpt_streetfight:fightFinished', function(looser) - +RegisterNetEvent("bpt_streetfight:fightFinished") +AddEventHandler("bpt_streetfight:fightFinished", function(looser) if participating == true then - if(looser ~= GetPlayerServerId(PlayerId()) and looser ~= -2) then - TriggerServerEvent('bpt_streetfight:pay', betAmount) - ESX.ShowNotification(_U('you_win') .. (betAmount * 2) .. '$') + if looser ~= GetPlayerServerId(PlayerId()) and looser ~= -2 then + TriggerServerEvent("bpt_streetfight:pay", betAmount) + ESX.ShowNotification(_U("you_win") .. (betAmount * 2) .. "$") SetPedMaxHealth(PlayerPedId(), 200) SetEntityHealth(PlayerPedId(), 200) - TriggerServerEvent('bpt_streetfight:showWinner', GetPlayerServerId(PlayerId())) + TriggerServerEvent("bpt_streetfight:showWinner", GetPlayerServerId(PlayerId())) end - if(looser == GetPlayerServerId(PlayerId()) and looser ~= -2) then - ESX.ShowNotification(_U('you_lost') .. betAmount .. '$' ) + if looser == GetPlayerServerId(PlayerId()) and looser ~= -2 then + ESX.ShowNotification(_U("you_lost") .. betAmount .. "$") SetPedMaxHealth(PlayerPedId(), 200) SetEntityHealth(PlayerPedId(), 200) end if looser == -2 then - ESX.ShowNotification(_U('time_out')) + ESX.ShowNotification(_U("time_out")) SetPedMaxHealth(PlayerPedId(), 200) SetEntityHealth(PlayerPedId(), 200) end @@ -104,8 +97,8 @@ AddEventHandler('bpt_streetfight:fightFinished', function(looser) reset() end) -RegisterNetEvent('bpt_streetfight:raiseActualBet') -AddEventHandler('bpt_streetfight:raiseActualBet', function() +RegisterNetEvent("bpt_streetfight:raiseActualBet") +AddEventHandler("bpt_streetfight:raiseActualBet", function() betAmount = betAmount * 2 if betAmount == 0 then betAmount = 2000 @@ -114,8 +107,8 @@ AddEventHandler('bpt_streetfight:raiseActualBet', function() end end) -RegisterNetEvent('bpt_streetfight:winnerText') -AddEventHandler('bpt_streetfight:winnerText', function(id) +RegisterNetEvent("bpt_streetfight:winnerText") +AddEventHandler("bpt_streetfight:winnerText", function(id) showWinner = true winner = id Wait(5000) @@ -140,59 +133,61 @@ end function putGloves() local ped = GetPlayerPed(-1) - local hash = GetHashKey('prop_boxing_glove_01') - while not HasModelLoaded(hash) do RequestModel(hash); - Wait(0); + local hash = GetHashKey("prop_boxing_glove_01") + while not HasModelLoaded(hash) do + RequestModel(hash) + Wait(0) end local pos = GetEntityCoords(ped) - local gloveA = CreateObject(hash, pos.x,pos.y,pos.z + 0.50, true,false,false) - local gloveB = CreateObject(hash, pos.x,pos.y,pos.z + 0.50, true,false,false) - table.insert(Gloves,gloveA) - table.insert(Gloves,gloveB) + local gloveA = CreateObject(hash, pos.x, pos.y, pos.z + 0.50, true, false, false) + local gloveB = CreateObject(hash, pos.x, pos.y, pos.z + 0.50, true, false, false) + table.insert(Gloves, gloveA) + table.insert(Gloves, gloveB) SetModelAsNoLongerNeeded(hash) - FreezeEntityPosition(gloveA,false) - SetEntityCollision(gloveA,false,true) + FreezeEntityPosition(gloveA, false) + SetEntityCollision(gloveA, false, true) ActivatePhysics(gloveA) - FreezeEntityPosition(gloveB,false) - SetEntityCollision(gloveB,false,true) + FreezeEntityPosition(gloveB, false) + SetEntityCollision(gloveB, false, true) ActivatePhysics(gloveB) - if not ped then ped = GetPlayerPed(-1); end -- gloveA = L, gloveB = R - AttachEntityToEntity(gloveA, ped, GetPedBoneIndex(ped, 0xEE4F), 0.05, 0.00, 0.04, 00.0, 90.0, -90.0, true, true, false, true, 1, true) -- object is attached to right hand - AttachEntityToEntity(gloveB, ped, GetPedBoneIndex(ped, 0xAB22), 0.05, 0.00, -0.04, 00.0, 90.0, 90.0, true, true, false, true, 1, true) -- object is attached to right hand + if not ped then + ped = GetPlayerPed(-1) + end -- gloveA = L, gloveB = R + AttachEntityToEntity(gloveA, ped, GetPedBoneIndex(ped, 0xEE4F), 0.05, 0.00, 0.04, 00.0, 90.0, -90.0, true, true, false, true, 1, true) -- object is attached to right hand + AttachEntityToEntity(gloveB, ped, GetPedBoneIndex(ped, 0xAB22), 0.05, 0.00, -0.04, 00.0, 90.0, 90.0, true, true, false, true, 1, true) -- object is attached to right hand end function removeGloves() - for _, v in pairs(Gloves) - do DeleteObject(v); + for _, v in pairs(Gloves) do + DeleteObject(v) end end function spawnMarker(coords) - local centerRing = GetDistanceBetweenCoords(coords, vector3(-517.61,-1712.04,20.46), true) + local centerRing = GetDistanceBetweenCoords(coords, vector3(-517.61, -1712.04, 20.46), true) if centerRing < Config.DISTANCE and fightStatus ~= STATUS_STARTED then - - DrawMarker(1, Config.BETZONE.x, Config.BETZONE.y, Config.BETZONE.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 1.5, 1.5, 1.0, 204,204, 0, 100, false, true, 2, false, false, false, false) - DrawText3D(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z +1.5, 'Giocatori: ~r~' .. players .. '/2 \n ~w~Scommessa: ~r~'.. betAmount ..'$ ', 0.8) + DrawMarker(1, Config.BETZONE.x, Config.BETZONE.y, Config.BETZONE.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 1.5, 1.5, 1.0, 204, 204, 0, 100, false, true, 2, false, false, false, false) + DrawText3D(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z + 1.5, "Giocatori: ~r~" .. players .. "/2 \n ~w~Scommessa: ~r~" .. betAmount .. "$ ", 0.8) local blueZone = GetDistanceBetweenCoords(coords, vector3(Config.BLUEZONE.x, Config.BLUEZONE.y, Config.BLUEZONE.z), true) local redZone = GetDistanceBetweenCoords(coords, vector3(Config.REDZONE.x, Config.REDZONE.y, Config.REDZONE.z), true) local betZone = GetDistanceBetweenCoords(coords, vector3(Config.BETZONE.x, Config.BETZONE.y, Config.BETZONE.z), true) if blueJoined == false then - DrawText3D(Config.BLUEZONE.x, Config.BLUEZONE.y, Config.BLUEZONE.z +1.5, 'unisciti alla lotta [~b~E~w~]', 0.4) + DrawText3D(Config.BLUEZONE.x, Config.BLUEZONE.y, Config.BLUEZONE.z + 1.5, "unisciti alla lotta [~b~E~w~]", 0.4) if blueZone < Config.DISTANCE_INTERACTION then - ESX.ShowHelpNotification(_U('press_to_join_blue')) + ESX.ShowHelpNotification(_U("press_to_join_blue")) if IsControlJustReleased(0, Config.E_KEY) and participating == false then - TriggerServerEvent('bpt_streetfight:join', betAmount, 0 ) + TriggerServerEvent("bpt_streetfight:join", betAmount, 0) end end end if redJoined == false then - DrawText3D(Config.REDZONE.x, Config.REDZONE.y, Config.REDZONE.z +1.5, 'unisciti alla lotta [~r~E~w~]', 0.4) + DrawText3D(Config.REDZONE.x, Config.REDZONE.y, Config.REDZONE.z + 1.5, "unisciti alla lotta [~r~E~w~]", 0.4) if redZone < Config.DISTANCE_INTERACTION then - ESX.ShowHelpNotification(_U('press_to_join_red')) + ESX.ShowHelpNotification(_U("press_to_join_red")) if IsControlJustReleased(0, Config.E_KEY) and participating == false then - TriggerServerEvent('bpt_streetfight:join', betAmount, 1) + TriggerServerEvent("bpt_streetfight:join", betAmount, 1) end end end @@ -200,10 +195,9 @@ function spawnMarker(coords) if betZone < Config.DISTANCE_INTERACTION and fightStatus ~= STATUS_JOINED and fightStatus ~= STATUS_STARTED then ESX.ShowHelpNotification("premi ~INPUT_CONTEXT~ per cambiare la scommessa.") if IsControlJustReleased(0, Config.E_KEY) then - TriggerServerEvent('bpt_streetfight:raiseBet', betAmount) + TriggerServerEvent("bpt_streetfight:raiseBet", betAmount) end end - end end @@ -228,14 +222,14 @@ function DrawText3D(x, y, z, text, scale) end function CreateBlip(coords, text, sprite, color, scale) - local blip = AddBlipForCoord(coords.x, coords.y) - SetBlipSprite(blip, sprite) - SetBlipScale(blip, scale) - SetBlipColour(blip, color) - SetBlipAsShortRange(blip, true) - BeginTextCommandSetBlipName('STRING') - AddTextComponentSubstringPlayerName(text) - EndTextCommandSetBlipName(blip) + local blip = AddBlipForCoord(coords.x, coords.y) + SetBlipSprite(blip, sprite) + SetBlipScale(blip, scale) + SetBlipColour(blip, color) + SetBlipAsShortRange(blip, true) + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(text) + EndTextCommandSetBlipName(blip) end function reset() @@ -261,8 +255,8 @@ CreateThread(function() while true do if fightStatus == STATUS_STARTED and participating == false and GetEntityCoords(PlayerPedId()) ~= rival then local coords = GetEntityCoords(GetPlayerPed(-1)) - if get3DDistance(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z,coords.x,coords.y,coords.z) < Config.TP_DISTANCE then - ESX.ShowNotification(_U('step_away')) + if get3DDistance(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z, coords.x, coords.y, coords.z) < Config.TP_DISTANCE then + ESX.ShowNotification(_U("step_away")) for _ = 1, 1000 do SetPedCoordsKeepVehicle(GetPlayerPed(-1), -521.58, -1723.58, 19.16) local foundGround = GetGroundZFor_3dCoord(-521.58, -1723.58, 19.16) @@ -275,7 +269,7 @@ CreateThread(function() end end Wait(1000) - end + end end) -- Main 0 loop @@ -283,26 +277,26 @@ CreateThread(function() while true do Wait(0) if showCountDown == true then - DrawText3D(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z + 1.5, 'La lotta inizia in: ' .. actualCount, 2.0) + DrawText3D(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z + 1.5, "La lotta inizia in: " .. actualCount, 2.0) elseif showCountDown == false and fightStatus == STATUS_STARTED then if GetEntityHealth(PlayerPedId()) < 150 then - TriggerServerEvent('bpt_streetfight:finishFight', GetPlayerServerId(PlayerId())) + TriggerServerEvent("bpt_streetfight:finishFight", GetPlayerServerId(PlayerId())) fightStatus = STATUS_INITIAL end end if participating == true then local coords = GetEntityCoords(GetPlayerPed(-1)) - if get3DDistance(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z,coords.x,coords.y,coords.z) > Config.LEAVE_FIGHT_DISTANCE then - TriggerServerEvent('bpt_streetfight:leaveFight', GetPlayerServerId(PlayerId())) + if get3DDistance(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z, coords.x, coords.y, coords.z) > Config.LEAVE_FIGHT_DISTANCE then + TriggerServerEvent("bpt_streetfight:leaveFight", GetPlayerServerId(PlayerId())) end end if showWinner == true and winner ~= nil then local coords = GetEntityCoords(GetPlayerPed(-1)) - if get3DDistance(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z,coords.x,coords.y,coords.z) < 15 then - DrawText3D(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z + 2.5, '~r~ID: ' .. winner .. ' gana!', 2.0) + if get3DDistance(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z, coords.x, coords.y, coords.z) < 15 then + DrawText3D(Config.CENTER.x, Config.CENTER.y, Config.CENTER.z + 2.5, "~r~ID: " .. winner .. " gana!", 2.0) end end end -end) \ No newline at end of file +end) diff --git a/server-data/resources/[bpt_addons]/bpt_streetfight/config.lua b/server-data/resources/[bpt_addons]/bpt_streetfight/config.lua index 0272663ef..1f69848d3 100644 --- a/server-data/resources/[bpt_addons]/bpt_streetfight/config.lua +++ b/server-data/resources/[bpt_addons]/bpt_streetfight/config.lua @@ -1,20 +1,20 @@ Config = {} -Config.BLUEZONE = {x = -520.63, y = -1712.40, z = 19.45} -Config.REDZONE = {x = -514.79, y = -1711.49, z = 19.45} -Config.CENTER = {x = -517.61, y = -1712.04, z = 20.45} -Config.BETZONE = {x = -523.33, y = -1715.44, z = 18.32} +Config.BLUEZONE = { x = -520.63, y = -1712.40, z = 19.45 } +Config.REDZONE = { x = -514.79, y = -1711.49, z = 19.45 } +Config.CENTER = { x = -517.61, y = -1712.04, z = 20.45 } +Config.BETZONE = { x = -523.33, y = -1715.44, z = 18.32 } Config.DISTANCE = 10 -- Distance to see fight indicators Config.TP_DISTANCE = 6 -- Minimum distance between fight and spectators Config.LEAVE_FIGHT_DISTANCE = 15 -- Distance to quit fight Config.DISTANCE_INTERACTION = 2.0 -- Interaction for fighter events Config.E_KEY = 38 -- Action key 'E' default -Config.Locale = 'en' +Config.Locale = "en" Config.BLIP = { - coords = {x = -517.61, y = -1712.04, z = 20.45}, - text = _U('street_fighting'), + coords = { x = -517.61, y = -1712.04, z = 20.45 }, + text = _U("street_fighting"), sprite = 491, - color = 1, - scale = 1.0 -} \ No newline at end of file + color = 1, + scale = 1.0, +} diff --git a/server-data/resources/[bpt_addons]/bpt_streetfight/fxmanifest.lua b/server-data/resources/[bpt_addons]/bpt_streetfight/fxmanifest.lua index a4ce4935d..9b3dad7d3 100644 --- a/server-data/resources/[bpt_addons]/bpt_streetfight/fxmanifest.lua +++ b/server-data/resources/[bpt_addons]/bpt_streetfight/fxmanifest.lua @@ -1,25 +1,25 @@ -fx_version 'adamant' +fx_version("adamant") -game 'gta5' +game("gta5") -description 'bpt_streetfight' +description("bpt_streetfight") -version '1.0.0' +version("1.0.0") -server_script { - '@es_extended/locale.lua', - 'server/server.lua', - 'locales/*.lua', - 'config.lua' -} +server_script({ + "@es_extended/locale.lua", + "server/server.lua", + "locales/*.lua", + "config.lua", +}) -client_script { - '@es_extended/locale.lua', - 'client/client.lua', - 'locales/*.lua', - 'config.lua' -} +client_script({ + "@es_extended/locale.lua", + "client/client.lua", + "locales/*.lua", + "config.lua", +}) -dependencies { - 'es_extended' -} \ No newline at end of file +dependencies({ + "es_extended", +}) diff --git a/server-data/resources/[bpt_addons]/bpt_streetfight/locales/en.lua b/server-data/resources/[bpt_addons]/bpt_streetfight/locales/en.lua index 85f998c89..73d9126ce 100644 --- a/server-data/resources/[bpt_addons]/bpt_streetfight/locales/en.lua +++ b/server-data/resources/[bpt_addons]/bpt_streetfight/locales/en.lua @@ -1,12 +1,12 @@ -Locales['en'] = { - ['you_toofar'] = 'you\'ve gone too far', - ['you_win'] = 'You have won the fight', - ['you_lost'] = 'You have lost the fight', - ['time out'] = 'The fight is over due to time limit', - ['step_away'] = 'step away from the ring', - ['successfully_signed'] = 'you have successfully signed up', - ['not_money'] = 'not enough money', - ['press_to_join_blue'] = 'press ~INPUT_CONTEXT~ to join the blue side', - ['press_to_join_red'] = 'press ~INPUT_CONTEXT~ to join the red side.', - ['street_fighting'] = 'Street fighting' -} \ No newline at end of file +Locales["en"] = { + ["you_toofar"] = "you've gone too far", + ["you_win"] = "You have won the fight", + ["you_lost"] = "You have lost the fight", + ["time out"] = "The fight is over due to time limit", + ["step_away"] = "step away from the ring", + ["successfully_signed"] = "you have successfully signed up", + ["not_money"] = "not enough money", + ["press_to_join_blue"] = "press ~INPUT_CONTEXT~ to join the blue side", + ["press_to_join_red"] = "press ~INPUT_CONTEXT~ to join the red side.", + ["street_fighting"] = "Street fighting", +} diff --git a/server-data/resources/[bpt_addons]/bpt_streetfight/locales/it.lua b/server-data/resources/[bpt_addons]/bpt_streetfight/locales/it.lua index 1e3b695bd..21cf98c8b 100644 --- a/server-data/resources/[bpt_addons]/bpt_streetfight/locales/it.lua +++ b/server-data/resources/[bpt_addons]/bpt_streetfight/locales/it.lua @@ -1,12 +1,12 @@ -Locales['it'] = { - ['you_toofar'] = 'ti sei allontanato troppo', - ['you_win'] = 'Hai vinto il combattimento', - ['you_lost'] = 'Hai perso il combattimento', - ['time out'] = 'La lotta è finita per limite di tempo', - ['step_away'] = 'allontanati dal ring', - ['successfully_signed'] = 'Ti sei iscritto con successo', - ['not_money'] = 'denaro non sufficente', - ['press_to_join_blue'] = 'premi ~INPUT_CONTEXT~ per unirti al lato blu.', - ['press_to_join_red'] = 'premi ~INPUT_CONTEXT~ per unirti al lato rosso.', - ['street_fighting'] = 'Combattimenti di strada' -} \ No newline at end of file +Locales["it"] = { + ["you_toofar"] = "ti sei allontanato troppo", + ["you_win"] = "Hai vinto il combattimento", + ["you_lost"] = "Hai perso il combattimento", + ["time out"] = "La lotta è finita per limite di tempo", + ["step_away"] = "allontanati dal ring", + ["successfully_signed"] = "Ti sei iscritto con successo", + ["not_money"] = "denaro non sufficente", + ["press_to_join_blue"] = "premi ~INPUT_CONTEXT~ per unirti al lato blu.", + ["press_to_join_red"] = "premi ~INPUT_CONTEXT~ per unirti al lato rosso.", + ["street_fighting"] = "Combattimenti di strada", +} diff --git a/server-data/resources/[bpt_addons]/bpt_streetfight/server/server.lua b/server-data/resources/[bpt_addons]/bpt_streetfight/server/server.lua index 3709fbfae..1d8618765 100644 --- a/server-data/resources/[bpt_addons]/bpt_streetfight/server/server.lua +++ b/server-data/resources/[bpt_addons]/bpt_streetfight/server/server.lua @@ -4,9 +4,8 @@ local fight = {} ESX = exports["es_extended"]:getSharedObject() -RegisterServerEvent('bpt_streetfight:join') -AddEventHandler('bpt_streetfight:join', function(betAmount, side) - +RegisterServerEvent("bpt_streetfight:join") +AddEventHandler("bpt_streetfight:join", function(betAmount, side) local _source = source local xPlayer = ESX.GetPlayerFromId(_source) @@ -18,26 +17,25 @@ AddEventHandler('bpt_streetfight:join', function(betAmount, side) local fighter = { id = source, - amount = betAmount + amount = betAmount, } table.insert(fight, fighter) - local balance = xPlayer.getAccount('money').money + local balance = xPlayer.getAccount("money").money if (balance > betAmount) or betAmount == 0 then - xPlayer.removeAccountMoney('money', betAmount) - TriggerClientEvent('esx:showNotification', source, _U('successfully_signed')) + xPlayer.removeAccountMoney("money", betAmount) + TriggerClientEvent("esx:showNotification", source, _U("successfully_signed")) if side == 0 then - TriggerClientEvent('bpt_streetfight:playerJoined', -1, 1, source) + TriggerClientEvent("bpt_streetfight:playerJoined", -1, 1, source) else - TriggerClientEvent('bpt_streetfight:playerJoined', -1, 2, source) + TriggerClientEvent("bpt_streetfight:playerJoined", -1, 2, source) end if redPlayerReady and bluePlayerReady then - TriggerClientEvent('bpt_streetfight:startFight', -1, fight) + TriggerClientEvent("bpt_streetfight:startFight", -1, fight) end - else - TriggerClientEvent('esx:showNotification', source, _U('not_money')) + TriggerClientEvent("esx:showNotification", source, _U("not_money")) end end) @@ -50,45 +48,44 @@ function countdown(copyFight) end if copyFight == fight then - TriggerClientEvent('bpt_streetfight:fightFinished', -1, -2) + TriggerClientEvent("bpt_streetfight:fightFinished", -1, -2) fight = {} bluePlayerReady = false redPlayerReady = false end end -RegisterServerEvent('bpt_streetfight:finishFight') -AddEventHandler('bpt_streetfight:finishFight', function(looser) - TriggerClientEvent('bpt_streetfight:fightFinished', -1, looser) +RegisterServerEvent("bpt_streetfight:finishFight") +AddEventHandler("bpt_streetfight:finishFight", function(looser) + TriggerClientEvent("bpt_streetfight:fightFinished", -1, looser) fight = {} bluePlayerReady = false redPlayerReady = false end) -RegisterServerEvent('bpt_streetfight:leaveFight') -AddEventHandler('bpt_streetfight:leaveFight', function(id) - if - bluePlayerReady or redPlayerReady then +RegisterServerEvent("bpt_streetfight:leaveFight") +AddEventHandler("bpt_streetfight:leaveFight", function(id) + if bluePlayerReady or redPlayerReady then bluePlayerReady = false redPlayerReady = false fight = {} - TriggerClientEvent('bpt_streetfight:playerLeaveFight', -1, id) + TriggerClientEvent("bpt_streetfight:playerLeaveFight", -1, id) end end) -RegisterServerEvent('bpt_streetfight:pay') -AddEventHandler('bpt_streetfight:pay', function(amount) +RegisterServerEvent("bpt_streetfight:pay") +AddEventHandler("bpt_streetfight:pay", function(amount) local _source = source local xPlayer = ESX.GetPlayerFromId(_source) - xPlayer.addAccountMoney('money', amount * 2) + xPlayer.addAccountMoney("money", amount * 2) end) -RegisterServerEvent('bpt_streetfight:raiseBet') -AddEventHandler('bpt_streetfight:raiseBet', function() - TriggerClientEvent('bpt_streetfight:raiseActualBet', -1) +RegisterServerEvent("bpt_streetfight:raiseBet") +AddEventHandler("bpt_streetfight:raiseBet", function() + TriggerClientEvent("bpt_streetfight:raiseActualBet", -1) end) -RegisterServerEvent('bpt_streetfight:showWinner') -AddEventHandler('bpt_streetfight:showWinner', function(id) - TriggerClientEvent('bpt_streetfight:winnerText', -1, id) -end) \ No newline at end of file +RegisterServerEvent("bpt_streetfight:showWinner") +AddEventHandler("bpt_streetfight:showWinner", function(id) + TriggerClientEvent("bpt_streetfight:winnerText", -1, id) +end) diff --git a/server-data/resources/[bpt_addons]/bpt_teleport/config.lua b/server-data/resources/[bpt_addons]/bpt_teleport/config.lua index 78ca21f1d..adb7fc406 100644 --- a/server-data/resources/[bpt_addons]/bpt_teleport/config.lua +++ b/server-data/resources/[bpt_addons]/bpt_teleport/config.lua @@ -1,2 +1,2 @@ Config = {} -Config.Locale = 'en' \ No newline at end of file +Config.Locale = "en" diff --git a/server-data/resources/[bpt_addons]/bpt_teleport/fxmanifest.lua b/server-data/resources/[bpt_addons]/bpt_teleport/fxmanifest.lua index fd75e0fe8..81751c032 100644 --- a/server-data/resources/[bpt_addons]/bpt_teleport/fxmanifest.lua +++ b/server-data/resources/[bpt_addons]/bpt_teleport/fxmanifest.lua @@ -1,20 +1,20 @@ -fx_version 'cerulean' -game 'gta5' -author 'bitpredator' -description 'bpt_teleport' -version '1.0.0' +fx_version("cerulean") +game("gta5") +author("bitpredator") +description("bpt_teleport") +version("1.0.0") -shared_script '@es_extended/imports.lua' +shared_script("@es_extended/imports.lua") -client_scripts { - '@es_extended/locale.lua', - 'locales/*.lua', - 'config.lua', - 'warehouses.lua' -} +client_scripts({ + "@es_extended/locale.lua", + "locales/*.lua", + "config.lua", + "warehouses.lua", +}) -server_scripts { - '@es_extended/locale.lua', - 'locales/*.lua', - 'config.lua' -} \ No newline at end of file +server_scripts({ + "@es_extended/locale.lua", + "locales/*.lua", + "config.lua", +}) diff --git a/server-data/resources/[bpt_addons]/bpt_teleport/locales/en.lua b/server-data/resources/[bpt_addons]/bpt_teleport/locales/en.lua index f4858a1d7..f1f8e663d 100644 --- a/server-data/resources/[bpt_addons]/bpt_teleport/locales/en.lua +++ b/server-data/resources/[bpt_addons]/bpt_teleport/locales/en.lua @@ -1,4 +1,4 @@ -Locales['en'] = { - ['press_to_enter'] = 'press ~INPUT_CONTEXT~ to enter the building.', - ['press_to_exit'] = 'press ~INPUT_CONTEXT~ to exit the building.', -} \ No newline at end of file +Locales["en"] = { + ["press_to_enter"] = "press ~INPUT_CONTEXT~ to enter the building.", + ["press_to_exit"] = "press ~INPUT_CONTEXT~ to exit the building.", +} diff --git a/server-data/resources/[bpt_addons]/bpt_teleport/locales/it.lua b/server-data/resources/[bpt_addons]/bpt_teleport/locales/it.lua index d3d381a92..a90be62f8 100644 --- a/server-data/resources/[bpt_addons]/bpt_teleport/locales/it.lua +++ b/server-data/resources/[bpt_addons]/bpt_teleport/locales/it.lua @@ -1,4 +1,4 @@ -Locales['it'] = { - ['press_to_enter'] = 'Premi ~INPUT_CONTEXT~ per entrare nell edificio.', - ['press_to_exit'] = 'Premi ~INPUT_CONTEXT~ per uscire dall edificio.', -} \ No newline at end of file +Locales["it"] = { + ["press_to_enter"] = "Premi ~INPUT_CONTEXT~ per entrare nell edificio.", + ["press_to_exit"] = "Premi ~INPUT_CONTEXT~ per uscire dall edificio.", +} diff --git a/server-data/resources/[esx]/esx_society/client/main.lua b/server-data/resources/[esx]/esx_society/client/main.lua index 1c495bd0c..976eb2815 100644 --- a/server-data/resources/[esx]/esx_society/client/main.lua +++ b/server-data/resources/[esx]/esx_society/client/main.lua @@ -1,382 +1,381 @@ -RegisterNetEvent('esx:setJob') -AddEventHandler('esx:setJob', function(job) - ESX.PlayerData.job = job - RefreshBussHUD() +RegisterNetEvent("esx:setJob") +AddEventHandler("esx:setJob", function(job) + ESX.PlayerData.job = job + RefreshBussHUD() end) -RegisterNetEvent('esx:playerLoaded') -AddEventHandler('esx:playerLoaded', function(xPlayer) - ESX.PlayerData = xPlayer - ESX.PlayerLoaded = true - RefreshBussHUD() +RegisterNetEvent("esx:playerLoaded") +AddEventHandler("esx:playerLoaded", function(xPlayer) + ESX.PlayerData = xPlayer + ESX.PlayerLoaded = true + RefreshBussHUD() end) function RefreshBussHUD() - DisableSocietyMoneyHUDElement() + DisableSocietyMoneyHUDElement() - if ESX.PlayerData.job.grade_name == 'boss' then - EnableSocietyMoneyHUDElement() + if ESX.PlayerData.job.grade_name == "boss" then + EnableSocietyMoneyHUDElement() - ESX.TriggerServerCallback('esx_society:getSocietyMoney', function(money) - UpdateSocietyMoneyHUDElement(money) - end, ESX.PlayerData.job.name) - end + ESX.TriggerServerCallback("esx_society:getSocietyMoney", function(money) + UpdateSocietyMoneyHUDElement(money) + end, ESX.PlayerData.job.name) + end end -RegisterNetEvent('esx_addonaccount:setMoney') -AddEventHandler('esx_addonaccount:setMoney', function(society, money) - if ESX.PlayerData.job and ESX.PlayerData.job.grade_name == 'boss' and 'society_' .. ESX.PlayerData.job.name == society then - UpdateSocietyMoneyHUDElement(money) - end +RegisterNetEvent("esx_addonaccount:setMoney") +AddEventHandler("esx_addonaccount:setMoney", function(society, money) + if ESX.PlayerData.job and ESX.PlayerData.job.grade_name == "boss" and "society_" .. ESX.PlayerData.job.name == society then + UpdateSocietyMoneyHUDElement(money) + end end) function EnableSocietyMoneyHUDElement() - - TriggerEvent('esx_society:toggleSocietyHud', true) + TriggerEvent("esx_society:toggleSocietyHud", true) end function DisableSocietyMoneyHUDElement() - - TriggerEvent('esx_society:toggleSocietyHud', false) + TriggerEvent("esx_society:toggleSocietyHud", false) end function UpdateSocietyMoneyHUDElement(money) - - TriggerEvent('esx_society:setSocietyMoney', money) + TriggerEvent("esx_society:setSocietyMoney", money) end function OpenBossMenu(society, _, options) - options = options or {} - local elements = { - {unselectable = true, icon = "fas fa-user", title = _U('boss_menu')} - } - - ESX.TriggerServerCallback('esx_society:isBoss', function(isBoss) - if isBoss then - local defaultOptions = { - checkBal = true, - withdraw = true, - deposit = true, - wash = true, - employees = true, - salary = true, - grades = true - } - - for k,v in pairs(defaultOptions) do - if options[k] == nil then - options[k] = v - end - end - - if options.checkBal then - elements[#elements+1] = {icon = "fas fa-wallet", title = _U('check_society_balance'), value = "check_society_balance"} - end - if options.withdraw then - elements[#elements+1] = {icon = "fas fa-wallet", title = _U('withdraw_society_money'), value = "withdraw_society_money"} - end - if options.deposit then - elements[#elements+1] = {icon = "fas fa-wallet", title = _U('deposit_society_money'), value = "deposit_money"} - end - if options.wash then - elements[#elements+1] = {icon = "fas fa-wallet", title = _U('wash_money'), value = "wash_money"} - end - if options.employees then - elements[#elements+1] = {icon = "fas fa-users", title = _U('employee_management'), value = "manage_employees"} - end - if options.salary then - elements[#elements+1] = {icon = "fas fa-wallet", title = _U('salary_management'), value = "manage_salary"} - end - if options.grades then - elements[#elements+1] = {icon = "fas fa-scroll", title = _U('grade_management'), value = "manage_grades"} - end - - ESX.OpenContext("right", elements, function(menu,element) - if element.value == "check_society_balance" then - TriggerServerEvent('esx_society:checkSocietyBalance', society) - elseif element.value == "withdraw_society_money" then - local elements = { - {unselectable = true, icon = "fas fa-wallet", title = _U('withdraw_amount'), description = "Withdraw money from the society account"}, - {icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to withdraw..", inputMin = 1, inputMax = 250000, name = "withdraw"}, - {icon = "fas fa-check", title = "Confirm", value = "confirm"}, - {icon = "fas fa-arrow-left", title = "Return", value = "return"} - } - ESX.RefreshContext(elements) - elseif element.value == "confirm" then - local amount = tonumber(menu.eles[2].inputValue) - if amount == nil then - ESX.ShowNotification(_U('invalid_amount')) - else - TriggerServerEvent('esx_society:withdrawMoney', society, amount) - ESX.CloseContext() - end - elseif element.value == "deposit_money" then - local elements = { - {unselectable = true, icon = "fas fa-wallet", title = _U('deposit_amount'), description = "Deposit some money into the society account"}, - {icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to deposit..", inputMin = 1, inputMax = 250000, name = "deposit"}, - {icon = "fas fa-check", title = "Confirm", value = "confirm2"}, - {icon = "fas fa-arrow-left", title = "Return", value = "return"} - } - ESX.RefreshContext(elements) - elseif element.value == "confirm2" then - local amount = tonumber(menu.eles[2].inputValue) - if amount == nil then - ESX.ShowNotification(_U('invalid_amount')) - else - TriggerServerEvent('esx_society:depositMoney', society, amount) - ESX.CloseContext() - end - elseif element.value == "wash_money" then - local elements = { - {unselectable = true, icon = "fas fa-wallet", title = _U('wash_money_amount'), description = "Deposit some money into the money wash"}, - {icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to wash..", inputMin = 1, inputMax = 250000, name = "wash"}, - {icon = "fas fa-check", title = "Confirm", value = "confirm3"}, - {icon = "fas fa-arrow-left", title = "Return", value = "return"} - } - ESX.RefreshContext(elements) - elseif element.value == "confirm3" then - local amount = tonumber(menu.eles[2].inputValue) - if amount == nil then - ESX.ShowNotification(_U('invalid_amount')) - else - TriggerServerEvent('esx_society:washMoney', society, amount) - ESX.CloseContext() - end - elseif element.value == "manage_employees" then - OpenManageEmployeesMenu(society, options) - elseif element.value == "manage_salary" then - OpenManageSalaryMenu(society, options) - elseif element.value == "manage_grades" then - OpenManageGradesMenu(society, options) - elseif element.value == "return" then - OpenBossMenu(society, nil, options) - end - end) - end - end, society) + options = options or {} + local elements = { + { unselectable = true, icon = "fas fa-user", title = _U("boss_menu") }, + } + + ESX.TriggerServerCallback("esx_society:isBoss", function(isBoss) + if isBoss then + local defaultOptions = { + checkBal = true, + withdraw = true, + deposit = true, + wash = true, + employees = true, + salary = true, + grades = true, + } + + for k, v in pairs(defaultOptions) do + if options[k] == nil then + options[k] = v + end + end + + if options.checkBal then + elements[#elements + 1] = { icon = "fas fa-wallet", title = _U("check_society_balance"), value = "check_society_balance" } + end + if options.withdraw then + elements[#elements + 1] = { icon = "fas fa-wallet", title = _U("withdraw_society_money"), value = "withdraw_society_money" } + end + if options.deposit then + elements[#elements + 1] = { icon = "fas fa-wallet", title = _U("deposit_society_money"), value = "deposit_money" } + end + if options.wash then + elements[#elements + 1] = { icon = "fas fa-wallet", title = _U("wash_money"), value = "wash_money" } + end + if options.employees then + elements[#elements + 1] = { icon = "fas fa-users", title = _U("employee_management"), value = "manage_employees" } + end + if options.salary then + elements[#elements + 1] = { icon = "fas fa-wallet", title = _U("salary_management"), value = "manage_salary" } + end + if options.grades then + elements[#elements + 1] = { icon = "fas fa-scroll", title = _U("grade_management"), value = "manage_grades" } + end + + ESX.OpenContext("right", elements, function(menu, element) + if element.value == "check_society_balance" then + TriggerServerEvent("esx_society:checkSocietyBalance", society) + elseif element.value == "withdraw_society_money" then + local elements = { + { unselectable = true, icon = "fas fa-wallet", title = _U("withdraw_amount"), description = "Withdraw money from the society account" }, + { icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to withdraw..", inputMin = 1, inputMax = 250000, name = "withdraw" }, + { icon = "fas fa-check", title = "Confirm", value = "confirm" }, + { icon = "fas fa-arrow-left", title = "Return", value = "return" }, + } + ESX.RefreshContext(elements) + elseif element.value == "confirm" then + local amount = tonumber(menu.eles[2].inputValue) + if amount == nil then + ESX.ShowNotification(_U("invalid_amount")) + else + TriggerServerEvent("esx_society:withdrawMoney", society, amount) + ESX.CloseContext() + end + elseif element.value == "deposit_money" then + local elements = { + { unselectable = true, icon = "fas fa-wallet", title = _U("deposit_amount"), description = "Deposit some money into the society account" }, + { icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to deposit..", inputMin = 1, inputMax = 250000, name = "deposit" }, + { icon = "fas fa-check", title = "Confirm", value = "confirm2" }, + { icon = "fas fa-arrow-left", title = "Return", value = "return" }, + } + ESX.RefreshContext(elements) + elseif element.value == "confirm2" then + local amount = tonumber(menu.eles[2].inputValue) + if amount == nil then + ESX.ShowNotification(_U("invalid_amount")) + else + TriggerServerEvent("esx_society:depositMoney", society, amount) + ESX.CloseContext() + end + elseif element.value == "wash_money" then + local elements = { + { unselectable = true, icon = "fas fa-wallet", title = _U("wash_money_amount"), description = "Deposit some money into the money wash" }, + { icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to wash..", inputMin = 1, inputMax = 250000, name = "wash" }, + { icon = "fas fa-check", title = "Confirm", value = "confirm3" }, + { icon = "fas fa-arrow-left", title = "Return", value = "return" }, + } + ESX.RefreshContext(elements) + elseif element.value == "confirm3" then + local amount = tonumber(menu.eles[2].inputValue) + if amount == nil then + ESX.ShowNotification(_U("invalid_amount")) + else + TriggerServerEvent("esx_society:washMoney", society, amount) + ESX.CloseContext() + end + elseif element.value == "manage_employees" then + OpenManageEmployeesMenu(society, options) + elseif element.value == "manage_salary" then + OpenManageSalaryMenu(society, options) + elseif element.value == "manage_grades" then + OpenManageGradesMenu(society, options) + elseif element.value == "return" then + OpenBossMenu(society, nil, options) + end + end) + end + end, society) end function OpenManageEmployeesMenu(society, options) - local elements = { - {unselectable = true, icon = "fas fa-users", title = _U('employee_management')}, - {icon = "fas fa-users", title = _U('employee_list'), value = "employee_list"}, - {icon = "fas fa-users", title = _U('recruit'), value = "recruit"} - } - - elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} - - ESX.OpenContext("right", elements, function(_, element) - if element.value == "employee_list" then - OpenEmployeeList(society, options) - elseif element.value == "recruit" then - OpenRecruitMenu(society, options) - elseif element.value == "return" then - OpenBossMenu(society, nil, options) - end - end) + local elements = { + { unselectable = true, icon = "fas fa-users", title = _U("employee_management") }, + { icon = "fas fa-users", title = _U("employee_list"), value = "employee_list" }, + { icon = "fas fa-users", title = _U("recruit"), value = "recruit" }, + } + + elements[#elements + 1] = { icon = "fas fa-arrow-left", title = "Return", value = "return" } + + ESX.OpenContext("right", elements, function(_, element) + if element.value == "employee_list" then + OpenEmployeeList(society, options) + elseif element.value == "recruit" then + OpenRecruitMenu(society, options) + elseif element.value == "return" then + OpenBossMenu(society, nil, options) + end + end) end function OpenEmployeeList(society, options) - ESX.TriggerServerCallback('esx_society:getEmployees', function(employees) - local elements = { - {unselectable = true, icon = "fas fa-user", title = "Employees"} - } - - for i=1, #employees, 1 do - local gradeLabel = (employees[i].job.grade_label == '' and employees[i].job.label or employees[i].job.grade_label) - - elements[#elements+1] = {icon = "fas fa-user", title = employees[i].name .. " | " ..gradeLabel, gradeLabel = gradeLabel, data = employees[i]} - end - - elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} - - ESX.OpenContext("right", elements, function(_,element) - if element.value == "return" then - OpenManageEmployeesMenu(society, options) - else - local elements2 = { - {unselectable = true, icon = "fas fa-user", title = element.title}, - {icon = "fas fa-user", title = "Promote", value = "promote"}, - {icon = "fas fa-user", title = "Fire", value = "fire"}, - {icon = "fas fa-arrow-left", title = "Return", value = "return"} - } - ESX.OpenContext("right", elements2, function(_,element2) - local employee = element.data - if element2.value == "promote" then - ESX.CloseContext() - OpenPromoteMenu(society, employee, options) - elseif element2.value == "fire" then - ESX.ShowNotification(_U('you_have_fired', employee.name)) - - ESX.TriggerServerCallback('esx_society:setJob', function() - OpenEmployeeList(society, options) - end, employee.identifier, 'unemployed', 0, 'fire') - elseif element2.value == "return" then - OpenEmployeeList(society, options) - end - end) - end - end) - end, society) + ESX.TriggerServerCallback("esx_society:getEmployees", function(employees) + local elements = { + { unselectable = true, icon = "fas fa-user", title = "Employees" }, + } + + for i = 1, #employees, 1 do + local gradeLabel = (employees[i].job.grade_label == "" and employees[i].job.label or employees[i].job.grade_label) + + elements[#elements + 1] = { icon = "fas fa-user", title = employees[i].name .. " | " .. gradeLabel, gradeLabel = gradeLabel, data = employees[i] } + end + + elements[#elements + 1] = { icon = "fas fa-arrow-left", title = "Return", value = "return" } + + ESX.OpenContext("right", elements, function(_, element) + if element.value == "return" then + OpenManageEmployeesMenu(society, options) + else + local elements2 = { + { unselectable = true, icon = "fas fa-user", title = element.title }, + { icon = "fas fa-user", title = "Promote", value = "promote" }, + { icon = "fas fa-user", title = "Fire", value = "fire" }, + { icon = "fas fa-arrow-left", title = "Return", value = "return" }, + } + ESX.OpenContext("right", elements2, function(_, element2) + local employee = element.data + if element2.value == "promote" then + ESX.CloseContext() + OpenPromoteMenu(society, employee, options) + elseif element2.value == "fire" then + ESX.ShowNotification(_U("you_have_fired", employee.name)) + + ESX.TriggerServerCallback("esx_society:setJob", function() + OpenEmployeeList(society, options) + end, employee.identifier, "unemployed", 0, "fire") + elseif element2.value == "return" then + OpenEmployeeList(society, options) + end + end) + end + end) + end, society) end function OpenRecruitMenu(society, options) - ESX.TriggerServerCallback('esx_society:getOnlinePlayers', function(players) - local elements = { - {unselectable = true, icon = "fas fa-user", title = _U('recruiting')} - } - - for i=1, #players, 1 do - if players[i].job.name ~= society then - elements[#elements+1] = {icon = "fas fa-user", title = players[i].name, value = players[i].source, name = players[i].name, identifier = players[i].identifier} - end - end - - elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} - - ESX.OpenContext("right", elements, function(_,element) - if element.value == "return" then - OpenManageEmployeesMenu(society, options) - else - local elements2 = { - {unselectable = true, icon = "fas fa-user", title = "Confirm"}, - {icon = "fas fa-times", title = _U('no'), value = "no"}, - {icon = "fas fa-check", title = _U('yes'), value = "yes"}, - } - ESX.OpenContext("right", elements2, function(_,element2) - if element2.value == "yes" then - ESX.ShowNotification(_U('you_have_hired', element.name)) - - ESX.TriggerServerCallback('esx_society:setJob', function() - OpenRecruitMenu(society, options) - end, element.identifier, society, 0, 'hire') - end - end) - end - end) - end) + ESX.TriggerServerCallback("esx_society:getOnlinePlayers", function(players) + local elements = { + { unselectable = true, icon = "fas fa-user", title = _U("recruiting") }, + } + + for i = 1, #players, 1 do + if players[i].job.name ~= society then + elements[#elements + 1] = { icon = "fas fa-user", title = players[i].name, value = players[i].source, name = players[i].name, identifier = players[i].identifier } + end + end + + elements[#elements + 1] = { icon = "fas fa-arrow-left", title = "Return", value = "return" } + + ESX.OpenContext("right", elements, function(_, element) + if element.value == "return" then + OpenManageEmployeesMenu(society, options) + else + local elements2 = { + { unselectable = true, icon = "fas fa-user", title = "Confirm" }, + { icon = "fas fa-times", title = _U("no"), value = "no" }, + { icon = "fas fa-check", title = _U("yes"), value = "yes" }, + } + ESX.OpenContext("right", elements2, function(_, element2) + if element2.value == "yes" then + ESX.ShowNotification(_U("you_have_hired", element.name)) + + ESX.TriggerServerCallback("esx_society:setJob", function() + OpenRecruitMenu(society, options) + end, element.identifier, society, 0, "hire") + end + end) + end + end) + end) end function OpenPromoteMenu(society, employee, options) - ESX.TriggerServerCallback('esx_society:getJob', function(job) - local elements = { - {unselectable = true, icon = "fas fa-user", title = _U('promote_employee', employee.name)} - } - - for i=1, #job.grades, 1 do - local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label) - - elements[#elements+1] = {icon = "fas fa-user", title = gradeLabel, value = job.grades[i].grade, selected = (employee.job.grade == job.grades[i].grade)} - end - - elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} - - ESX.OpenContext("right", elements, function(_, element) - if element.value == "return" then - OpenEmployeeList(society, options) - else - ESX.ShowNotification(_U('you_have_promoted', employee.name, element.title)) - - ESX.TriggerServerCallback('esx_society:setJob', function() - OpenEmployeeList(society, options) - end, employee.identifier, society, element.value, 'promote') - end - end, function() - OpenEmployeeList(society, options) - end) - end, society) + ESX.TriggerServerCallback("esx_society:getJob", function(job) + local elements = { + { unselectable = true, icon = "fas fa-user", title = _U("promote_employee", employee.name) }, + } + + for i = 1, #job.grades, 1 do + local gradeLabel = (job.grades[i].label == "" and job.label or job.grades[i].label) + + elements[#elements + 1] = { icon = "fas fa-user", title = gradeLabel, value = job.grades[i].grade, selected = (employee.job.grade == job.grades[i].grade) } + end + + elements[#elements + 1] = { icon = "fas fa-arrow-left", title = "Return", value = "return" } + + ESX.OpenContext("right", elements, function(_, element) + if element.value == "return" then + OpenEmployeeList(society, options) + else + ESX.ShowNotification(_U("you_have_promoted", employee.name, element.title)) + + ESX.TriggerServerCallback("esx_society:setJob", function() + OpenEmployeeList(society, options) + end, employee.identifier, society, element.value, "promote") + end + end, function() + OpenEmployeeList(society, options) + end) + end, society) end function OpenManageSalaryMenu(society, options) - ESX.TriggerServerCallback('esx_society:getJob', function(job) - local elements = { - {unselectable = true, icon = "fas fa-wallet", title = _U('salary_management')} - } - - for i=1, #job.grades, 1 do - local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label) - - elements[#elements+1] = { - icon = "fas fa-wallet", - title = ('%s - %s'):format(gradeLabel, _U('money_generic', ESX.Math.GroupDigits(job.grades[i].salary))), - value = job.grades[i].grade - } - end - - elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} - - ESX.OpenContext("right", elements, function(menu,element) - local elements = { - {unselectable = true, icon = "fas fa-wallet", title = element.title, description = "Change a grade salary amount", value = element.value}, - {icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to change grade salary..", inputMin = 1, inputMax = Config.MaxSalary, name = "gradesalary"}, - {icon = "fas fa-check", title = "Confirm", value = "confirm"} - } - - ESX.RefreshContext(elements) - if element.value == "confirm" then - local amount = tonumber(menu.eles[2].inputValue) - - if amount == nil then - ESX.ShowNotification(_U('invalid_value_nochanges')) - OpenManageSalaryMenu(society, options) - elseif amount > Config.MaxSalary then - ESX.ShowNotification(_U('invalid_amount_max')) - OpenManageSalaryMenu(society, options) - else - ESX.CloseContext() - ESX.TriggerServerCallback('esx_society:setJobSalary', function() - OpenManageSalaryMenu(society, options) - end, society, menu.eles[1].value, amount) - end - elseif element.value == "return" then - OpenBossMenu(society, nil, options) - end - end) - end, society) + ESX.TriggerServerCallback("esx_society:getJob", function(job) + local elements = { + { unselectable = true, icon = "fas fa-wallet", title = _U("salary_management") }, + } + + for i = 1, #job.grades, 1 do + local gradeLabel = (job.grades[i].label == "" and job.label or job.grades[i].label) + + elements[#elements + 1] = { + icon = "fas fa-wallet", + title = ('%s - %s'):format(gradeLabel, _U("money_generic", ESX.Math.GroupDigits(job.grades[i].salary))), + value = job.grades[i].grade, + } + end + + elements[#elements + 1] = { icon = "fas fa-arrow-left", title = "Return", value = "return" } + + ESX.OpenContext("right", elements, function(menu, element) + local elements = { + { unselectable = true, icon = "fas fa-wallet", title = element.title, description = "Change a grade salary amount", value = element.value }, + { icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to change grade salary..", inputMin = 1, inputMax = Config.MaxSalary, name = "gradesalary" }, + { icon = "fas fa-check", title = "Confirm", value = "confirm" }, + } + + ESX.RefreshContext(elements) + if element.value == "confirm" then + local amount = tonumber(menu.eles[2].inputValue) + + if amount == nil then + ESX.ShowNotification(_U("invalid_value_nochanges")) + OpenManageSalaryMenu(society, options) + elseif amount > Config.MaxSalary then + ESX.ShowNotification(_U("invalid_amount_max")) + OpenManageSalaryMenu(society, options) + else + ESX.CloseContext() + ESX.TriggerServerCallback("esx_society:setJobSalary", function() + OpenManageSalaryMenu(society, options) + end, society, menu.eles[1].value, amount) + end + elseif element.value == "return" then + OpenBossMenu(society, nil, options) + end + end) + end, society) end function OpenManageGradesMenu(society, options) - ESX.TriggerServerCallback('esx_society:getJob', function(job) - local elements = { - {unselectable = true, icon = "fas fa-wallet", title = _U('grade_management')} - } - - for i=1, #job.grades, 1 do - local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label) - - elements[#elements+1] = {icon = "fas fa-wallet", title = ('%s'):format(gradeLabel), value = job.grades[i].grade} - end - - elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} - - ESX.OpenContext("right", elements, function(menu,element) - local elements = { - {unselectable = true, icon = "fas fa-wallet", title = element.title, description = "Change a grade label", value = element.value}, - {icon = "fas fa-wallet", title = "Label", input = true, inputType = "text", inputPlaceholder = "Label to change job grade label..", name = "gradelabel"}, - {icon = "fas fa-check", title = "Confirm", value = "confirm"} - } - - ESX.RefreshContext(elements) - if element.value == "confirm" then - if menu.eles[2].inputValue then - local label = tostring(menu.eles[2].inputValue) - - ESX.TriggerServerCallback('esx_society:setJobLabel', function() - OpenManageGradesMenu(society, options) - end, society, menu.eles[1].value, label) - else - ESX.ShowNotification(_U('invalid_value_nochanges')) - OpenManageGradesMenu(society, options) - end - elseif element.value == "return" then - OpenBossMenu(society, nil, options) - end - end) - end, society) + ESX.TriggerServerCallback("esx_society:getJob", function(job) + local elements = { + { unselectable = true, icon = "fas fa-wallet", title = _U("grade_management") }, + } + + for i = 1, #job.grades, 1 do + local gradeLabel = (job.grades[i].label == "" and job.label or job.grades[i].label) + + elements[#elements + 1] = { icon = "fas fa-wallet", title = ("%s"):format(gradeLabel), value = job.grades[i].grade } + end + + elements[#elements + 1] = { icon = "fas fa-arrow-left", title = "Return", value = "return" } + + ESX.OpenContext("right", elements, function(menu, element) + local elements = { + { unselectable = true, icon = "fas fa-wallet", title = element.title, description = "Change a grade label", value = element.value }, + { icon = "fas fa-wallet", title = "Label", input = true, inputType = "text", inputPlaceholder = "Label to change job grade label..", name = "gradelabel" }, + { icon = "fas fa-check", title = "Confirm", value = "confirm" }, + } + + ESX.RefreshContext(elements) + if element.value == "confirm" then + if menu.eles[2].inputValue then + local label = tostring(menu.eles[2].inputValue) + + ESX.TriggerServerCallback("esx_society:setJobLabel", function() + OpenManageGradesMenu(society, options) + end, society, menu.eles[1].value, label) + else + ESX.ShowNotification(_U("invalid_value_nochanges")) + OpenManageGradesMenu(society, options) + end + elseif element.value == "return" then + OpenBossMenu(society, nil, options) + end + end) + end, society) end -AddEventHandler('esx_society:openBossMenu', function(society, close, options) - OpenBossMenu(society, close, options) +AddEventHandler("esx_society:openBossMenu", function(society, close, options) + OpenBossMenu(society, close, options) end) -if ESX.PlayerLoaded then RefreshBussHUD() end \ No newline at end of file +if ESX.PlayerLoaded then + RefreshBussHUD() +end diff --git a/server-data/resources/[esx]/esx_society/config.lua b/server-data/resources/[esx]/esx_society/config.lua index b81490cbe..075126601 100644 --- a/server-data/resources/[esx]/esx_society/config.lua +++ b/server-data/resources/[esx]/esx_society/config.lua @@ -1,5 +1,5 @@ Config = {} -Config.Locale = 'en' +Config.Locale = "en" Config.EnableESXIdentity = true Config.MaxSalary = 3500 diff --git a/server-data/resources/[esx]/esx_society/locales/br.lua b/server-data/resources/[esx]/esx_society/locales/br.lua index d690d5017..c524b3a47 100644 --- a/server-data/resources/[esx]/esx_society/locales/br.lua +++ b/server-data/resources/[esx]/esx_society/locales/br.lua @@ -1,38 +1,37 @@ -Locales['br'] = { - ['actions'] = 'ações', - ['boss_menu'] = 'menu chefe', - ['money_generic'] = '$%s', - ['deposit_amount'] = 'valor do depósito', - ['deposit_society_money'] = 'depositar dinheiro da sociedade', - ['do_you_want_to_recruit'] = 'você quer recrutar %s?', - ['employee'] = 'empregado', - ['employee_list'] = 'lista de empregados', - ['employee_management'] = 'gestão de funcionários', - ['fire'] = 'fogo', - ['grade'] = 'grau(escolaridade)', - ['have_deposited'] = 'você depositou ~r~$%s', - ['have_withdrawn'] = 'você retirou $%s', - ['invalid_amount'] = 'montante inválido', - ['invalid_amount_max'] = 'esse salário não é permitido', - ['no'] = 'não', - ['promote'] = 'promover', - ['promote_employee'] = 'promover %s', - ['recruit'] = 'recrutar', - ['recruiting'] = 'recrutamento', - ['salary_amount'] = 'valor do salário', - ['salary_management'] = 'gestão salarial', - ['wash_money'] = 'lavar dinheiro', - ['wash_money_amount'] = 'quantidade a lavar', - ['withdraw_amount'] = 'retirar montante', - ['withdraw_society_money'] = 'retirar dinheiro da sociedade', - ['yes'] = 'sim', - ['you_have'] = 'você tem $%s esperando lavagem de dinheiro (24h).', - ['you_have_laundered'] = 'você lavou $%s do seu dinheiro ', - ['you_have_hired'] = 'você recrutou %s', - ['you_have_been_hired'] = 'você foi contratado por %s', - ['you_have_fired'] = 'você demitiu %s', - ['you_have_been_fired'] = 'você foi demitido de %s', - ['you_have_promoted'] = 'você promoveu %s a %s', - ['you_have_been_promoted'] = 'você foi promovido promoted!', +Locales["br"] = { + ["actions"] = "ações", + ["boss_menu"] = "menu chefe", + ["money_generic"] = "$%s", + ["deposit_amount"] = "valor do depósito", + ["deposit_society_money"] = "depositar dinheiro da sociedade", + ["do_you_want_to_recruit"] = "você quer recrutar %s?", + ["employee"] = "empregado", + ["employee_list"] = "lista de empregados", + ["employee_management"] = "gestão de funcionários", + ["fire"] = "fogo", + ["grade"] = "grau(escolaridade)", + ["have_deposited"] = "você depositou ~r~$%s", + ["have_withdrawn"] = "você retirou $%s", + ["invalid_amount"] = "montante inválido", + ["invalid_amount_max"] = "esse salário não é permitido", + ["no"] = "não", + ["promote"] = "promover", + ["promote_employee"] = "promover %s", + ["recruit"] = "recrutar", + ["recruiting"] = "recrutamento", + ["salary_amount"] = "valor do salário", + ["salary_management"] = "gestão salarial", + ["wash_money"] = "lavar dinheiro", + ["wash_money_amount"] = "quantidade a lavar", + ["withdraw_amount"] = "retirar montante", + ["withdraw_society_money"] = "retirar dinheiro da sociedade", + ["yes"] = "sim", + ["you_have"] = "você tem $%s esperando lavagem de dinheiro (24h).", + ["you_have_laundered"] = "você lavou $%s do seu dinheiro ", + ["you_have_hired"] = "você recrutou %s", + ["you_have_been_hired"] = "você foi contratado por %s", + ["you_have_fired"] = "você demitiu %s", + ["you_have_been_fired"] = "você foi demitido de %s", + ["you_have_promoted"] = "você promoveu %s a %s", + ["you_have_been_promoted"] = "você foi promovido promoted!", } - diff --git a/server-data/resources/[esx]/esx_society/locales/cs.lua b/server-data/resources/[esx]/esx_society/locales/cs.lua index 4d40804fb..dc79eb52b 100644 --- a/server-data/resources/[esx]/esx_society/locales/cs.lua +++ b/server-data/resources/[esx]/esx_society/locales/cs.lua @@ -1,37 +1,37 @@ -Locales['cs'] = { - ['actions'] = 'akce', - ['boss_menu'] = 'akce šéfa', - ['money_generic'] = '$%s', - ['deposit_amount'] = 'množství vkladu', - ['deposit_society_money'] = 'vložit peníze do společnosti', - ['do_you_want_to_recruit'] = 'chceš najmout %s?', - ['employee'] = 'zaměstnanec', - ['employee_list'] = 'seznam zaměstnanců', - ['employee_management'] = 'správa zaměstnanců', - ['fire'] = 'vyhodit', - ['grade'] = 'povýšit', - ['have_deposited'] = 'vložil jsi ~r~$%s', - ['have_withdrawn'] = 'vybral jsi $%s', - ['invalid_amount'] = 'neplatná částka', - ['invalid_amount_max'] = 'tento plat není povolen', - ['no'] = 'ne', - ['promote'] = 'povýšit', - ['promote_employee'] = 'povýšit %s', - ['recruit'] = 'najmout', - ['recruiting'] = 'najímání', - ['salary_amount'] = 'váše platu', - ['salary_management'] = 'správa platů', - ['wash_money'] = 'vyprat peníze', - ['wash_money_amount'] = 'množství na vyprání', - ['withdraw_amount'] = 'výběr peněz', - ['withdraw_society_money'] = 'vybrat peníze společnosti', - ['yes'] = 'ano', - ['you_have'] = 'máš $%s čekajících na vyprání (24h).', - ['you_have_laundered'] = '~r~Vypral jsi tvé peníze: $%s', - ['you_have_hired'] = 'najmul jsi %s', - ['you_have_been_hired'] = 'byl jsi najmut hráčem %s', - ['you_have_fired'] = 'vyhodil jsi %s', - ['you_have_been_fired'] = 'byl jsi vyhozen hráčem %s', - ['you_have_promoted'] = 'byl jsi povýšen hráčem %s na %s', - ['you_have_been_promoted'] = 'byl jsi povýšen!', +Locales["cs"] = { + ["actions"] = "akce", + ["boss_menu"] = "akce šéfa", + ["money_generic"] = "$%s", + ["deposit_amount"] = "množství vkladu", + ["deposit_society_money"] = "vložit peníze do společnosti", + ["do_you_want_to_recruit"] = "chceš najmout %s?", + ["employee"] = "zaměstnanec", + ["employee_list"] = "seznam zaměstnanců", + ["employee_management"] = "správa zaměstnanců", + ["fire"] = "vyhodit", + ["grade"] = "povýšit", + ["have_deposited"] = "vložil jsi ~r~$%s", + ["have_withdrawn"] = "vybral jsi $%s", + ["invalid_amount"] = "neplatná částka", + ["invalid_amount_max"] = "tento plat není povolen", + ["no"] = "ne", + ["promote"] = "povýšit", + ["promote_employee"] = "povýšit %s", + ["recruit"] = "najmout", + ["recruiting"] = "najímání", + ["salary_amount"] = "váše platu", + ["salary_management"] = "správa platů", + ["wash_money"] = "vyprat peníze", + ["wash_money_amount"] = "množství na vyprání", + ["withdraw_amount"] = "výběr peněz", + ["withdraw_society_money"] = "vybrat peníze společnosti", + ["yes"] = "ano", + ["you_have"] = "máš $%s čekajících na vyprání (24h).", + ["you_have_laundered"] = "~r~Vypral jsi tvé peníze: $%s", + ["you_have_hired"] = "najmul jsi %s", + ["you_have_been_hired"] = "byl jsi najmut hráčem %s", + ["you_have_fired"] = "vyhodil jsi %s", + ["you_have_been_fired"] = "byl jsi vyhozen hráčem %s", + ["you_have_promoted"] = "byl jsi povýšen hráčem %s na %s", + ["you_have_been_promoted"] = "byl jsi povýšen!", } diff --git a/server-data/resources/[esx]/esx_society/locales/de.lua b/server-data/resources/[esx]/esx_society/locales/de.lua index ffb26e889..6d1a82f37 100644 --- a/server-data/resources/[esx]/esx_society/locales/de.lua +++ b/server-data/resources/[esx]/esx_society/locales/de.lua @@ -1,42 +1,42 @@ -Locales['de'] = { - ['actions'] = 'Aktionen', - ['boss_menu'] = 'Bossmenü', - ['money_generic'] = '%s€', - ['deposit_amount'] = 'Anzahl einzahlen', - ['deposit_society_money'] = 'Geld einzahlen', - ['do_you_want_to_recruit'] = 'Möchtest du %s einstellen?', - ['employee'] = 'Mitarbeiter', - ['employee_list'] = 'Mitarbeiter liste', - ['employee_management'] = 'Mitarbeiter Management', - ['fire'] = 'Feuern', - ['grade'] = 'Grad', - ['have_deposited'] = 'Du zahlst ein ~r~%s€~s~', - ['have_withdrawn'] = 'Du zahlst aus ~g~%s€~s~', - ['check_balance'] = 'Geld ist ~g~%s€', - ['invalid_amount_max'] = 'Dieses gehalt ist nicht erlaubt!', - ['invalid_amount'] = 'Ungültige Anzahl', - ['invalid_value_nochanges']= 'Ungültige Anzahl! Keine Änderungen gespeichert!', - ['no'] = 'Nein', - ['promote'] = 'Befördern', - ['promote_employee'] = '%s befördern', - ['recruit'] = 'Einstellen', - ['recruiting'] = 'Eingestellt', - ['salary_amount'] = 'Gehaltsanzahl', - ['salary_management'] = 'Gehaltsmanagement', - ['grade_management'] = 'Grad Name Management', - ['grade_label'] = 'Grad Name', - ['check_society_balance'] = 'Überprüfe Firmengeld', - ['wash_money'] = 'Geld Waschen', - ['wash_money_amount'] = 'Anzahl zum Waschen', - ['withdraw_amount'] = 'Anzahl einzahlen', - ['withdraw_society_money'] = 'Geld auszahlen', - ['yes'] = 'Ja', - ['you_have'] = 'Du hast ~g~%s€~s~ wartent in deiner ~y~Geld Waschmaschine~s~ (24h).', - ['you_have_laundered'] = 'Du hast dein Geld ~r~gewaschen~s~ Anzahl: ~g~%s€~s~', - ['you_have_hired'] = 'Du wurdest eingestellt %s', - ['you_have_been_hired'] = 'Du wurdest eingestellt von %s', - ['you_have_fired'] = 'Du wurdest gefeuert %s', - ['you_have_been_fired'] = 'Du wurdest gefeuert von %s', - ['you_have_promoted'] = 'Du wurdest befördert %s zu als %s', - ['you_have_been_promoted'] = 'Du wurdest ~b~befördert~s~!' +Locales["de"] = { + ["actions"] = "Aktionen", + ["boss_menu"] = "Bossmenü", + ["money_generic"] = "%s€", + ["deposit_amount"] = "Anzahl einzahlen", + ["deposit_society_money"] = "Geld einzahlen", + ["do_you_want_to_recruit"] = "Möchtest du %s einstellen?", + ["employee"] = "Mitarbeiter", + ["employee_list"] = "Mitarbeiter liste", + ["employee_management"] = "Mitarbeiter Management", + ["fire"] = "Feuern", + ["grade"] = "Grad", + ["have_deposited"] = "Du zahlst ein ~r~%s€~s~", + ["have_withdrawn"] = "Du zahlst aus ~g~%s€~s~", + ["check_balance"] = "Geld ist ~g~%s€", + ["invalid_amount_max"] = "Dieses gehalt ist nicht erlaubt!", + ["invalid_amount"] = "Ungültige Anzahl", + ["invalid_value_nochanges"] = "Ungültige Anzahl! Keine Änderungen gespeichert!", + ["no"] = "Nein", + ["promote"] = "Befördern", + ["promote_employee"] = "%s befördern", + ["recruit"] = "Einstellen", + ["recruiting"] = "Eingestellt", + ["salary_amount"] = "Gehaltsanzahl", + ["salary_management"] = "Gehaltsmanagement", + ["grade_management"] = "Grad Name Management", + ["grade_label"] = "Grad Name", + ["check_society_balance"] = "Überprüfe Firmengeld", + ["wash_money"] = "Geld Waschen", + ["wash_money_amount"] = "Anzahl zum Waschen", + ["withdraw_amount"] = "Anzahl einzahlen", + ["withdraw_society_money"] = "Geld auszahlen", + ["yes"] = "Ja", + ["you_have"] = "Du hast ~g~%s€~s~ wartent in deiner ~y~Geld Waschmaschine~s~ (24h).", + ["you_have_laundered"] = "Du hast dein Geld ~r~gewaschen~s~ Anzahl: ~g~%s€~s~", + ["you_have_hired"] = "Du wurdest eingestellt %s", + ["you_have_been_hired"] = "Du wurdest eingestellt von %s", + ["you_have_fired"] = "Du wurdest gefeuert %s", + ["you_have_been_fired"] = "Du wurdest gefeuert von %s", + ["you_have_promoted"] = "Du wurdest befördert %s zu als %s", + ["you_have_been_promoted"] = "Du wurdest ~b~befördert~s~!", } diff --git a/server-data/resources/[esx]/esx_society/locales/el.lua b/server-data/resources/[esx]/esx_society/locales/el.lua index 4fac63eae..b22e7ac83 100644 --- a/server-data/resources/[esx]/esx_society/locales/el.lua +++ b/server-data/resources/[esx]/esx_society/locales/el.lua @@ -1,43 +1,43 @@ -Locales['el'] = { - ['actions'] = 'Ενέργειες', - ['boss_menu'] = 'Μενού αφεντικού', - ['money_generic'] = '$%s', - ['deposit_amount'] = 'Ποσό κατάθεσης', - ['deposit_society_money'] = 'Κατάθεση χρημάτων στην επιχείρηση', - ['do_you_want_to_recruit'] = 'Θέλετε να προσλάβετε τον/την %s;', - ['employee'] = 'Υπάλληλος', - ['employee_list'] = 'Κατάλογος υπαλλήλων', - ['employee_management'] = 'Διαχείριση υπαλλήλων', - ['fire'] = 'Απόλυση', - ['grade'] = 'Βαθμός', - ['have_deposited'] = 'Έχετε καταθέσει r%s €', - ['have_withdrawn'] = 'Έχετε αναλάβει %s €', - ['check_balance'] = 'Το υπόλοιπο είναι g%s €', - ['invalid_amount'] = 'Μη έγκυρο ποσό', - ['invalid_amount_max'] = 'Αυτό ο μισθός δεν επιτρέπεται', - ['invalid_value'] = 'Μη έγκυρη τιμή', - ['invalid_value_nochanges']= 'Μη έγκυρη τιμή, δεν έγιναν αλλαγές', - ['no'] = 'Όχι', - ['promote'] = 'Προαγωγή', - ['promote_employee'] = 'Προαγωγή του/της %s', - ['recruit'] = 'Πρόσληψη', - ['recruiting'] = 'Γίνεται Πρόσληψη', - ['salary_amount'] = 'Ποσό μισθού', - ['salary_management'] = 'Διαχείριση μισθού', - ['grade_management'] = 'Διαχείριση ετικέτας βαθμού', - ['grade_label'] = 'Ετικέτα βαθμού', - ['check_society_balance'] = 'Έλεγχος υπολοίπου της επιχείρησης', - ['wash_money'] = 'Πλύση χρημάτων', - ['wash_money_amount'] = 'Ποσό πλύσης', - ['withdraw_amount'] = 'Ποσό ανάληψης', - ['withdraw_society_money'] = 'Ανάληψη χρημάτων από την επιχείρηση', - ['yes'] = 'Ναι', - ['you_have'] = 'Έχετε $%s σε αναμονή πλύσης χρήματος (24ώρες).', - ['you_have_laundered'] = 'Έχετε πλύνει τα χρήματά σας: $%s', - ['you_have_hired'] = 'Έχετε προσλάβει τον/την %s', - ['you_have_been_hired'] = 'Έχετε προσληφθεί από τον/την %s', - ['you_have_fired'] = 'Έχετε απολύσει τον/την %s', - ['you_have_been_fired'] = 'Έχετε απολυθεί από τον/την %s', - ['you_have_promoted'] = 'Έχετε προαγάγει τον/την %s ως %s', - ['you_have_been_promoted'] = 'Μόλις πήρατε προαγωγή', -} \ No newline at end of file +Locales["el"] = { + ["actions"] = "Ενέργειες", + ["boss_menu"] = "Μενού αφεντικού", + ["money_generic"] = "$%s", + ["deposit_amount"] = "Ποσό κατάθεσης", + ["deposit_society_money"] = "Κατάθεση χρημάτων στην επιχείρηση", + ["do_you_want_to_recruit"] = "Θέλετε να προσλάβετε τον/την %s;", + ["employee"] = "Υπάλληλος", + ["employee_list"] = "Κατάλογος υπαλλήλων", + ["employee_management"] = "Διαχείριση υπαλλήλων", + ["fire"] = "Απόλυση", + ["grade"] = "Βαθμός", + ["have_deposited"] = "Έχετε καταθέσει r%s €", + ["have_withdrawn"] = "Έχετε αναλάβει %s €", + ["check_balance"] = "Το υπόλοιπο είναι g%s €", + ["invalid_amount"] = "Μη έγκυρο ποσό", + ["invalid_amount_max"] = "Αυτό ο μισθός δεν επιτρέπεται", + ["invalid_value"] = "Μη έγκυρη τιμή", + ["invalid_value_nochanges"] = "Μη έγκυρη τιμή, δεν έγιναν αλλαγές", + ["no"] = "Όχι", + ["promote"] = "Προαγωγή", + ["promote_employee"] = "Προαγωγή του/της %s", + ["recruit"] = "Πρόσληψη", + ["recruiting"] = "Γίνεται Πρόσληψη", + ["salary_amount"] = "Ποσό μισθού", + ["salary_management"] = "Διαχείριση μισθού", + ["grade_management"] = "Διαχείριση ετικέτας βαθμού", + ["grade_label"] = "Ετικέτα βαθμού", + ["check_society_balance"] = "Έλεγχος υπολοίπου της επιχείρησης", + ["wash_money"] = "Πλύση χρημάτων", + ["wash_money_amount"] = "Ποσό πλύσης", + ["withdraw_amount"] = "Ποσό ανάληψης", + ["withdraw_society_money"] = "Ανάληψη χρημάτων από την επιχείρηση", + ["yes"] = "Ναι", + ["you_have"] = "Έχετε $%s σε αναμονή πλύσης χρήματος (24ώρες).", + ["you_have_laundered"] = "Έχετε πλύνει τα χρήματά σας: $%s", + ["you_have_hired"] = "Έχετε προσλάβει τον/την %s", + ["you_have_been_hired"] = "Έχετε προσληφθεί από τον/την %s", + ["you_have_fired"] = "Έχετε απολύσει τον/την %s", + ["you_have_been_fired"] = "Έχετε απολυθεί από τον/την %s", + ["you_have_promoted"] = "Έχετε προαγάγει τον/την %s ως %s", + ["you_have_been_promoted"] = "Μόλις πήρατε προαγωγή", +} diff --git a/server-data/resources/[esx]/esx_society/locales/fi.lua b/server-data/resources/[esx]/esx_society/locales/fi.lua index 0c6630f36..cb25f56a4 100644 --- a/server-data/resources/[esx]/esx_society/locales/fi.lua +++ b/server-data/resources/[esx]/esx_society/locales/fi.lua @@ -1,37 +1,37 @@ -Locales['fi'] = { - ['actions'] = 'toiminnot', - ['boss_menu'] = 'boss menu', - ['money_generic'] = '€%s', - ['deposit_amount'] = 'talletus summa', - ['deposit_society_money'] = 'talleta yritykselle rahaa', - ['do_you_want_to_recruit'] = 'do you want to recruit %s?', - ['employee'] = 'työntekijä', - ['employee_list'] = 'työntekijä lista', - ['employee_management'] = 'työntekijöiden hallinta', - ['fire'] = 'anna potkut', - ['grade'] = 'taso', - ['have_deposited'] = 'sinä talletit ~r~€%s', - ['have_withdrawn'] = 'sinä nostit €%s', - ['invalid_amount'] = 'virheellinen summa', - ['invalid_amount_max'] = 'that salary is not allowed', - ['no'] = 'ei', - ['promote'] = 'ylennä', - ['promote_employee'] = 'ylennä henkilö %s', - ['recruit'] = 'rekrytoi', - ['recruiting'] = 'rekrytointi', - ['salary_amount'] = 'palkan määrä', - ['salary_management'] = 'palkan hallinta', - ['wash_money'] = 'pese rahaa', - ['wash_money_amount'] = 'pestävä määrä', - ['withdraw_amount'] = 'nostettava määrä', - ['withdraw_society_money'] = 'nosta yrityksen rahoja', - ['yes'] = 'kyllä', - ['you_have'] = 'you have €%s waiting in money laundering (24h).', - ['you_have_laundered'] = 'olet ~r~pessyt rahojasi: €%s', - ['you_have_hired'] = 'sinä palkkasit henkilön %s', - ['you_have_been_hired'] = 'sinut on palkattu pelaajan %s toimesta', - ['you_have_fired'] = 'sinä annoit potkut pelaajalle %s', - ['you_have_been_fired'] = 'sinulle annettiin potkut työstä %s', - ['you_have_promoted'] = 'sinä ylensit henkilön %s arvolle %s', - ['you_have_been_promoted'] = 'sinut ylennettiin', +Locales["fi"] = { + ["actions"] = "toiminnot", + ["boss_menu"] = "boss menu", + ["money_generic"] = "€%s", + ["deposit_amount"] = "talletus summa", + ["deposit_society_money"] = "talleta yritykselle rahaa", + ["do_you_want_to_recruit"] = "do you want to recruit %s?", + ["employee"] = "työntekijä", + ["employee_list"] = "työntekijä lista", + ["employee_management"] = "työntekijöiden hallinta", + ["fire"] = "anna potkut", + ["grade"] = "taso", + ["have_deposited"] = "sinä talletit ~r~€%s", + ["have_withdrawn"] = "sinä nostit €%s", + ["invalid_amount"] = "virheellinen summa", + ["invalid_amount_max"] = "that salary is not allowed", + ["no"] = "ei", + ["promote"] = "ylennä", + ["promote_employee"] = "ylennä henkilö %s", + ["recruit"] = "rekrytoi", + ["recruiting"] = "rekrytointi", + ["salary_amount"] = "palkan määrä", + ["salary_management"] = "palkan hallinta", + ["wash_money"] = "pese rahaa", + ["wash_money_amount"] = "pestävä määrä", + ["withdraw_amount"] = "nostettava määrä", + ["withdraw_society_money"] = "nosta yrityksen rahoja", + ["yes"] = "kyllä", + ["you_have"] = "you have €%s waiting in money laundering (24h).", + ["you_have_laundered"] = "olet ~r~pessyt rahojasi: €%s", + ["you_have_hired"] = "sinä palkkasit henkilön %s", + ["you_have_been_hired"] = "sinut on palkattu pelaajan %s toimesta", + ["you_have_fired"] = "sinä annoit potkut pelaajalle %s", + ["you_have_been_fired"] = "sinulle annettiin potkut työstä %s", + ["you_have_promoted"] = "sinä ylensit henkilön %s arvolle %s", + ["you_have_been_promoted"] = "sinut ylennettiin", } diff --git a/server-data/resources/[esx]/esx_society/locales/fr.lua b/server-data/resources/[esx]/esx_society/locales/fr.lua index 49fdc6a77..bd81d7894 100644 --- a/server-data/resources/[esx]/esx_society/locales/fr.lua +++ b/server-data/resources/[esx]/esx_society/locales/fr.lua @@ -1,37 +1,37 @@ -Locales['fr'] = { - ['actions'] = 'actions', - ['boss_menu'] = 'patron', - ['money_generic'] = '$%s', - ['deposit_amount'] = 'montant du dépôt', - ['deposit_society_money'] = 'déposer argent société', - ['do_you_want_to_recruit'] = 'Voulez-vous recruter %s?', - ['employee'] = 'employé', - ['employee_list'] = 'liste des employés', - ['employee_management'] = 'gestion employés', - ['fire'] = 'licencier', - ['grade'] = 'grade', - ['have_deposited'] = 'vous avez déposé ~r~$%s', - ['have_withdrawn'] = 'vous avez retiré $%s', - ['invalid_amount'] = 'montant invalide', - ['invalid_amount_max'] = 'ce salaire est non réglementaire', - ['no'] = 'non', - ['promote'] = 'promouvoir', - ['promote_employee'] = 'promouvoir %s', - ['recruit'] = 'recruter', - ['recruiting'] = 'recrutement', - ['salary_amount'] = 'montant du salaire', - ['salary_management'] = 'gestion salaires', - ['wash_money'] = 'blanchir argent', - ['wash_money_amount'] = 'montant à blanchir', - ['withdraw_amount'] = 'montant du retrait', - ['withdraw_society_money'] = 'retirer argent société', - ['yes'] = 'oui', - ['you_have'] = 'vous avez $%s en attente de ~r~blanchiement (24h).', - ['you_have_laundered'] = 'vous avez ~r~blanchi votre argent : $%s', - ['you_have_hired'] = 'Vous avez recruté %s', - ['you_have_been_hired'] = 'Vous avez été recruté dans la société %s', - ['you_have_fired'] = 'Vous avez viré %s', - ['you_have_been_fired'] = 'Vous avez été viré de la société %s', - ['you_have_promoted'] = 'Vous avez promu %s en tant que %s', - ['you_have_been_promoted'] = 'Vous avez été promu', +Locales["fr"] = { + ["actions"] = "actions", + ["boss_menu"] = "patron", + ["money_generic"] = "$%s", + ["deposit_amount"] = "montant du dépôt", + ["deposit_society_money"] = "déposer argent société", + ["do_you_want_to_recruit"] = "Voulez-vous recruter %s?", + ["employee"] = "employé", + ["employee_list"] = "liste des employés", + ["employee_management"] = "gestion employés", + ["fire"] = "licencier", + ["grade"] = "grade", + ["have_deposited"] = "vous avez déposé ~r~$%s", + ["have_withdrawn"] = "vous avez retiré $%s", + ["invalid_amount"] = "montant invalide", + ["invalid_amount_max"] = "ce salaire est non réglementaire", + ["no"] = "non", + ["promote"] = "promouvoir", + ["promote_employee"] = "promouvoir %s", + ["recruit"] = "recruter", + ["recruiting"] = "recrutement", + ["salary_amount"] = "montant du salaire", + ["salary_management"] = "gestion salaires", + ["wash_money"] = "blanchir argent", + ["wash_money_amount"] = "montant à blanchir", + ["withdraw_amount"] = "montant du retrait", + ["withdraw_society_money"] = "retirer argent société", + ["yes"] = "oui", + ["you_have"] = "vous avez $%s en attente de ~r~blanchiement (24h).", + ["you_have_laundered"] = "vous avez ~r~blanchi votre argent : $%s", + ["you_have_hired"] = "Vous avez recruté %s", + ["you_have_been_hired"] = "Vous avez été recruté dans la société %s", + ["you_have_fired"] = "Vous avez viré %s", + ["you_have_been_fired"] = "Vous avez été viré de la société %s", + ["you_have_promoted"] = "Vous avez promu %s en tant que %s", + ["you_have_been_promoted"] = "Vous avez été promu", } diff --git a/server-data/resources/[esx]/esx_society/locales/hu.lua b/server-data/resources/[esx]/esx_society/locales/hu.lua index f60230cfb..f4330aaab 100644 --- a/server-data/resources/[esx]/esx_society/locales/hu.lua +++ b/server-data/resources/[esx]/esx_society/locales/hu.lua @@ -1,37 +1,37 @@ -Locales['hu'] = { - ['actions'] = 'Cselekvések', - ['boss_menu'] = 'Fönök Menü', - ['money_generic'] = '%s $', - ['deposit_amount'] = 'Frakcio pénz berakása', - ['deposit_society_money'] = 'Frakcio pénz berakása', - ['do_you_want_to_recruit'] = 'Felszeretnéd venni %s?', - ['employee'] = 'Munkavállalo', - ['employee_list'] = 'Munkavállalok Listája', - ['employee_management'] = 'Munkavállalok Kezelése', - ['fire'] = 'Kirugás', - ['grade'] = 'Fokozat', - ['have_deposited'] = 'Sikeresen beraktál ~r~%s $', - ['have_withdrawn'] = 'Sikeresen kivettél %s $', - ['invalid_amount'] = 'Érvénytelen mennyiség', - ['invalid_amount_max'] = 'Ez az összeg több mint a megengedett', - ['no'] = 'Nem', - ['promote'] = 'Elöléptetés', - ['promote_employee'] = 'Elöléptetés %s', - ['recruit'] = 'Felvétel', - ['recruiting'] = 'Felvétel', - ['salary_amount'] = 'Fizetés', - ['salary_management'] = 'Fizetések kezelése', - ['wash_money'] = 'Pénz mosás', - ['wash_money_amount'] = 'Piszkos pénz mennyiség', - ['withdraw_amount'] = 'Pénz mennyiség', - ['withdraw_society_money'] = 'Frakcio pénz kivétele', - ['yes'] = 'Igen', - ['you_have'] = '%s$ várakozik a pénzmosásra (24h).', - ['you_have_laundered'] = '~r~Kimostál ennyi pénzt: %s$', - ['you_have_hired'] = 'Sikeresen felvetted %s', - ['you_have_been_hired'] = 'Sikeresen fel lettél véve %s', - ['you_have_fired'] = 'Sikeresen kirugtad %s', - ['you_have_been_fired'] = 'Ki lettél rugva innen: %s', - ['you_have_promoted'] = 'Elöléptettek: %s rang: %s', - ['you_have_been_promoted'] = 'Sikeresen elöléptettek!', +Locales["hu"] = { + ["actions"] = "Cselekvések", + ["boss_menu"] = "Fönök Menü", + ["money_generic"] = "%s $", + ["deposit_amount"] = "Frakcio pénz berakása", + ["deposit_society_money"] = "Frakcio pénz berakása", + ["do_you_want_to_recruit"] = "Felszeretnéd venni %s?", + ["employee"] = "Munkavállalo", + ["employee_list"] = "Munkavállalok Listája", + ["employee_management"] = "Munkavállalok Kezelése", + ["fire"] = "Kirugás", + ["grade"] = "Fokozat", + ["have_deposited"] = "Sikeresen beraktál ~r~%s $", + ["have_withdrawn"] = "Sikeresen kivettél %s $", + ["invalid_amount"] = "Érvénytelen mennyiség", + ["invalid_amount_max"] = "Ez az összeg több mint a megengedett", + ["no"] = "Nem", + ["promote"] = "Elöléptetés", + ["promote_employee"] = "Elöléptetés %s", + ["recruit"] = "Felvétel", + ["recruiting"] = "Felvétel", + ["salary_amount"] = "Fizetés", + ["salary_management"] = "Fizetések kezelése", + ["wash_money"] = "Pénz mosás", + ["wash_money_amount"] = "Piszkos pénz mennyiség", + ["withdraw_amount"] = "Pénz mennyiség", + ["withdraw_society_money"] = "Frakcio pénz kivétele", + ["yes"] = "Igen", + ["you_have"] = "%s$ várakozik a pénzmosásra (24h).", + ["you_have_laundered"] = "~r~Kimostál ennyi pénzt: %s$", + ["you_have_hired"] = "Sikeresen felvetted %s", + ["you_have_been_hired"] = "Sikeresen fel lettél véve %s", + ["you_have_fired"] = "Sikeresen kirugtad %s", + ["you_have_been_fired"] = "Ki lettél rugva innen: %s", + ["you_have_promoted"] = "Elöléptettek: %s rang: %s", + ["you_have_been_promoted"] = "Sikeresen elöléptettek!", } diff --git a/server-data/resources/[esx]/esx_society/locales/it.lua b/server-data/resources/[esx]/esx_society/locales/it.lua index f009412c2..87ed52634 100644 --- a/server-data/resources/[esx]/esx_society/locales/it.lua +++ b/server-data/resources/[esx]/esx_society/locales/it.lua @@ -1,43 +1,43 @@ -Locales['it'] = { - ['actions'] = 'azioni', - ['boss_menu'] = 'boss menu', - ['money_generic'] = '$%s', - ['deposit_amount'] = 'importo del deposito', - ['deposit_society_money'] = 'depositare i soldi della società', - ['do_you_want_to_recruit'] = 'vuoi assumere %s?', - ['employee'] = 'dipendente', - ['employee_list'] = 'lista dipendenti', - ['employee_management'] = 'gestione dipendenti', - ['fire'] = 'licenzia', - ['grade'] = 'grado', - ['have_deposited'] = 'hai depositato ~r~$%s', - ['have_withdrawn'] = 'hai prelevato $%s', - ['check_balance'] = 'il saldo è ~g~$%s', - ['invalid_amount'] = 'importo non valido', - ['invalid_amount_max'] = 'quel salario non è consentito', - ['no'] = 'no', - ['promote'] = 'promuovi', - ['promote_employee'] = 'promuovere il dipendente %s', - ['recruit'] = 'reclutare', - ['recruiting'] = 'reclutamento', - ['salary_amount'] = 'importo dello stipendio', - ['salary_management'] = 'gestione stipendi', - ['grade_management'] = 'gestione gradi dipendenti', - ['grade_label'] = 'gradi', - ['check_society_balance'] = 'controllo bilancio società', - ['wash_money'] = 'ricicla denaro', - ['wash_money_amount'] = 'importo da riciclare', - ['withdraw_amount'] = 'ritira importo', - ['withdraw_society_money'] = 'ritira i soldi dalla società', - ['yes'] = 'si', - ['you_have'] = 'hai $%s in attesa di riciclaggio (24h).', - ['you_have_laundered'] = 'hai ~r~riciclato i tuoi soldi: $%s', - ['you_have_hired'] = 'hai assunto %s', - ['you_have_been_hired'] = 'sei stato assunto da %s', - ['you_have_fired'] = 'hai licenziato %s', - ['you_have_been_fired'] = 'sei stato licenziato da %s', - ['you_have_promoted'] = 'hai promosso %s come %s', - ['you_have_been_promoted'] = 'hai avuto una promozione!', - ['invalid_value'] = 'valore non valido', - ['invalid_value_nochanges']= 'valore non valido nessuna modifica applicata', -} \ No newline at end of file +Locales["it"] = { + ["actions"] = "azioni", + ["boss_menu"] = "boss menu", + ["money_generic"] = "$%s", + ["deposit_amount"] = "importo del deposito", + ["deposit_society_money"] = "depositare i soldi della società", + ["do_you_want_to_recruit"] = "vuoi assumere %s?", + ["employee"] = "dipendente", + ["employee_list"] = "lista dipendenti", + ["employee_management"] = "gestione dipendenti", + ["fire"] = "licenzia", + ["grade"] = "grado", + ["have_deposited"] = "hai depositato ~r~$%s", + ["have_withdrawn"] = "hai prelevato $%s", + ["check_balance"] = "il saldo è ~g~$%s", + ["invalid_amount"] = "importo non valido", + ["invalid_amount_max"] = "quel salario non è consentito", + ["no"] = "no", + ["promote"] = "promuovi", + ["promote_employee"] = "promuovere il dipendente %s", + ["recruit"] = "reclutare", + ["recruiting"] = "reclutamento", + ["salary_amount"] = "importo dello stipendio", + ["salary_management"] = "gestione stipendi", + ["grade_management"] = "gestione gradi dipendenti", + ["grade_label"] = "gradi", + ["check_society_balance"] = "controllo bilancio società", + ["wash_money"] = "ricicla denaro", + ["wash_money_amount"] = "importo da riciclare", + ["withdraw_amount"] = "ritira importo", + ["withdraw_society_money"] = "ritira i soldi dalla società", + ["yes"] = "si", + ["you_have"] = "hai $%s in attesa di riciclaggio (24h).", + ["you_have_laundered"] = "hai ~r~riciclato i tuoi soldi: $%s", + ["you_have_hired"] = "hai assunto %s", + ["you_have_been_hired"] = "sei stato assunto da %s", + ["you_have_fired"] = "hai licenziato %s", + ["you_have_been_fired"] = "sei stato licenziato da %s", + ["you_have_promoted"] = "hai promosso %s come %s", + ["you_have_been_promoted"] = "hai avuto una promozione!", + ["invalid_value"] = "valore non valido", + ["invalid_value_nochanges"] = "valore non valido nessuna modifica applicata", +} diff --git a/server-data/resources/[esx]/esx_society/locales/nl.lua b/server-data/resources/[esx]/esx_society/locales/nl.lua index 0a5d9c74c..607cd158b 100644 --- a/server-data/resources/[esx]/esx_society/locales/nl.lua +++ b/server-data/resources/[esx]/esx_society/locales/nl.lua @@ -1,38 +1,37 @@ -Locales['nl'] = { - ['actions'] = 'acties', - ['boss_menu'] = 'baas menu', - ['money_generic'] = '€%s', - ['deposit_amount'] = 'stort hoeveelheid', - ['deposit_society_money'] = 'stort maatschappij geld', - ['do_you_want_to_recruit'] = 'Wil je %s aannemen?', - ['employee'] = 'werknemer', - ['employee_list'] = 'werknemer lijst', - ['employee_management'] = 'werknemer beheer', - ['fire'] = 'ontslaan', - ['grade'] = 'schaal', - ['have_deposited'] = 'je hebt gestort ~r~$%s', - ['have_withdrawn'] = 'je hebt opgenomen $%s', - ['invalid_amount'] = 'ongeldige hoeveelheid', - ['invalid_amount_max'] = 'dit salaris is niet toegestaan', - ['no'] = 'nee', - ['promote'] = 'promoveer', - ['promote_employee'] = 'promoveer %s', - ['recruit'] = 'werv', - ['recruiting'] = 'werven', - ['salary_amount'] = 'salaris hoeveelheid', - ['salary_management'] = 'salaris beheer', - ['wash_money'] = 'witwas geld', - ['wash_money_amount'] = 'hoeveelheid om wit te wassen', - ['withdraw_amount'] = 'opneem hoeveelheid', - ['withdraw_society_money'] = 'neem maatschappelijk geld op', - ['yes'] = 'ja', - ['you_have'] = 'je hebt €%s staan in geld witwassen (24h).', - ['you_have_laundered'] = 'je hebt je geld: €%s ~r~witgewassen ', - ['you_have_hired'] = 'je bent gevraagt %s', - ['you_have_been_hired'] = 'je bent aangenomen door %s', - ['you_have_fired'] = 'je bent ontslagen %s', - ['you_have_been_fired'] = 'je bent ondslagen van %s', - ['you_have_promoted'] = 'je hebt gepromoveerd %s naar %s', - ['you_have_been_promoted'] = 'je bent gepromoveerd!', +Locales["nl"] = { + ["actions"] = "acties", + ["boss_menu"] = "baas menu", + ["money_generic"] = "€%s", + ["deposit_amount"] = "stort hoeveelheid", + ["deposit_society_money"] = "stort maatschappij geld", + ["do_you_want_to_recruit"] = "Wil je %s aannemen?", + ["employee"] = "werknemer", + ["employee_list"] = "werknemer lijst", + ["employee_management"] = "werknemer beheer", + ["fire"] = "ontslaan", + ["grade"] = "schaal", + ["have_deposited"] = "je hebt gestort ~r~$%s", + ["have_withdrawn"] = "je hebt opgenomen $%s", + ["invalid_amount"] = "ongeldige hoeveelheid", + ["invalid_amount_max"] = "dit salaris is niet toegestaan", + ["no"] = "nee", + ["promote"] = "promoveer", + ["promote_employee"] = "promoveer %s", + ["recruit"] = "werv", + ["recruiting"] = "werven", + ["salary_amount"] = "salaris hoeveelheid", + ["salary_management"] = "salaris beheer", + ["wash_money"] = "witwas geld", + ["wash_money_amount"] = "hoeveelheid om wit te wassen", + ["withdraw_amount"] = "opneem hoeveelheid", + ["withdraw_society_money"] = "neem maatschappelijk geld op", + ["yes"] = "ja", + ["you_have"] = "je hebt €%s staan in geld witwassen (24h).", + ["you_have_laundered"] = "je hebt je geld: €%s ~r~witgewassen ", + ["you_have_hired"] = "je bent gevraagt %s", + ["you_have_been_hired"] = "je bent aangenomen door %s", + ["you_have_fired"] = "je bent ontslagen %s", + ["you_have_been_fired"] = "je bent ondslagen van %s", + ["you_have_promoted"] = "je hebt gepromoveerd %s naar %s", + ["you_have_been_promoted"] = "je bent gepromoveerd!", } - diff --git a/server-data/resources/[esx]/esx_society/locales/pl.lua b/server-data/resources/[esx]/esx_society/locales/pl.lua index d2051df65..ef52a54a0 100644 --- a/server-data/resources/[esx]/esx_society/locales/pl.lua +++ b/server-data/resources/[esx]/esx_society/locales/pl.lua @@ -1,37 +1,37 @@ -Locales['pl'] = { - ['actions'] = 'akcje', - ['boss_menu'] = 'boss menu', - ['money_generic'] = '$%s', - ['deposit_amount'] = 'ilość depozytu', - ['deposit_society_money'] = 'zdeponuj społeczne pieniądze', - ['do_you_want_to_recruit'] = 'czy chcesz zrekrutować %s?', - ['employee'] = 'pracownik', - ['employee_list'] = 'lista pracowników', - ['employee_management'] = 'zarządzanie pracownikami', - ['fire'] = 'zwolnij', - ['grade'] = 'stopień', - ['have_deposited'] = 'zdeponowałeś ~r~$%s', - ['have_withdrawn'] = 'wypłaciłeś $%s', - ['invalid_amount'] = 'nieprawidłowa wartość', - ['invalid_amount_max'] = 'that salary is not allowed', - ['no'] = 'nie', - ['promote'] = 'awansuj', - ['promote_employee'] = 'awansuj %s', - ['recruit'] = 'zrekrutuj', - ['recruiting'] = 'rekrutacja', - ['salary_amount'] = 'wartość wynagrodzenia', - ['salary_management'] = 'zarządzaj wynagrodzeniem', - ['wash_money'] = 'wypierz pieniądze', - ['wash_money_amount'] = 'wartość do wyprania', - ['withdraw_amount'] = 'wartość wypłaty', - ['withdraw_society_money'] = 'wypłać społeczne pieniądze', - ['yes'] = 'tak', - ['you_have'] = 'masz %s$ czekanie w pralni pieniędzmi (24h).', - ['you_have_laundered'] = '~r~Wyprałeś twoje pieniądze: $%s', - ['you_have_hired'] = 'zatrudniłeś %s', - ['you_have_been_hired'] = 'zostałeś zatrudniony przez %s', - ['you_have_fired'] = 'zwolniłeś %s', - ['you_have_been_fired'] = 'zostałeś zwolniony %s', - ['you_have_promoted'] = 'awansowałeś %s na %s', - ['you_have_been_promoted'] = 'zostałeś awansowany', +Locales["pl"] = { + ["actions"] = "akcje", + ["boss_menu"] = "boss menu", + ["money_generic"] = "$%s", + ["deposit_amount"] = "ilość depozytu", + ["deposit_society_money"] = "zdeponuj społeczne pieniądze", + ["do_you_want_to_recruit"] = "czy chcesz zrekrutować %s?", + ["employee"] = "pracownik", + ["employee_list"] = "lista pracowników", + ["employee_management"] = "zarządzanie pracownikami", + ["fire"] = "zwolnij", + ["grade"] = "stopień", + ["have_deposited"] = "zdeponowałeś ~r~$%s", + ["have_withdrawn"] = "wypłaciłeś $%s", + ["invalid_amount"] = "nieprawidłowa wartość", + ["invalid_amount_max"] = "that salary is not allowed", + ["no"] = "nie", + ["promote"] = "awansuj", + ["promote_employee"] = "awansuj %s", + ["recruit"] = "zrekrutuj", + ["recruiting"] = "rekrutacja", + ["salary_amount"] = "wartość wynagrodzenia", + ["salary_management"] = "zarządzaj wynagrodzeniem", + ["wash_money"] = "wypierz pieniądze", + ["wash_money_amount"] = "wartość do wyprania", + ["withdraw_amount"] = "wartość wypłaty", + ["withdraw_society_money"] = "wypłać społeczne pieniądze", + ["yes"] = "tak", + ["you_have"] = "masz %s$ czekanie w pralni pieniędzmi (24h).", + ["you_have_laundered"] = "~r~Wyprałeś twoje pieniądze: $%s", + ["you_have_hired"] = "zatrudniłeś %s", + ["you_have_been_hired"] = "zostałeś zatrudniony przez %s", + ["you_have_fired"] = "zwolniłeś %s", + ["you_have_been_fired"] = "zostałeś zwolniony %s", + ["you_have_promoted"] = "awansowałeś %s na %s", + ["you_have_been_promoted"] = "zostałeś awansowany", } diff --git a/server-data/resources/[esx]/esx_society/locales/si.lua b/server-data/resources/[esx]/esx_society/locales/si.lua index 5ca0d1a37..bd8d905c5 100644 --- a/server-data/resources/[esx]/esx_society/locales/si.lua +++ b/server-data/resources/[esx]/esx_society/locales/si.lua @@ -1,37 +1,37 @@ -Locales['si'] = { - ['actions'] = 'actions', - ['boss_menu'] = 'meni šefa', - ['money_generic'] = '$%s', - ['deposit_amount'] = 'znesek depozita', - ['deposit_society_money'] = 'denar za depozit družbe', - ['do_you_want_to_recruit'] = "ali želite zaposliti %s?", - ['employee'] = 'zaposleni', - ['employee_list'] = 'seznam zaposlenih', - ['employee_management'] = 'upravljanje zaposlenih', - ['fire'] = 'ogenj', - ['grade'] = 'razred', - ['have_deposited'] = 'deponirali ste ~r~$%s', - ['have_withdrawn'] = 'umaknili ste $%s', - ['invalid_amount'] = 'neveljaven znesek', - ['invalid_amount_max'] = 'ta plača ni dovoljena', - ['no'] = 'ne', - ['promote'] = 'spodbujam', - ['promote_employee'] = 'promoviraj %s', - ['recruit'] = 'zaposli', - ["recruiting"] = "recruiting", - ["salary_amount"] = "znesek plače", - ['salary_management'] = 'upravljanje plač', - ['wash_money'] = 'pranje denarja', - ['wash_money_amount'] = 'znesek za pranje', - ['withdraw_amount'] = 'znesek za izplačilo', - ['withdraw_society_money'] = 'umakni denar iz družbe', - ['yes'] = 'da', - ['you_have'] = 'imaš $%s, ki čaka v money laundering (24h).', - ['you_have_laundered'] = 'imaš ~r~laundered svoj denar: $%s', - ['you_have_hired'] = 'zaposlil si %s', - ['you_have_been_hired'] = 'najel vas je %s', - ['you_have_fired'] = 'odpustili ste %s', - ['you_have_been_fired'] = 'ste bili odpuščeni iz %s', - ['you_have_promoted'] = 'napredovali ste %s kot %s', - ['you_have_been_promoted'] = 'bil si promoviran!', +Locales["si"] = { + ["actions"] = "actions", + ["boss_menu"] = "meni šefa", + ["money_generic"] = "$%s", + ["deposit_amount"] = "znesek depozita", + ["deposit_society_money"] = "denar za depozit družbe", + ["do_you_want_to_recruit"] = "ali želite zaposliti %s?", + ["employee"] = "zaposleni", + ["employee_list"] = "seznam zaposlenih", + ["employee_management"] = "upravljanje zaposlenih", + ["fire"] = "ogenj", + ["grade"] = "razred", + ["have_deposited"] = "deponirali ste ~r~$%s", + ["have_withdrawn"] = "umaknili ste $%s", + ["invalid_amount"] = "neveljaven znesek", + ["invalid_amount_max"] = "ta plača ni dovoljena", + ["no"] = "ne", + ["promote"] = "spodbujam", + ["promote_employee"] = "promoviraj %s", + ["recruit"] = "zaposli", + ["recruiting"] = "recruiting", + ["salary_amount"] = "znesek plače", + ["salary_management"] = "upravljanje plač", + ["wash_money"] = "pranje denarja", + ["wash_money_amount"] = "znesek za pranje", + ["withdraw_amount"] = "znesek za izplačilo", + ["withdraw_society_money"] = "umakni denar iz družbe", + ["yes"] = "da", + ["you_have"] = "imaš $%s, ki čaka v money laundering (24h).", + ["you_have_laundered"] = "imaš ~r~laundered svoj denar: $%s", + ["you_have_hired"] = "zaposlil si %s", + ["you_have_been_hired"] = "najel vas je %s", + ["you_have_fired"] = "odpustili ste %s", + ["you_have_been_fired"] = "ste bili odpuščeni iz %s", + ["you_have_promoted"] = "napredovali ste %s kot %s", + ["you_have_been_promoted"] = "bil si promoviran!", } diff --git a/server-data/resources/[esx]/esx_society/locales/sr.lua b/server-data/resources/[esx]/esx_society/locales/sr.lua index 2c037708a..ef87582ba 100644 --- a/server-data/resources/[esx]/esx_society/locales/sr.lua +++ b/server-data/resources/[esx]/esx_society/locales/sr.lua @@ -1,43 +1,43 @@ -Locales['sr'] = { - ['actions'] = 'Akcije', - ['boss_menu'] = 'Šef Meni', - ['money_generic'] = '$%s', - ['deposit_amount'] = 'Iznos depozita', - ['deposit_society_money'] = 'Ostavi novac firme', - ['do_you_want_to_recruit'] = 'Da li želiš da regrutuješ %s?', - ['employee'] = 'Radnik', - ['employee_list'] = 'Lista radnika', - ['employee_management'] = 'Upravljanje zaposlenima', - ['fire'] = 'Otpusti', - ['grade'] = 'Rank', - ['have_deposited'] = 'Ostavili ste ~r~$%s', - ['have_withdrawn'] = 'Podigli ste $%s', - ['check_balance'] = 'Balans: ~g~$%s', - ['invalid_amount'] = 'Nevažeći iznos', - ['invalid_amount_max'] = 'Tolika plata nije dozvoljena', - ['invalid_value'] = 'Nevažeći iznos', - ['invalid_value_nochanges']= 'Nevažeći iznos, izmene nisu sacuvane', - ['no'] = 'Ne', - ['promote'] = 'Unapredi', - ['promote_employee'] = 'Unapredi %s', - ['recruit'] = 'Zaposli', - ['recruiting'] = 'Zapošljavanje', - ['salary_amount'] = 'Visina plate', - ['salary_management'] = 'Upravljanje platom', - ['grade_management'] = 'Upravljanje nazivom ranka', - ['grade_label'] = 'Naziv ranka', - ['check_society_balance'] = 'Proverite stanje na računu firme', - ['wash_money'] = 'Operi novac', - ['wash_money_amount'] = 'Iznos novca za pranje', - ['withdraw_amount'] = 'Iznos za podizanje', - ['withdraw_society_money'] = 'Podigni novac sa računa firme', - ['yes'] = 'Da', - ['you_have'] = 'Imate $%s koji čekaju za pranje (24h).', - ['you_have_laundered'] = 'Oprali ste ~r~vaš novac: $%s', - ['you_have_hired'] = 'Zaposlili ste %s', - ['you_have_been_hired'] = 'Zaposleni ste od strane %s', - ['you_have_fired'] = 'Otpustili ste %s', - ['you_have_been_fired'] = 'Otpušteni ste od strane %s', - ['you_have_promoted'] = 'Unapredili ste %s na %s', - ['you_have_been_promoted'] = 'Vi ste unapređeni!' -} \ No newline at end of file +Locales["sr"] = { + ["actions"] = "Akcije", + ["boss_menu"] = "Šef Meni", + ["money_generic"] = "$%s", + ["deposit_amount"] = "Iznos depozita", + ["deposit_society_money"] = "Ostavi novac firme", + ["do_you_want_to_recruit"] = "Da li želiš da regrutuješ %s?", + ["employee"] = "Radnik", + ["employee_list"] = "Lista radnika", + ["employee_management"] = "Upravljanje zaposlenima", + ["fire"] = "Otpusti", + ["grade"] = "Rank", + ["have_deposited"] = "Ostavili ste ~r~$%s", + ["have_withdrawn"] = "Podigli ste $%s", + ["check_balance"] = "Balans: ~g~$%s", + ["invalid_amount"] = "Nevažeći iznos", + ["invalid_amount_max"] = "Tolika plata nije dozvoljena", + ["invalid_value"] = "Nevažeći iznos", + ["invalid_value_nochanges"] = "Nevažeći iznos, izmene nisu sacuvane", + ["no"] = "Ne", + ["promote"] = "Unapredi", + ["promote_employee"] = "Unapredi %s", + ["recruit"] = "Zaposli", + ["recruiting"] = "Zapošljavanje", + ["salary_amount"] = "Visina plate", + ["salary_management"] = "Upravljanje platom", + ["grade_management"] = "Upravljanje nazivom ranka", + ["grade_label"] = "Naziv ranka", + ["check_society_balance"] = "Proverite stanje na računu firme", + ["wash_money"] = "Operi novac", + ["wash_money_amount"] = "Iznos novca za pranje", + ["withdraw_amount"] = "Iznos za podizanje", + ["withdraw_society_money"] = "Podigni novac sa računa firme", + ["yes"] = "Da", + ["you_have"] = "Imate $%s koji čekaju za pranje (24h).", + ["you_have_laundered"] = "Oprali ste ~r~vaš novac: $%s", + ["you_have_hired"] = "Zaposlili ste %s", + ["you_have_been_hired"] = "Zaposleni ste od strane %s", + ["you_have_fired"] = "Otpustili ste %s", + ["you_have_been_fired"] = "Otpušteni ste od strane %s", + ["you_have_promoted"] = "Unapredili ste %s na %s", + ["you_have_been_promoted"] = "Vi ste unapređeni!", +} diff --git a/server-data/resources/[esx]/esx_society/locales/sv.lua b/server-data/resources/[esx]/esx_society/locales/sv.lua index 217009749..68b9a7795 100644 --- a/server-data/resources/[esx]/esx_society/locales/sv.lua +++ b/server-data/resources/[esx]/esx_society/locales/sv.lua @@ -1,37 +1,37 @@ -Locales['sv'] = { - ['actions'] = 'handlingar', - ['boss_menu'] = 'chefmeny', - ['money_generic'] = '%s SEK', - ['deposit_amount'] = 'insättningsbelopp', - ['deposit_society_money'] = 'insätt samhälls pengar', - ['do_you_want_to_recruit'] = 'vill du anställa %s?', - ['employee'] = 'anställd', - ['employee_list'] = 'anställningslista', - ['employee_management'] = 'medarbetarhantering', - ['fire'] = 'sparka', - ['grade'] = 'grade', - ['have_deposited'] = 'du har satt in ~r~%s SEK', - ['have_withdrawn'] = 'du har tagit ut %s SEK', - ['invalid_amount'] = 'ogiltigt belopp', - ['invalid_amount_max'] = 'den lönen är inte tillåten', - ['no'] = 'nej', - ['promote'] = 'befodra', - ['promote_employee'] = 'befodra %s', - ['recruit'] = 'rekrytera', - ['recruiting'] = 'rekrytering', - ['salary_amount'] = 'lön belopp', - ['salary_management'] = 'lönhantering', - ['wash_money'] = 'tvätta pengar', - ['wash_money_amount'] = 'belopp att tvätta', - ['withdraw_amount'] = 'Ta ut summan', - ['withdraw_society_money'] = 'ta ut samhällspengar', - ['yes'] = 'ja', - ['you_have'] = 'du har %s SEK som väntar på pengartvätt (24h).', - ['you_have_laundered'] = 'du har ~r~tvättat dina pengar: %s SEK', - ['you_have_hired'] = 'du har anställt %s', - ['you_have_been_hired'] = 'du har blivit anställd utav %s', - ['you_have_fired'] = 'du har ~r~sparkat %s', - ['you_have_been_fired'] = 'du har blivit ~r~sparkad utav %s', - ['you_have_promoted'] = 'du har befodrat %s till %s', - ['you_have_been_promoted'] = 'du har blivit befodrad', +Locales["sv"] = { + ["actions"] = "handlingar", + ["boss_menu"] = "chefmeny", + ["money_generic"] = "%s SEK", + ["deposit_amount"] = "insättningsbelopp", + ["deposit_society_money"] = "insätt samhälls pengar", + ["do_you_want_to_recruit"] = "vill du anställa %s?", + ["employee"] = "anställd", + ["employee_list"] = "anställningslista", + ["employee_management"] = "medarbetarhantering", + ["fire"] = "sparka", + ["grade"] = "grade", + ["have_deposited"] = "du har satt in ~r~%s SEK", + ["have_withdrawn"] = "du har tagit ut %s SEK", + ["invalid_amount"] = "ogiltigt belopp", + ["invalid_amount_max"] = "den lönen är inte tillåten", + ["no"] = "nej", + ["promote"] = "befodra", + ["promote_employee"] = "befodra %s", + ["recruit"] = "rekrytera", + ["recruiting"] = "rekrytering", + ["salary_amount"] = "lön belopp", + ["salary_management"] = "lönhantering", + ["wash_money"] = "tvätta pengar", + ["wash_money_amount"] = "belopp att tvätta", + ["withdraw_amount"] = "Ta ut summan", + ["withdraw_society_money"] = "ta ut samhällspengar", + ["yes"] = "ja", + ["you_have"] = "du har %s SEK som väntar på pengartvätt (24h).", + ["you_have_laundered"] = "du har ~r~tvättat dina pengar: %s SEK", + ["you_have_hired"] = "du har anställt %s", + ["you_have_been_hired"] = "du har blivit anställd utav %s", + ["you_have_fired"] = "du har ~r~sparkat %s", + ["you_have_been_fired"] = "du har blivit ~r~sparkad utav %s", + ["you_have_promoted"] = "du har befodrat %s till %s", + ["you_have_been_promoted"] = "du har blivit befodrad", } diff --git a/server-data/resources/[esx]/esx_society/locales/tr.lua b/server-data/resources/[esx]/esx_society/locales/tr.lua index b2bb0c16b..cfe370e62 100644 --- a/server-data/resources/[esx]/esx_society/locales/tr.lua +++ b/server-data/resources/[esx]/esx_society/locales/tr.lua @@ -1,37 +1,37 @@ -Locales['tr'] = { - ['actions'] = 'eylemler', - ['boss_menu'] = 'patron menüsü', - ['money_generic'] = '%s TL', - ['deposit_amount'] = 'yatırılacak miktar', - ['deposit_society_money'] = 'şirkete para yatır', - ['do_you_want_to_recruit'] = '%s adlı kişiyi işe almak istiyor musun?', - ['employee'] = 'işçi', - ['employee_list'] = 'işçi listesi', - ['employee_management'] = 'işçi yönetimi', - ['fire'] = 'kov', - ['grade'] = 'kıdem ver', - ['have_deposited'] = '~r~%s lira yatırdın', - ['have_withdrawn'] = '$%s lira çektin', - ['invalid_amount'] = 'miktar hatalı', - ['invalid_amount_max'] = 'bu maaşa izin verilmiyor', - ['no'] = 'hayır', - ['promote'] = 'yükseltme', - ['promote_employee'] = 'yükselt %s', - ['recruit'] = 'işe al', - ['recruiting'] = 'işe alım', - ['salary_amount'] = 'maaş miktarı', - ['salary_management'] = 'maaş yönetimi', - ['wash_money'] = 'para akla', - ['wash_money_amount'] = 'aklanacak miktar', - ['withdraw_amount'] = 'çekilecek miktar', - ['withdraw_society_money'] = 'çekilecek şirket parası', - ['yes'] = 'evet', - ['you_have'] = '%s Lira para zaten aklanmayı bekliyor (24s).', - ['you_have_laundered'] = '%s Lira para ~r~akladın', - ['you_have_hired'] = '%s adlı kişiyi işe aldın', - ['you_have_been_hired'] = '%s tarafından işe alındın', - ['you_have_fired'] = '%s adlı kişi kovuldu', - ['you_have_been_fired'] = '%s tarafından kovuldun', - ['you_have_promoted'] = '%s olan kıdemin, %s yükseltildi', - ['you_have_been_promoted'] = 'Kıdem aldın!', +Locales["tr"] = { + ["actions"] = "eylemler", + ["boss_menu"] = "patron menüsü", + ["money_generic"] = "%s TL", + ["deposit_amount"] = "yatırılacak miktar", + ["deposit_society_money"] = "şirkete para yatır", + ["do_you_want_to_recruit"] = "%s adlı kişiyi işe almak istiyor musun?", + ["employee"] = "işçi", + ["employee_list"] = "işçi listesi", + ["employee_management"] = "işçi yönetimi", + ["fire"] = "kov", + ["grade"] = "kıdem ver", + ["have_deposited"] = "~r~%s lira yatırdın", + ["have_withdrawn"] = "$%s lira çektin", + ["invalid_amount"] = "miktar hatalı", + ["invalid_amount_max"] = "bu maaşa izin verilmiyor", + ["no"] = "hayır", + ["promote"] = "yükseltme", + ["promote_employee"] = "yükselt %s", + ["recruit"] = "işe al", + ["recruiting"] = "işe alım", + ["salary_amount"] = "maaş miktarı", + ["salary_management"] = "maaş yönetimi", + ["wash_money"] = "para akla", + ["wash_money_amount"] = "aklanacak miktar", + ["withdraw_amount"] = "çekilecek miktar", + ["withdraw_society_money"] = "çekilecek şirket parası", + ["yes"] = "evet", + ["you_have"] = "%s Lira para zaten aklanmayı bekliyor (24s).", + ["you_have_laundered"] = "%s Lira para ~r~akladın", + ["you_have_hired"] = "%s adlı kişiyi işe aldın", + ["you_have_been_hired"] = "%s tarafından işe alındın", + ["you_have_fired"] = "%s adlı kişi kovuldu", + ["you_have_been_fired"] = "%s tarafından kovuldun", + ["you_have_promoted"] = "%s olan kıdemin, %s yükseltildi", + ["you_have_been_promoted"] = "Kıdem aldın!", } diff --git a/server-data/resources/[esx]/esx_society/locales/zh-cn.lua b/server-data/resources/[esx]/esx_society/locales/zh-cn.lua index ba0b57734..8c1b253ed 100644 --- a/server-data/resources/[esx]/esx_society/locales/zh-cn.lua +++ b/server-data/resources/[esx]/esx_society/locales/zh-cn.lua @@ -1,43 +1,43 @@ -Locales['zh-cn'] = { - ['actions'] = '可操作功能', - ['boss_menu'] = '人事管理', - ['money_generic'] = '$%s', - ['deposit_amount'] = '存款金额', - ['deposit_society_money'] = '存放资金', - ['do_you_want_to_recruit'] = '确认招聘:%s?', - ['employee'] = '人事管理', - ['employee_list'] = '员工列表', - ['employee_management'] = '员工管理', - ['fire'] = '开除', - ['grade'] = '职位职称', - ['have_deposited'] = '成功存入资金:~r~$%s', - ['have_withdrawn'] = '成功取出资金:$%s', - ['check_balance'] = '当前余额: ~g~$%s', - ['invalid_amount'] = '无效的金额输入!请重新检查', - ['invalid_amount_max'] = '此次的薪资水平设置失败!请重新设置', - ['invalid_value'] = '输入为无效值', - ['invalid_value_nochanges']= '无效值,未应用任何更改', - ['no'] = '取消', - ['promote'] = '提升职称', - ['promote_employee'] = '升职到: %s', - ['recruit'] = '招募', - ['recruiting'] = '正在完成招募员工', - ['salary_amount'] = '薪资金额', - ['salary_management'] = '薪资管理', - ['grade_management'] = '职称设置', - ['grade_label'] = '设置职称', - ['check_society_balance'] = '查看余额', - ['wash_money'] = '进行洗钱', - ['wash_money_amount'] = '洗钱金额', - ['withdraw_amount'] = '取款金额', - ['withdraw_society_money'] = '提取公司公帐', - ['yes'] = '确认', - ['you_have'] = '当前一笔:$%s 的待洗钱账单!请耐心等候.', - ['you_have_laundered'] = '完成洗钱: $%s', - ['you_have_hired'] = '成功招聘:%s', - ['you_have_been_hired'] = '成功被 %s 雇佣!恭喜', - ['you_have_fired'] = '成功开除:%s', - ['you_have_been_fired'] = '您已被 %s 开除!', - ['you_have_promoted'] = '您已将 %s 提拔至:%s', - ['you_have_been_promoted'] = '您获得新职位!' -} \ No newline at end of file +Locales["zh-cn"] = { + ["actions"] = "可操作功能", + ["boss_menu"] = "人事管理", + ["money_generic"] = "$%s", + ["deposit_amount"] = "存款金额", + ["deposit_society_money"] = "存放资金", + ["do_you_want_to_recruit"] = "确认招聘:%s?", + ["employee"] = "人事管理", + ["employee_list"] = "员工列表", + ["employee_management"] = "员工管理", + ["fire"] = "开除", + ["grade"] = "职位职称", + ["have_deposited"] = "成功存入资金:~r~$%s", + ["have_withdrawn"] = "成功取出资金:$%s", + ["check_balance"] = "当前余额: ~g~$%s", + ["invalid_amount"] = "无效的金额输入!请重新检查", + ["invalid_amount_max"] = "此次的薪资水平设置失败!请重新设置", + ["invalid_value"] = "输入为无效值", + ["invalid_value_nochanges"] = "无效值,未应用任何更改", + ["no"] = "取消", + ["promote"] = "提升职称", + ["promote_employee"] = "升职到: %s", + ["recruit"] = "招募", + ["recruiting"] = "正在完成招募员工", + ["salary_amount"] = "薪资金额", + ["salary_management"] = "薪资管理", + ["grade_management"] = "职称设置", + ["grade_label"] = "设置职称", + ["check_society_balance"] = "查看余额", + ["wash_money"] = "进行洗钱", + ["wash_money_amount"] = "洗钱金额", + ["withdraw_amount"] = "取款金额", + ["withdraw_society_money"] = "提取公司公帐", + ["yes"] = "确认", + ["you_have"] = "当前一笔:$%s 的待洗钱账单!请耐心等候.", + ["you_have_laundered"] = "完成洗钱: $%s", + ["you_have_hired"] = "成功招聘:%s", + ["you_have_been_hired"] = "成功被 %s 雇佣!恭喜", + ["you_have_fired"] = "成功开除:%s", + ["you_have_been_fired"] = "您已被 %s 开除!", + ["you_have_promoted"] = "您已将 %s 提拔至:%s", + ["you_have_been_promoted"] = "您获得新职位!", +} diff --git a/server-data/resources/[esx]/esx_society/server/main.lua b/server-data/resources/[esx]/esx_society/server/main.lua index bb3ea16b0..d23b65fd8 100644 --- a/server-data/resources/[esx]/esx_society/server/main.lua +++ b/server-data/resources/[esx]/esx_society/server/main.lua @@ -2,450 +2,441 @@ local Jobs = {} local RegisteredSocieties = {} function GetSociety(name) - for i=1, #RegisteredSocieties, 1 do - if RegisteredSocieties[i].name == name then - return RegisteredSocieties[i] - end - end + for i = 1, #RegisteredSocieties, 1 do + if RegisteredSocieties[i].name == name then + return RegisteredSocieties[i] + end + end end -AddEventHandler('onResourceStart', function(resourceName) - if resourceName == GetCurrentResourceName() then - local result = MySQL.query.await('SELECT * FROM jobs') +AddEventHandler("onResourceStart", function(resourceName) + if resourceName == GetCurrentResourceName() then + local result = MySQL.query.await("SELECT * FROM jobs") - for i = 1, #result, 1 do - Jobs[result[i].name] = result[i] - Jobs[result[i].name].grades = {} - end + for i = 1, #result, 1 do + Jobs[result[i].name] = result[i] + Jobs[result[i].name].grades = {} + end - local result2 = MySQL.query.await('SELECT * FROM job_grades') + local result2 = MySQL.query.await("SELECT * FROM job_grades") - for i = 1, #result2, 1 do - Jobs[result2[i].job_name].grades[tostring(result2[i].grade)] = result2[i] - end - end + for i = 1, #result2, 1 do + Jobs[result2[i].job_name].grades[tostring(result2[i].grade)] = result2[i] + end + end end) -AddEventHandler('esx_society:registerSociety', function(name, label, account, datastore, inventory, data) - local found = false - - local society = { - name = name, - label = label, - account = account, - datastore = datastore, - inventory = inventory, - data = data - } - - for i=1, #RegisteredSocieties, 1 do - if RegisteredSocieties[i].name == name then - found, RegisteredSocieties[i] = true, society - break - end - end - - if not found then - table.insert(RegisteredSocieties, society) - end +AddEventHandler("esx_society:registerSociety", function(name, label, account, datastore, inventory, data) + local found = false + + local society = { + name = name, + label = label, + account = account, + datastore = datastore, + inventory = inventory, + data = data, + } + + for i = 1, #RegisteredSocieties, 1 do + if RegisteredSocieties[i].name == name then + found, RegisteredSocieties[i] = true, society + break + end + end + + if not found then + table.insert(RegisteredSocieties, society) + end end) -AddEventHandler('esx_society:getSocieties', function(cb) - cb(RegisteredSocieties) +AddEventHandler("esx_society:getSocieties", function(cb) + cb(RegisteredSocieties) end) -AddEventHandler('esx_society:getSociety', function(name, cb) - cb(GetSociety(name)) +AddEventHandler("esx_society:getSociety", function(name, cb) + cb(GetSociety(name)) end) -RegisterServerEvent('esx_society:checkSocietyBalance') -AddEventHandler('esx_society:checkSocietyBalance', function(society) - local xPlayer = ESX.GetPlayerFromId(source) - local society = GetSociety(society) +RegisterServerEvent("esx_society:checkSocietyBalance") +AddEventHandler("esx_society:checkSocietyBalance", function(society) + local xPlayer = ESX.GetPlayerFromId(source) + local society = GetSociety(society) - if xPlayer.job.name ~= society.name then - print(('esx_society: %s attempted to call checkSocietyBalance!'):format(xPlayer.identifier)) - return - end + if xPlayer.job.name ~= society.name then + print(("esx_society: %s attempted to call checkSocietyBalance!"):format(xPlayer.identifier)) + return + end - TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) - TriggerClientEvent("esx:showNotification", xPlayer.source, _U('check_balance', ESX.Math.GroupDigits(account.money))) - end) + TriggerEvent("esx_addonaccount:getSharedAccount", society.account, function(account) + TriggerClientEvent("esx:showNotification", xPlayer.source, _U("check_balance", ESX.Math.GroupDigits(account.money))) + end) end) -RegisterServerEvent('esx_society:withdrawMoney') -AddEventHandler('esx_society:withdrawMoney', function(societyName, amount) - local source = source - local society = GetSociety(societyName) - if not society then - print(('[^3WARNING^7] Player ^5%s^7 attempted to withdraw from non-existing society - ^5%s^7!'):format(source, societyName)) - return - end - local xPlayer = ESX.GetPlayerFromId(source) - amount = ESX.Math.Round(tonumber(amount)) - if xPlayer.job.name == society.name then - TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) - if amount > 0 and account.money >= amount then - account.removeMoney(amount) - xPlayer.addMoney(amount, "Society Withdraw") - xPlayer.showNotification(_U('have_withdrawn', ESX.Math.GroupDigits(amount))) - else - xPlayer.showNotification(_U('invalid_amount')) - end - end) - else - print(('[^3WARNING^7] Player ^5%s^7 attempted to withdraw from society - ^5%s^7!'):format(source, society.name)) - end +RegisterServerEvent("esx_society:withdrawMoney") +AddEventHandler("esx_society:withdrawMoney", function(societyName, amount) + local source = source + local society = GetSociety(societyName) + if not society then + print(("[^3WARNING^7] Player ^5%s^7 attempted to withdraw from non-existing society - ^5%s^7!"):format(source, societyName)) + return + end + local xPlayer = ESX.GetPlayerFromId(source) + amount = ESX.Math.Round(tonumber(amount)) + if xPlayer.job.name == society.name then + TriggerEvent("esx_addonaccount:getSharedAccount", society.account, function(account) + if amount > 0 and account.money >= amount then + account.removeMoney(amount) + xPlayer.addMoney(amount, "Society Withdraw") + xPlayer.showNotification(_U("have_withdrawn", ESX.Math.GroupDigits(amount))) + else + xPlayer.showNotification(_U("invalid_amount")) + end + end) + else + print(("[^3WARNING^7] Player ^5%s^7 attempted to withdraw from society - ^5%s^7!"):format(source, society.name)) + end end) -RegisterServerEvent('esx_society:depositMoney') -AddEventHandler('esx_society:depositMoney', function(societyName, amount) - local source = source - local xPlayer = ESX.GetPlayerFromId(source) - local society = GetSociety(societyName) - if not society then - print(('[^3WARNING^7] Player ^5%s^7 attempted to deposit to non-existing society - ^5%s^7!'):format(source, societyName)) - return - end - amount = ESX.Math.Round(tonumber(amount)) - - if xPlayer.job.name == society.name then - if amount > 0 and xPlayer.getMoney() >= amount then - TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) - xPlayer.removeMoney(amount, "Society Deposit") - xPlayer.showNotification(_U('have_deposited', ESX.Math.GroupDigits(amount))) - account.addMoney(amount) - end) - else - xPlayer.showNotification(_U('invalid_amount')) - end - else - print(('[^3WARNING^7] Player ^5%s^7 attempted to deposit to society - ^5%s^7!'):format(source, society.name)) - end +RegisterServerEvent("esx_society:depositMoney") +AddEventHandler("esx_society:depositMoney", function(societyName, amount) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local society = GetSociety(societyName) + if not society then + print(("[^3WARNING^7] Player ^5%s^7 attempted to deposit to non-existing society - ^5%s^7!"):format(source, societyName)) + return + end + amount = ESX.Math.Round(tonumber(amount)) + + if xPlayer.job.name == society.name then + if amount > 0 and xPlayer.getMoney() >= amount then + TriggerEvent("esx_addonaccount:getSharedAccount", society.account, function(account) + xPlayer.removeMoney(amount, "Society Deposit") + xPlayer.showNotification(_U("have_deposited", ESX.Math.GroupDigits(amount))) + account.addMoney(amount) + end) + else + xPlayer.showNotification(_U("invalid_amount")) + end + else + print(("[^3WARNING^7] Player ^5%s^7 attempted to deposit to society - ^5%s^7!"):format(source, society.name)) + end end) -RegisterServerEvent('esx_society:washMoney') -AddEventHandler('esx_society:washMoney', function(society, amount) - local source = source - local xPlayer = ESX.GetPlayerFromId(source) - local account = xPlayer.getAccount('black_money') - amount = ESX.Math.Round(tonumber(amount)) - - if xPlayer.job.name == society then - if amount and amount > 0 and account.money >= amount then - xPlayer.removeAccountMoney('black_money', amount, "Washing") - - MySQL.insert('INSERT INTO society_moneywash (identifier, society, amount) VALUES (?, ?, ?)', {xPlayer.identifier, society, amount}, - function() - xPlayer.showNotification(_U('you_have', ESX.Math.GroupDigits(amount))) - end) - else - xPlayer.showNotification(_U('invalid_amount')) - end - else - print(('[^3WARNING^7] Player ^5%s^7 attempted to wash money in society - ^5%s^7!'):format(source, society)) - end +RegisterServerEvent("esx_society:washMoney") +AddEventHandler("esx_society:washMoney", function(society, amount) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local account = xPlayer.getAccount("black_money") + amount = ESX.Math.Round(tonumber(amount)) + + if xPlayer.job.name == society then + if amount and amount > 0 and account.money >= amount then + xPlayer.removeAccountMoney("black_money", amount, "Washing") + + MySQL.insert("INSERT INTO society_moneywash (identifier, society, amount) VALUES (?, ?, ?)", { xPlayer.identifier, society, amount }, function() + xPlayer.showNotification(_U("you_have", ESX.Math.GroupDigits(amount))) + end) + else + xPlayer.showNotification(_U("invalid_amount")) + end + else + print(("[^3WARNING^7] Player ^5%s^7 attempted to wash money in society - ^5%s^7!"):format(source, society)) + end end) -RegisterServerEvent('esx_society:putVehicleInGarage') -AddEventHandler('esx_society:putVehicleInGarage', function(societyName, vehicle) - local source = source - local xPlayer = ESX.GetPlayerFromId(source) - local society = GetSociety(societyName) - if not society then - print(('[^3WARNING^7] Player ^5%s^7 attempted to put vehicle in non-existing society garage - ^5%s^7!'):format(source, societyName)) - return - end - TriggerEvent('esx_datastore:getSharedDataStore', society.datastore, function(store) - local garage = store.get('garage') or {} - table.insert(garage, vehicle) - store.set('garage', garage) - end) +RegisterServerEvent("esx_society:putVehicleInGarage") +AddEventHandler("esx_society:putVehicleInGarage", function(societyName, vehicle) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local society = GetSociety(societyName) + if not society then + print(("[^3WARNING^7] Player ^5%s^7 attempted to put vehicle in non-existing society garage - ^5%s^7!"):format(source, societyName)) + return + end + TriggerEvent("esx_datastore:getSharedDataStore", society.datastore, function(store) + local garage = store.get("garage") or {} + table.insert(garage, vehicle) + store.set("garage", garage) + end) end) -RegisterServerEvent('esx_society:removeVehicleFromGarage') -AddEventHandler('esx_society:removeVehicleFromGarage', function(societyName, vehicle) - local source = source - local xPlayer = ESX.GetPlayerFromId(source) - local society = GetSociety(societyName) - if not society then - print(('[^3WARNING^7] Player ^5%s^7 attempted to remove vehicle from non-existing society garage - ^5%s^7!'):format(source, societyName)) - return - end - TriggerEvent('esx_datastore:getSharedDataStore', society.datastore, function(store) - local garage = store.get('garage') or {} - - for i=1, #garage, 1 do - if garage[i].plate == vehicle.plate then - table.remove(garage, i) - break - end - end - - store.set('garage', garage) - end) +RegisterServerEvent("esx_society:removeVehicleFromGarage") +AddEventHandler("esx_society:removeVehicleFromGarage", function(societyName, vehicle) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local society = GetSociety(societyName) + if not society then + print(("[^3WARNING^7] Player ^5%s^7 attempted to remove vehicle from non-existing society garage - ^5%s^7!"):format(source, societyName)) + return + end + TriggerEvent("esx_datastore:getSharedDataStore", society.datastore, function(store) + local garage = store.get("garage") or {} + + for i = 1, #garage, 1 do + if garage[i].plate == vehicle.plate then + table.remove(garage, i) + break + end + end + + store.set("garage", garage) + end) end) -ESX.RegisterServerCallback('esx_society:getSocietyMoney', function(source, cb, societyName) - local society = GetSociety(societyName) - if not society then - print(('[^3WARNING^7] Player ^5%s^7 attempted to get money from non-existing society - ^5%s^7!'):format(source, societyName)) - return - end - if society then - TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) - cb(account.money) - end) - else - cb(0) - end +ESX.RegisterServerCallback("esx_society:getSocietyMoney", function(source, cb, societyName) + local society = GetSociety(societyName) + if not society then + print(("[^3WARNING^7] Player ^5%s^7 attempted to get money from non-existing society - ^5%s^7!"):format(source, societyName)) + return + end + if society then + TriggerEvent("esx_addonaccount:getSharedAccount", society.account, function(account) + cb(account.money) + end) + else + cb(0) + end end) -ESX.RegisterServerCallback('esx_society:getEmployees', function(_, cb, society) - local employees = {} - - local xPlayers = ESX.GetExtendedPlayers('job', society) - for i=1, #(xPlayers) do - local xPlayer = xPlayers[i] - - local name = xPlayer.name - if Config.EnableESXIdentity and name == GetPlayerName(xPlayer.source) then - name = xPlayer.get('firstName') .. ' ' .. xPlayer.get('lastName') - end - - table.insert(employees, { - name = name, - identifier = xPlayer.identifier, - job = { - name = society, - label = xPlayer.job.label, - grade = xPlayer.job.grade, - grade_name = xPlayer.job.grade_name, - grade_label = xPlayer.job.grade_label - } - }) - end - - local query = "SELECT identifier, job_grade FROM `users` WHERE `job`= ? ORDER BY job_grade DESC" - - if Config.EnableESXIdentity then - query = "SELECT identifier, job_grade, firstname, lastname FROM `users` WHERE `job`= ? ORDER BY job_grade DESC" - end - - MySQL.query(query, {society}, - function(result) - for _, row in pairs(result) do - local alreadyInTable - local identifier = row.identifier - - for _, v in pairs(employees) do - if v.identifier == identifier then - alreadyInTable = true - end - end - - if not alreadyInTable then - local name = "Name not found." -- maybe this should be a locale instead ¯\_(ツ)_/¯ - - if Config.EnableESXIdentity then - name = row.firstname .. ' ' .. row.lastname - end - - table.insert(employees, { - name = name, - identifier = identifier, - job = { - name = society, - label = Jobs[society].label, - grade = row.job_grade, - grade_name = Jobs[society].grades[tostring(row.job_grade)].name, - grade_label = Jobs[society].grades[tostring(row.job_grade)].label - } - }) - end - end - - cb(employees) - end) - +ESX.RegisterServerCallback("esx_society:getEmployees", function(_, cb, society) + local employees = {} + + local xPlayers = ESX.GetExtendedPlayers("job", society) + for i = 1, #xPlayers do + local xPlayer = xPlayers[i] + + local name = xPlayer.name + if Config.EnableESXIdentity and name == GetPlayerName(xPlayer.source) then + name = xPlayer.get("firstName") .. " " .. xPlayer.get("lastName") + end + + table.insert(employees, { + name = name, + identifier = xPlayer.identifier, + job = { + name = society, + label = xPlayer.job.label, + grade = xPlayer.job.grade, + grade_name = xPlayer.job.grade_name, + grade_label = xPlayer.job.grade_label, + }, + }) + end + + local query = "SELECT identifier, job_grade FROM `users` WHERE `job`= ? ORDER BY job_grade DESC" + + if Config.EnableESXIdentity then + query = "SELECT identifier, job_grade, firstname, lastname FROM `users` WHERE `job`= ? ORDER BY job_grade DESC" + end + + MySQL.query(query, { society }, function(result) + for _, row in pairs(result) do + local alreadyInTable + local identifier = row.identifier + + for _, v in pairs(employees) do + if v.identifier == identifier then + alreadyInTable = true + end + end + + if not alreadyInTable then + local name = "Name not found." -- maybe this should be a locale instead ¯\_(ツ)_/¯ + + if Config.EnableESXIdentity then + name = row.firstname .. " " .. row.lastname + end + + table.insert(employees, { + name = name, + identifier = identifier, + job = { + name = society, + label = Jobs[society].label, + grade = row.job_grade, + grade_name = Jobs[society].grades[tostring(row.job_grade)].name, + grade_label = Jobs[society].grades[tostring(row.job_grade)].label, + }, + }) + end + end + + cb(employees) + end) end) -ESX.RegisterServerCallback('esx_society:getJob', function(_, cb, society) - local job = json.decode(json.encode(Jobs[society])) - local grades = {} +ESX.RegisterServerCallback("esx_society:getJob", function(_, cb, society) + local job = json.decode(json.encode(Jobs[society])) + local grades = {} - for _,v in pairs(job.grades) do - table.insert(grades, v) - end + for _, v in pairs(job.grades) do + table.insert(grades, v) + end - table.sort(grades, function(a, b) - return a.grade < b.grade - end) + table.sort(grades, function(a, b) + return a.grade < b.grade + end) - job.grades = grades + job.grades = grades - cb(job) + cb(job) end) -ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier, job, grade, type) - local xPlayer = ESX.GetPlayerFromId(source) - local isBoss = xPlayer.job.grade_name == 'boss' - local xTarget = ESX.GetPlayerFromIdentifier(identifier) - - if isBoss then - - if xTarget then - xTarget.setJob(job, grade) - - if type == 'hire' then - xTarget.showNotification(_U('you_have_been_hired', job)) - xPlayer.showNotification(_U("you_have_hired", xTarget.getName())) - elseif type == 'promote' then - xTarget.showNotification(_U('you_have_been_promoted')) - xPlayer.showNotification(_U("you_have_promoted", xTarget.getName())) - elseif type == 'fire' then - xTarget.showNotification(_U('you_have_been_fired', xTarget.getJob().label)) - xPlayer.showNotification(_U("you_have_fired", xTarget.getName())) - end - - cb() - else - MySQL.update('UPDATE users SET job = ?, job_grade = ? WHERE identifier = ?', {job, grade, identifier}, - function() - cb() - end) - end - else - print(('[^3WARNING^7] Player ^5%s^7 attempted to setJob for Player ^5%s^7!'):format(source, xTarget.source)) - cb() - end +ESX.RegisterServerCallback("esx_society:setJob", function(source, cb, identifier, job, grade, type) + local xPlayer = ESX.GetPlayerFromId(source) + local isBoss = xPlayer.job.grade_name == "boss" + local xTarget = ESX.GetPlayerFromIdentifier(identifier) + + if isBoss then + if xTarget then + xTarget.setJob(job, grade) + + if type == "hire" then + xTarget.showNotification(_U("you_have_been_hired", job)) + xPlayer.showNotification(_U("you_have_hired", xTarget.getName())) + elseif type == "promote" then + xTarget.showNotification(_U("you_have_been_promoted")) + xPlayer.showNotification(_U("you_have_promoted", xTarget.getName())) + elseif type == "fire" then + xTarget.showNotification(_U("you_have_been_fired", xTarget.getJob().label)) + xPlayer.showNotification(_U("you_have_fired", xTarget.getName())) + end + + cb() + else + MySQL.update("UPDATE users SET job = ?, job_grade = ? WHERE identifier = ?", { job, grade, identifier }, function() + cb() + end) + end + else + print(("[^3WARNING^7] Player ^5%s^7 attempted to setJob for Player ^5%s^7!"):format(source, xTarget.source)) + cb() + end end) - -ESX.RegisterServerCallback('esx_society:setJobSalary', function(source, cb, job, grade, salary) - local xPlayer = ESX.GetPlayerFromId(source) - - if xPlayer.job.name == job and xPlayer.job.grade_name == 'boss' then - if salary <= Config.MaxSalary then - MySQL.update('UPDATE job_grades SET salary = ? WHERE job_name = ? AND grade = ?', {salary, job, grade}, - function() - Jobs[job].grades[tostring(grade)].salary = salary - ESX.RefreshJobs() - Wait(1) - local xPlayers = ESX.GetExtendedPlayers('job', job) - for _, xTarget in pairs(xPlayers) do - - if xTarget.job.grade == grade then - xTarget.setJob(job, grade) - end - end - cb() - end) - else - print(('[^3WARNING^7] Player ^5%s^7 attempted to setJobSalary over the config limit for ^5%s^7!'):format(source, job)) - cb() - end - else - print(('[^3WARNING^7] Player ^5%s^7 attempted to setJobSalary for ^5%s^7!'):format(source, job)) - cb() - end +ESX.RegisterServerCallback("esx_society:setJobSalary", function(source, cb, job, grade, salary) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == job and xPlayer.job.grade_name == "boss" then + if salary <= Config.MaxSalary then + MySQL.update("UPDATE job_grades SET salary = ? WHERE job_name = ? AND grade = ?", { salary, job, grade }, function() + Jobs[job].grades[tostring(grade)].salary = salary + ESX.RefreshJobs() + Wait(1) + local xPlayers = ESX.GetExtendedPlayers("job", job) + for _, xTarget in pairs(xPlayers) do + if xTarget.job.grade == grade then + xTarget.setJob(job, grade) + end + end + cb() + end) + else + print(("[^3WARNING^7] Player ^5%s^7 attempted to setJobSalary over the config limit for ^5%s^7!"):format(source, job)) + cb() + end + else + print(("[^3WARNING^7] Player ^5%s^7 attempted to setJobSalary for ^5%s^7!"):format(source, job)) + cb() + end end) -ESX.RegisterServerCallback('esx_society:setJobLabel', function(source, cb, job, grade, label) - local xPlayer = ESX.GetPlayerFromId(source) - - if xPlayer.job.name == job and xPlayer.job.grade_name == 'boss' then - MySQL.update('UPDATE job_grades SET label = ? WHERE job_name = ? AND grade = ?', {label, job, grade}, - function() - Jobs[job].grades[tostring(grade)].label = label - ESX.RefreshJobs() - Wait(1) - local xPlayers = ESX.GetExtendedPlayers('job', job) - for _, xTarget in pairs(xPlayers) do - - if xTarget.job.grade == grade then - xTarget.setJob(job, grade) - end - end - cb() - end) - else - print(('[^3WARNING^7] Player ^5%s^7 attempted to setJobLabel for ^5%s^7!'):format(source, job)) - cb() - end +ESX.RegisterServerCallback("esx_society:setJobLabel", function(source, cb, job, grade, label) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == job and xPlayer.job.grade_name == "boss" then + MySQL.update("UPDATE job_grades SET label = ? WHERE job_name = ? AND grade = ?", { label, job, grade }, function() + Jobs[job].grades[tostring(grade)].label = label + ESX.RefreshJobs() + Wait(1) + local xPlayers = ESX.GetExtendedPlayers("job", job) + for _, xTarget in pairs(xPlayers) do + if xTarget.job.grade == grade then + xTarget.setJob(job, grade) + end + end + cb() + end) + else + print(("[^3WARNING^7] Player ^5%s^7 attempted to setJobLabel for ^5%s^7!"):format(source, job)) + cb() + end end) local getOnlinePlayers, onlinePlayers = false, {} -ESX.RegisterServerCallback('esx_society:getOnlinePlayers', function(_, cb) - if getOnlinePlayers == false and next(onlinePlayers) == nil then -- Prevent multiple xPlayer loops from running in quick succession - getOnlinePlayers, onlinePlayers = true, {} - - local xPlayers = ESX.GetExtendedPlayers() - for i=1, #(xPlayers) do - local xPlayer = xPlayers[i] - table.insert(onlinePlayers, { - source = xPlayer.source, - identifier = xPlayer.identifier, - name = xPlayer.name, - job = xPlayer.job - }) - end - cb(onlinePlayers) - getOnlinePlayers = false - Wait(1000) -- For the next second any extra requests will receive the cached list - onlinePlayers = {} - return - end - while getOnlinePlayers do Wait(0) end -- Wait for the xPlayer loop to finish - cb(onlinePlayers) +ESX.RegisterServerCallback("esx_society:getOnlinePlayers", function(_, cb) + if getOnlinePlayers == false and next(onlinePlayers) == nil then -- Prevent multiple xPlayer loops from running in quick succession + getOnlinePlayers, onlinePlayers = true, {} + + local xPlayers = ESX.GetExtendedPlayers() + for i = 1, #xPlayers do + local xPlayer = xPlayers[i] + table.insert(onlinePlayers, { + source = xPlayer.source, + identifier = xPlayer.identifier, + name = xPlayer.name, + job = xPlayer.job, + }) + end + cb(onlinePlayers) + getOnlinePlayers = false + Wait(1000) -- For the next second any extra requests will receive the cached list + onlinePlayers = {} + return + end + while getOnlinePlayers do + Wait(0) + end -- Wait for the xPlayer loop to finish + cb(onlinePlayers) end) -ESX.RegisterServerCallback('esx_society:getVehiclesInGarage', function(_, cb, societyName) - local society = GetSociety(societyName) - if not society then - print(('[^3WARNING^7] Attempting To get a non-existing society - %s!'):format(societyName)) - return - end - TriggerEvent('esx_datastore:getSharedDataStore', society.datastore, function(store) - local garage = store.get('garage') or {} - cb(garage) - end) +ESX.RegisterServerCallback("esx_society:getVehiclesInGarage", function(_, cb, societyName) + local society = GetSociety(societyName) + if not society then + print(("[^3WARNING^7] Attempting To get a non-existing society - %s!"):format(societyName)) + return + end + TriggerEvent("esx_datastore:getSharedDataStore", society.datastore, function(store) + local garage = store.get("garage") or {} + cb(garage) + end) end) -ESX.RegisterServerCallback('esx_society:isBoss', function(source, cb, job) - cb(isPlayerBoss(source, job)) +ESX.RegisterServerCallback("esx_society:isBoss", function(source, cb, job) + cb(isPlayerBoss(source, job)) end) function isPlayerBoss(playerId, job) - local xPlayer = ESX.GetPlayerFromId(playerId) - - if xPlayer.job.name == job and xPlayer.job.grade_name == 'boss' then - return true - else - print(('esx_society: %s attempted open a society boss menu!'):format(xPlayer.identifier)) - return false - end + local xPlayer = ESX.GetPlayerFromId(playerId) + + if xPlayer.job.name == job and xPlayer.job.grade_name == "boss" then + return true + else + print(("esx_society: %s attempted open a society boss menu!"):format(xPlayer.identifier)) + return false + end end function WashMoneyCRON() - MySQL.query('SELECT * FROM society_moneywash', function(result) - for i=1, #result, 1 do - local society = GetSociety(result[i].society) - local xPlayer = ESX.GetPlayerFromIdentifier(result[i].identifier) - - -- add society money - TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) - account.addMoney(result[i].amount) - end) - - -- send notification if player is online - if xPlayer then - xPlayer.showNotification(_U('you_have_laundered', ESX.Math.GroupDigits(result[i].amount))) - end - - end - MySQL.update('DELETE FROM society_moneywash') - end) + MySQL.query("SELECT * FROM society_moneywash", function(result) + for i = 1, #result, 1 do + local society = GetSociety(result[i].society) + local xPlayer = ESX.GetPlayerFromIdentifier(result[i].identifier) + + -- add society money + TriggerEvent("esx_addonaccount:getSharedAccount", society.account, function(account) + account.addMoney(result[i].amount) + end) + + -- send notification if player is online + if xPlayer then + xPlayer.showNotification(_U("you_have_laundered", ESX.Math.GroupDigits(result[i].amount))) + end + end + MySQL.update("DELETE FROM society_moneywash") + end) end -TriggerEvent('cron:runAt', 3, 0, WashMoneyCRON) \ No newline at end of file +TriggerEvent("cron:runAt", 3, 0, WashMoneyCRON) diff --git a/server-data/resources/[esx_addons]/BOBsHunt/client/functions.lua b/server-data/resources/[esx_addons]/BOBsHunt/client/functions.lua index 843ff044b..5f02315f8 100644 --- a/server-data/resources/[esx_addons]/BOBsHunt/client/functions.lua +++ b/server-data/resources/[esx_addons]/BOBsHunt/client/functions.lua @@ -1,18 +1,18 @@ drawText3D = function(x, y, z, text) - local onScreen, _x, _y = World3dToScreen2d(x,y,z) - local _ = table.unpack(GetGameplayCamCoords()) - local scale = 0.30 + local onScreen, _x, _y = World3dToScreen2d(x, y, z) + local _ = table.unpack(GetGameplayCamCoords()) + local scale = 0.30 - if onScreen then - SetTextScale(scale, scale) - SetTextFont(4) - SetTextProportional(1) - SetTextColour(255, 255, 255, 215) - SetTextOutline() - SetTextEntry("STRING") - SetTextCentre(1) - AddTextComponentString(text) - DrawText(_x,_y) + if onScreen then + SetTextScale(scale, scale) + SetTextFont(4) + SetTextProportional(1) + SetTextColour(255, 255, 255, 215) + SetTextOutline() + SetTextEntry("STRING") + SetTextCentre(1) + AddTextComponentString(text) + DrawText(_x, _y) local _ = (string.len(text)) / 650 - end -end \ No newline at end of file + end +end diff --git a/server-data/resources/[esx_addons]/BOBsHunt/client/main.lua b/server-data/resources/[esx_addons]/BOBsHunt/client/main.lua index b4dc8ab22..cea1a8e41 100644 --- a/server-data/resources/[esx_addons]/BOBsHunt/client/main.lua +++ b/server-data/resources/[esx_addons]/BOBsHunt/client/main.lua @@ -4,124 +4,130 @@ local oPlayer = false local playerpos = false CreateThread(function() - while(true) do - oPlayer = PlayerPedId() - playerpos = GetEntityCoords(oPlayer) + while true do + oPlayer = PlayerPedId() + playerpos = GetEntityCoords(oPlayer) Wait(500) end end) CreateThread(function() - while true do - Wait(1) - local handle, ped = FindFirstPed() - local success - repeat - success, ped = FindNextPed(handle) - local pos = GetEntityCoords(ped) - local distance = GetDistanceBetweenCoords(pos.x, pos.y, pos.z, playerpos.x, playerpos.y, playerpos.z, true) - if distance < 2 and CanSlaughterPed(ped) then - drawText3D(pos.x, pos.y, pos.z + 0.6, '⚙️ [H] ~b~Skin Animal~s~') - while IsControlPressed(0, 38) do - break - end - if IsControlJustPressed(1,74) then - if GetSelectedPedWeapon(PlayerPedId()) == GetHashKey('WEAPON_KNIFE') then - local oldped = ped - SetEntityHeading(ped,GetHeadingFromVector_2d(pos.x-playerpos.x,pos.y-playerpos.y)+180) - SetEntityHeading(oPlayer,GetHeadingFromVector_2d(pos.x-playerpos.x,pos.y-playerpos.y)) - exports.rprogress:Custom({ - Async = true, - x = 0.5, - y = 0.5, - From = 0, - To = 100, - Duration = 5000, - Radius = 60, - Stroke = 10, - MaxAngle = 360, - Rotation = 0, - Easing = "easeLinear", - Label = "SKINNING", - LabelPosition = "right", - Color = "rgba(255, 255, 255, 1.0)", - BGColor = "rgba(107, 109, 110, 0.95)", - Animation = { - --scenario = "CODE_HUMAN_MEDIC_TEND_TO_DEAD", -- https://pastebin.com/6mrYTdQv - animationDictionary = "anim@heists@narcotics@funding@gang_idle", -- https://alexguirre.github.io/animations-list/ - animationName = "gang_chatting_idle01", - }, + while true do + Wait(1) + local handle, ped = FindFirstPed() + local success + repeat + success, ped = FindNextPed(handle) + local pos = GetEntityCoords(ped) + local distance = GetDistanceBetweenCoords(pos.x, pos.y, pos.z, playerpos.x, playerpos.y, playerpos.z, true) + if distance < 2 and CanSlaughterPed(ped) then + drawText3D(pos.x, pos.y, pos.z + 0.6, "⚙️ [H] ~b~Skin Animal~s~") + while IsControlPressed(0, 38) do + break + end + if IsControlJustPressed(1, 74) then + if GetSelectedPedWeapon(PlayerPedId()) == GetHashKey("WEAPON_KNIFE") then + local oldped = ped + SetEntityHeading(ped, GetHeadingFromVector_2d(pos.x - playerpos.x, pos.y - playerpos.y) + 180) + SetEntityHeading(oPlayer, GetHeadingFromVector_2d(pos.x - playerpos.x, pos.y - playerpos.y)) + exports.rprogress:Custom({ + Async = true, + x = 0.5, + y = 0.5, + From = 0, + To = 100, + Duration = 5000, + Radius = 60, + Stroke = 10, + MaxAngle = 360, + Rotation = 0, + Easing = "easeLinear", + Label = "SKINNING", + LabelPosition = "right", + Color = "rgba(255, 255, 255, 1.0)", + BGColor = "rgba(107, 109, 110, 0.95)", + Animation = { + --scenario = "CODE_HUMAN_MEDIC_TEND_TO_DEAD", -- https://pastebin.com/6mrYTdQv + animationDictionary = "anim@heists@narcotics@funding@gang_idle", -- https://alexguirre.github.io/animations-list/ + animationName = "gang_chatting_idle01", + }, - DisableControls = { - Mouse = false, - Player = true, - Vehicle = true - }, - }) - Wait(5000) + DisableControls = { + Mouse = false, + Player = true, + Vehicle = true, + }, + }) + Wait(5000) - ClearPedTasks(PlayerPedId()) - if GetEntityModel(ped) == GetHashKey("a_c_boar") then - local item = 'boar_meat' - local p_name = _U('boar_meat') - TriggerServerEvent('esx_bobhunt:getPelt', item, p_name) - elseif GetEntityModel(ped) == GetHashKey("a_c_mtlion") then - local item = 'pelt_mtnlion' - local p_name = _U('pelt_mtnlion') - TriggerServerEvent('esx_bobhunt:getPelt', item, p_name) - elseif GetEntityModel(ped) == GetHashKey("a_c_deer") then - local item = 'deer_meat' - local p_name = _U('deer_meat') - TriggerServerEvent('esx_bobhunt:getPelt', item, p_name) - elseif GetEntityModel(ped) == GetHashKey("a_c_coyote") then - local item = 'pelt_coyote' - local p_name = _U('pelt_coyote') - TriggerServerEvent('esx_bobhunt:getPelt', item, p_name) - elseif GetEntityModel(ped) == GetHashKey("a_c_rabbit_01") then - local item = 'rabbit_meat' - local p_name = _U('rabbit_meat') - TriggerServerEvent('esx_bobhunt:getPelt', item, p_name) - end + ClearPedTasks(PlayerPedId()) + if GetEntityModel(ped) == GetHashKey("a_c_boar") then + local item = "boar_meat" + local p_name = _U("boar_meat") + TriggerServerEvent("esx_bobhunt:getPelt", item, p_name) + elseif GetEntityModel(ped) == GetHashKey("a_c_mtlion") then + local item = "pelt_mtnlion" + local p_name = _U("pelt_mtnlion") + TriggerServerEvent("esx_bobhunt:getPelt", item, p_name) + elseif GetEntityModel(ped) == GetHashKey("a_c_deer") then + local item = "deer_meat" + local p_name = _U("deer_meat") + TriggerServerEvent("esx_bobhunt:getPelt", item, p_name) + elseif GetEntityModel(ped) == GetHashKey("a_c_coyote") then + local item = "pelt_coyote" + local p_name = _U("pelt_coyote") + TriggerServerEvent("esx_bobhunt:getPelt", item, p_name) + elseif GetEntityModel(ped) == GetHashKey("a_c_rabbit_01") then + local item = "rabbit_meat" + local p_name = _U("rabbit_meat") + TriggerServerEvent("esx_bobhunt:getPelt", item, p_name) + end - Wait(10) - SetPedAsNoLongerNeeded(oldped) - if DoesEntityExist(ped) then - DeleteEntity(ped) - end - Wait(1000) - break - else - ESX.showNotification(_U('knife_uses')) - end - end - end - until not success - EndFindPed(handle) - end + Wait(10) + SetPedAsNoLongerNeeded(oldped) + if DoesEntityExist(ped) then + DeleteEntity(ped) + end + Wait(1000) + break + else + ESX.showNotification(_U("knife_uses")) + end + end + end + until not success + EndFindPed(handle) + end end) local oldped function CanSlaughterPed(ped) - if not IsPedAPlayer(ped) and not IsPedInAnyVehicle(ped,false) and not IsPedHuman(ped) and IsEntityDead(ped) and ped ~= oldped and GetEntityModel(ped) == GetHashKey("a_c_boar") or GetEntityModel(ped) == GetHashKey("a_c_coyote") or GetEntityModel(ped) == GetHashKey("a_c_deer") or GetEntityModel(ped) == GetHashKey("a_c_mtlion") or GetEntityModel(ped) == GetHashKey("a_c_rabbit_01") then - return true - end - return false + if + not IsPedAPlayer(ped) and not IsPedInAnyVehicle(ped, false) and not IsPedHuman(ped) and IsEntityDead(ped) and ped ~= oldped and GetEntityModel(ped) == GetHashKey("a_c_boar") + or GetEntityModel(ped) == GetHashKey("a_c_coyote") + or GetEntityModel(ped) == GetHashKey("a_c_deer") + or GetEntityModel(ped) == GetHashKey("a_c_mtlion") + or GetEntityModel(ped) == GetHashKey("a_c_rabbit_01") + then + return true + end + return false end local blips = { - {title="Hunters Den", colour=4, id=463, x = -1132.93, y = 4948.42, z = 221.87} + { title = "Hunters Den", colour = 4, id = 463, x = -1132.93, y = 4948.42, z = 221.87 }, } CreateThread(function() for _, info in pairs(blips) do - info.blip = AddBlipForCoord(info.x, info.y, info.z) - SetBlipSprite(info.blip, info.id) - SetBlipDisplay(info.blip, 4) - SetBlipScale(info.blip, 0.8) - SetBlipColour(info.blip, info.colour) - SetBlipAsShortRange(info.blip, true) - BeginTextCommandSetBlipName("STRING") - AddTextComponentString(info.title) - EndTextCommandSetBlipName(info.blip) + info.blip = AddBlipForCoord(info.x, info.y, info.z) + SetBlipSprite(info.blip, info.id) + SetBlipDisplay(info.blip, 4) + SetBlipScale(info.blip, 0.8) + SetBlipColour(info.blip, info.colour) + SetBlipAsShortRange(info.blip, true) + BeginTextCommandSetBlipName("STRING") + AddTextComponentString(info.title) + EndTextCommandSetBlipName(info.blip) end -end) \ No newline at end of file +end) diff --git a/server-data/resources/[esx_addons]/BOBsHunt/config.lua b/server-data/resources/[esx_addons]/BOBsHunt/config.lua index 78ca21f1d..adb7fc406 100644 --- a/server-data/resources/[esx_addons]/BOBsHunt/config.lua +++ b/server-data/resources/[esx_addons]/BOBsHunt/config.lua @@ -1,2 +1,2 @@ Config = {} -Config.Locale = 'en' \ No newline at end of file +Config.Locale = "en" diff --git a/server-data/resources/[esx_addons]/BOBsHunt/fxmanifest.lua b/server-data/resources/[esx_addons]/BOBsHunt/fxmanifest.lua index 94d894590..a6f1f5731 100644 --- a/server-data/resources/[esx_addons]/BOBsHunt/fxmanifest.lua +++ b/server-data/resources/[esx_addons]/BOBsHunt/fxmanifest.lua @@ -1,22 +1,22 @@ -fx_version 'adamant' -games { 'gta5' } +fx_version("adamant") +games({ "gta5" }) -author 'Bob code reconstruction by: bitpredator' -description 'Bobs Hunting' -version '1.0.0' +author("Bob code reconstruction by: bitpredator") +description("Bobs Hunting") +version("1.0.0") -shared_script '@es_extended/imports.lua' +shared_script("@es_extended/imports.lua") -client_scripts { - '@es_extended/locale.lua', - 'client/*.lua', - 'locales/*.lua', - 'config.lua' -} +client_scripts({ + "@es_extended/locale.lua", + "client/*.lua", + "locales/*.lua", + "config.lua", +}) -server_scripts { - '@es_extended/locale.lua', - 'locales/*.lua', - 'config.lua', - 'server/main.lua' -} \ No newline at end of file +server_scripts({ + "@es_extended/locale.lua", + "locales/*.lua", + "config.lua", + "server/main.lua", +}) diff --git a/server-data/resources/[esx_addons]/BOBsHunt/locales/en.lua b/server-data/resources/[esx_addons]/BOBsHunt/locales/en.lua index 4e778b9a4..831f4866b 100644 --- a/server-data/resources/[esx_addons]/BOBsHunt/locales/en.lua +++ b/server-data/resources/[esx_addons]/BOBsHunt/locales/en.lua @@ -1,9 +1,9 @@ -Locales['en'] = { - ['knife_uses'] = 'You need to use a knife', - ['you_collected'] = 'You picked up a', - ['deer_meat'] = 'Deer meat', - ['boar_meat'] = 'Boar meat', - ['pelt_mtnlion'] = 'Mountain Lion pelt', - ['pelt_coyote'] = 'Pelt Coyote', - ['rabbit_meat'] = 'Rabbit meat' -} \ No newline at end of file +Locales["en"] = { + ["knife_uses"] = "You need to use a knife", + ["you_collected"] = "You picked up a", + ["deer_meat"] = "Deer meat", + ["boar_meat"] = "Boar meat", + ["pelt_mtnlion"] = "Mountain Lion pelt", + ["pelt_coyote"] = "Pelt Coyote", + ["rabbit_meat"] = "Rabbit meat", +} diff --git a/server-data/resources/[esx_addons]/BOBsHunt/locales/it.lua b/server-data/resources/[esx_addons]/BOBsHunt/locales/it.lua index 502f631a7..5ba349a75 100644 --- a/server-data/resources/[esx_addons]/BOBsHunt/locales/it.lua +++ b/server-data/resources/[esx_addons]/BOBsHunt/locales/it.lua @@ -1,9 +1,9 @@ -Locales['it'] = { - ['knife_uses'] = 'Devi usare un coltello', - ['you_collected'] = 'Hai raccolto un', - ['deer_meat'] = 'Carne di cervo', - ['boar_meat'] = 'Carne di cinghiale', - ['pelt_mtnlion'] = 'Pelle di leone di montagna', - ['pelt_coyote'] = 'Pelle di coyote', - ['rabbit_meat'] = 'Carne di coniglio' -} \ No newline at end of file +Locales["it"] = { + ["knife_uses"] = "Devi usare un coltello", + ["you_collected"] = "Hai raccolto un", + ["deer_meat"] = "Carne di cervo", + ["boar_meat"] = "Carne di cinghiale", + ["pelt_mtnlion"] = "Pelle di leone di montagna", + ["pelt_coyote"] = "Pelle di coyote", + ["rabbit_meat"] = "Carne di coniglio", +} diff --git a/server-data/resources/[esx_addons]/BOBsHunt/server/main.lua b/server-data/resources/[esx_addons]/BOBsHunt/server/main.lua index f6f505168..c9984c01e 100644 --- a/server-data/resources/[esx_addons]/BOBsHunt/server/main.lua +++ b/server-data/resources/[esx_addons]/BOBsHunt/server/main.lua @@ -1,9 +1,9 @@ ESX = exports["es_extended"]:getSharedObject() -RegisterServerEvent('esx_bobhunt:getPelt') -AddEventHandler('esx_bobhunt:getPelt', function(item, p_name) - local _source = source - local xPlayer = ESX.GetPlayerFromId(_source) - xPlayer.addInventoryItem(item, 10) - TriggerClientEvent('esx:showNotification', source, _U('you_collected') .. p_name) -end) \ No newline at end of file +RegisterServerEvent("esx_bobhunt:getPelt") +AddEventHandler("esx_bobhunt:getPelt", function(item, p_name) + local _source = source + local xPlayer = ESX.GetPlayerFromId(_source) + xPlayer.addInventoryItem(item, 10) + TriggerClientEvent("esx:showNotification", source, _U("you_collected") .. p_name) +end) diff --git a/server-data/resources/[maps]/CayoTwoIslands/scripts/blips.lua b/server-data/resources/[maps]/CayoTwoIslands/scripts/blips.lua index fd3a008d7..63f749408 100644 --- a/server-data/resources/[maps]/CayoTwoIslands/scripts/blips.lua +++ b/server-data/resources/[maps]/CayoTwoIslands/scripts/blips.lua @@ -1,13 +1,13 @@ local blips = { - -- Airports -- - { title = "Cayo Perico Runway", colour = 3, id = 90, x = 3961.97, y = -4689.05, z = 3.6 }, + -- Airports -- + { title = "Cayo Perico Runway", colour = 3, id = 90, x = 3961.97, y = -4689.05, z = 3.6 }, - -- Cayo Perico Island Blips -- - -- Island Beach Party - { title = "Island Beach Party", colour = 23, id = 614, x = 4918.11, y = -4906.8, z = 3.44 }, + -- Cayo Perico Island Blips -- + -- Island Beach Party + { title = "Island Beach Party", colour = 23, id = 614, x = 4918.11, y = -4906.8, z = 3.44 }, - -- Island Weed Farm - { title = "Island Weed Farm", colour = 25, id = 496, x = 5319.28, y = -5248.54, z = 32.58 }, + -- Island Weed Farm + { title = "Island Weed Farm", colour = 25, id = 496, x = 5319.28, y = -5248.54, z = 32.58 }, -- Island Helipad 1 -- { title = "Island Helipad", colour = 26, id = 542, x = 4890.52, y = -5736.66, z = 26.35 }, @@ -33,4 +33,4 @@ Citizen.CreateThread(function() AddTextComponentString(info.title) EndTextCommandSetBlipName(info.blip) end -end) \ No newline at end of file +end) diff --git a/server-data/resources/[maps]/CayoTwoIslands/scripts/main_peds.lua b/server-data/resources/[maps]/CayoTwoIslands/scripts/main_peds.lua index b12d45129..615856660 100644 --- a/server-data/resources/[maps]/CayoTwoIslands/scripts/main_peds.lua +++ b/server-data/resources/[maps]/CayoTwoIslands/scripts/main_peds.lua @@ -1,106 +1,125 @@ -------------------------------------------------------------------- CREATE PEDS ------------------------------------------------------------------- function IsNearby(playerCoords, pedCoords) - return #(playerCoords - vector3(pedCoords.x, pedCoords.y, pedCoords.z)) <= Config.SpawnDistance + return #(playerCoords - vector3(pedCoords.x, pedCoords.y, pedCoords.z)) <= Config.SpawnDistance end Citizen.CreateThread(function() - while true do - local playerCoords = GetEntityCoords(PlayerPedId()) - - for _, pedGroup in ipairs(Config.Peds) do - for _, location in ipairs(pedGroup.locations) do - local nearby = IsNearby(playerCoords, location) - local spawned = location.handle and DoesEntityExist(location.handle) - - if nearby and not spawned then - local model = GetHashKey(pedGroup.model) - local pedType = pedGroup.pedType or 4 - - if IsModelInCdimage(model) then - RequestModel(model) - - while not HasModelLoaded(model) do - Wait(0) - end - - local npc = CreatePed(pedType, model, location.x, location.y, location.z - , location.heading, false, false) - - SetModelAsNoLongerNeeded(model) - - FreezeEntityPosition(npc, true) - SetEntityInvincible(npc, true) - SetBlockingOfNonTemporaryEvents(npc, true) - - if pedGroup.scenario then - TaskStartScenarioInPlace(npc, pedGroup.scenario, 0, true) - elseif pedGroup.animation then - local blendInSpeed = pedGroup.animation.blendInSpeed or 1.0 - local blendOutSpeed = pedGroup.animation.blendOutSpeed or 1.0 - local duration = pedGroup.animation.duration or -1 - local flag = pedGroup.animation.flag or 1 - local playbackRate = pedGroup.animation.playbackRate or 1.0 - - if DoesAnimDictExist(pedGroup.animation.dict) then - RequestAnimDict(pedGroup.animation.dict) - - while not HasAnimDictLoaded(pedGroup.animation.dict) do - Wait(0) - end - - TaskPlayAnim(npc, pedGroup.animation.dict, pedGroup.animation.name, blendInSpeed, - blendOutSpeed, duration, flag, playbackRate, 0, 0, 0) - - RemoveAnimDict(pedGroup.animation.dict) - else - print('Unknown animation dictionary: ' .. pedGroup.animation.dict) - end - elseif pedGroup.canPlayAmbientAnims then - SetPedCanPlayAmbientAnims(npc, true) - end - - if pedGroup.weapons then - for _, weapon in ipairs(pedGroup.weapons) do - local ammo - - if weapon.minAmmo and weapon.maxAmmo then - ammo = math.random(weapon.minAmmo, weapon.maxAmmo) - else - ammo = weapon.ammo - end - - GiveWeaponToPed(npc, GetHashKey(weapon.name), ammo, true, false) - end - end - - if pedGroup.defaultWeapon then - SetCurrentPedWeapon(npc, GetHashKey(pedGroup.defaultWeapon), true) - end - - location.handle = npc - else - print('Invalid model: ' .. pedGroup.model) - end - elseif not nearby and spawned then - DeletePed(location.handle) - location.handle = nil - end - end - end - - Wait(1000) - end + while true do + local playerCoords = GetEntityCoords(PlayerPedId()) + + for _, pedGroup in ipairs(Config.Peds) do + for _, location in ipairs(pedGroup.locations) do + local nearby = IsNearby(playerCoords, location) + local spawned = location.handle and DoesEntityExist(location.handle) + + if nearby and not spawned then + local model = GetHashKey(pedGroup.model) + local pedType = pedGroup.pedType or 4 + + if IsModelInCdimage(model) then + RequestModel(model) + + while not HasModelLoaded(model) do + Wait(0) + end + + local npc = CreatePed( + pedType, + model, + location.x, + location.y, + location.z, + location.heading, + false, + false + ) + + SetModelAsNoLongerNeeded(model) + + FreezeEntityPosition(npc, true) + SetEntityInvincible(npc, true) + SetBlockingOfNonTemporaryEvents(npc, true) + + if pedGroup.scenario then + TaskStartScenarioInPlace(npc, pedGroup.scenario, 0, true) + elseif pedGroup.animation then + local blendInSpeed = pedGroup.animation.blendInSpeed or 1.0 + local blendOutSpeed = pedGroup.animation.blendOutSpeed or 1.0 + local duration = pedGroup.animation.duration or -1 + local flag = pedGroup.animation.flag or 1 + local playbackRate = pedGroup.animation.playbackRate or 1.0 + + if DoesAnimDictExist(pedGroup.animation.dict) then + RequestAnimDict(pedGroup.animation.dict) + + while not HasAnimDictLoaded(pedGroup.animation.dict) do + Wait(0) + end + + TaskPlayAnim( + npc, + pedGroup.animation.dict, + pedGroup.animation.name, + blendInSpeed, + blendOutSpeed, + duration, + flag, + playbackRate, + 0, + 0, + 0 + ) + + RemoveAnimDict(pedGroup.animation.dict) + else + print("Unknown animation dictionary: " .. pedGroup.animation.dict) + end + elseif pedGroup.canPlayAmbientAnims then + SetPedCanPlayAmbientAnims(npc, true) + end + + if pedGroup.weapons then + for _, weapon in ipairs(pedGroup.weapons) do + local ammo + + if weapon.minAmmo and weapon.maxAmmo then + ammo = math.random(weapon.minAmmo, weapon.maxAmmo) + else + ammo = weapon.ammo + end + + GiveWeaponToPed(npc, GetHashKey(weapon.name), ammo, true, false) + end + end + + if pedGroup.defaultWeapon then + SetCurrentPedWeapon(npc, GetHashKey(pedGroup.defaultWeapon), true) + end + + location.handle = npc + else + print("Invalid model: " .. pedGroup.model) + end + elseif not nearby and spawned then + DeletePed(location.handle) + location.handle = nil + end + end + end + + Wait(1000) + end end) -AddEventHandler('onResourceStop', function(resourceName) - if GetCurrentResourceName() == resourceName then - for _, pedGroup in ipairs(Config.Peds) do - for _, location in ipairs(pedGroup.locations) do - if DoesEntityExist(location.handle) then - DeletePed(location.handle) - end - end - end - end +AddEventHandler("onResourceStop", function(resourceName) + if GetCurrentResourceName() == resourceName then + for _, pedGroup in ipairs(Config.Peds) do + for _, location in ipairs(pedGroup.locations) do + if DoesEntityExist(location.handle) then + DeletePed(location.handle) + end + end + end + end end) diff --git a/server-data/resources/[maps]/CayoTwoIslands/scripts/peds_config.lua b/server-data/resources/[maps]/CayoTwoIslands/scripts/peds_config.lua index 5cfc65835..2e81e7257 100644 --- a/server-data/resources/[maps]/CayoTwoIslands/scripts/peds_config.lua +++ b/server-data/resources/[maps]/CayoTwoIslands/scripts/peds_config.lua @@ -4,55 +4,54 @@ Config = {} Config.SpawnDistance = 400 Config.Peds = { - ----------- CAYO PERICO PEDS ---------------------- - - -- ISLAND GUARD 1 - { - model = 's_m_m_highsec_01', - weapons = { - { name = 'weapon_carbinerifle_mk2', minAmmo = 20, maxAmmo = 100 } - }, - defaultWeapon = 'weapon_carbinerifle_mk2', - locations = { - { x = 4976.98, y = -5606.53, z = 22.80, heading = 49.44 }, -- Island Mansion Guard Gate - { x = 5005.61, y = -5752.25, z = 27.85, heading = 248.48 } -- Island Mansion Interior Guard - } - }, - - -- ISLAND GUARD 2 - { - model = 's_m_m_highsec_02', - animation = { - dict = 'anim@amb@nightclub@peds@', - name = 'amb_world_human_stand_guard_male_base' - }, - weapons = { - - { name = 'weapon_microsmg', minAmmo = 20, maxAmmo = 100 } - }, - defaultWeapon = 'weapon_microsmg', - locations = { - - { x = 4983.67, y = -5708.37, z = 19.00, heading = 55.57 }, -- Island Mansion Guard Gate - { x = 5014.0034, y = -5755.994, z = 27.88, heading = 64.74 } -- Island Mansion Guard Gate - - } - }, - - -- PANTHER AT CAYO PIERCO - { - model = 'a_c_panther', - animation = { - dict = 'creatures@cougar@amb@world_cougar_rest@base', - name = 'base' - }, - locations = { - { x = 4982.1074, y = -5765.036, z = 19.94, heading = 128.0382 } -- PANTHER AT CAYO PIERCO - } - }, - - -- EL RUBIO SITTING NEAR FIREPLACE - --[[ { + ----------- CAYO PERICO PEDS ---------------------- + + -- ISLAND GUARD 1 + { + model = "s_m_m_highsec_01", + weapons = { + { name = "weapon_carbinerifle_mk2", minAmmo = 20, maxAmmo = 100 }, + }, + defaultWeapon = "weapon_carbinerifle_mk2", + locations = { + { x = 4976.98, y = -5606.53, z = 22.80, heading = 49.44 }, -- Island Mansion Guard Gate + { x = 5005.61, y = -5752.25, z = 27.85, heading = 248.48 }, -- Island Mansion Interior Guard + }, + }, + + -- ISLAND GUARD 2 + { + model = "s_m_m_highsec_02", + animation = { + dict = "anim@amb@nightclub@peds@", + name = "amb_world_human_stand_guard_male_base", + }, + weapons = { + + { name = "weapon_microsmg", minAmmo = 20, maxAmmo = 100 }, + }, + defaultWeapon = "weapon_microsmg", + locations = { + + { x = 4983.67, y = -5708.37, z = 19.00, heading = 55.57 }, -- Island Mansion Guard Gate + { x = 5014.0034, y = -5755.994, z = 27.88, heading = 64.74 }, -- Island Mansion Guard Gate + }, + }, + + -- PANTHER AT CAYO PIERCO + { + model = "a_c_panther", + animation = { + dict = "creatures@cougar@amb@world_cougar_rest@base", + name = "base", + }, + locations = { + { x = 4982.1074, y = -5765.036, z = 19.94, heading = 128.0382 }, -- PANTHER AT CAYO PIERCO + }, + }, + + -- EL RUBIO SITTING NEAR FIREPLACE + --[[ { model = 'ig_juanstrickler', animation = { dict = 'anim@amb@office@seating@male@var_d@base@', @@ -61,333 +60,334 @@ Config.Peds = { locations = { { x = 5008.0474, y = -5754.133, z = 27.41, heading = 175.1963 } -- EL RUBIO SITTING NEAR FIREPLACE } - }, ]] -- - - --- ISLAND DANCERS --- - - --- Beach Dancer Female - { - model = 'a_f_y_beach_01', - animation = { - dict = 'anim@amb@nightclub@dancers@solomun_entourage@', - name = 'mi_dance_facedj_17_v1_female^1', - }, - locations = { - { x = 4892.0171, y = -4915.774, z = 2.40, heading = -20.3340 } -- Young Beach Girl 1 - } - }, - - --- Beach Dancer Male - { - model = 'a_m_y_beach_01', - animation = { - dict = 'anim@amb@nightclub@dancers@crowddance_facedj@hi_intensity', - name = 'hi_dance_facedj_09_v2_male^2', - }, - locations = { - { x = 4892.9990, y = -4916.062, z = 2.40, heading = 67.3608 } -- Young Beach Guy 1 - } - }, - - -- Topless Dancer - { - model = 'a_f_y_topless_01', - animation = { - dict = 'anim@amb@nightclub@dancers@crowddance_facedj@hi_intensity', - name = 'hi_dance_facedj_11_v2_female^1', - }, - locations = { - { x = 4895.0640, y = -4916.393, z = 2.40, heading = 8.6855 } -- Topless Girl - } - }, - - -- Male Drinking Beer 1 - { - model = 'a_m_y_beach_01', - scenario = 'WORLD_HUMAN_PARTYING', - locations = { - { x = 4894.72, y = -4915.29, z = 2.40, heading = 201.51 } - } - }, - - --- Beach Dancer Female 2 - { - model = 'a_f_y_beach_01', - animation = { - dict = 'anim@amb@nightclub@dancers@crowddance_facedj@', - name = 'mi_dance_facedj_13_v2_female^1', - }, - locations = { - { x = 4897.1362, y = -4913.779, z = 2.30, heading = 8.6855 } - } - }, - - -- Jetski Dancer Male - { - model = 'a_m_y_jetski_01', - animation = { - dict = 'anim@amb@nightclub@dancers@crowddance_facedj@hi_intensity', - name = 'hi_dance_facedj_09_v1_male^2', - }, - locations = { - { x = 4897.0518, y = -4912.960, z = 2.40, heading = -160.3151 } -- Topless Girl - } - }, - - -- Kerry McIntost Dancer - { - model = 'ig_kerrymcintosh', - animation = { - dict = 'anim@amb@nightclub@dancers@crowddance_facedj@hi_intensity', - name = 'hi_dance_facedj_17_v2_female^3', - }, - locations = { - { x = 4891.78, y = -4912.63, z = 2.45, heading = 309.39 } - } - }, - - -- Porn Dude - { - model = 'csb_porndudes', - animation = { - dict = 'anim@amb@casino@mini@dance@dance_solo@female@var_b@', - name = 'med_center', - }, - locations = { - { x = 4892.4839, y = -4912.159, z = 2.40, heading = 125.2700 } - } - }, - - --- Beach DJ Security With Weapons - - { - model = 's_m_y_doorman_01', - animation = { - dict = 'anim@amb@nightclub@peds@', - name = 'amb_world_human_stand_guard_male_base' - }, - weapons = { - { name = 'weapon_microsmg', minAmmo = 20, maxAmmo = 100 } - }, - defaultWeapon = 'weapon_microsmg', - locations = { - { x = 4893.7612, y = -4904.039, z = 2.48, heading = -173.3417 }, - } - }, - - -- DJ Cayo Perico -- Dr Dre's model name is ig_ary - - { - model = 'ig_ary', - animation = { - dict = 'anim@amb@nightclub@djs@dixon@', - name = 'dixn_sync_cntr_b_dix', - }, - locations = { - { x = 4893.5679, y = -4905.452, z = 2.48, heading = 172.2963 } - } - }, - - -- Beach DJ Security Without Weapons - - { - model = 's_m_m_highsec_01', - animation = { - dict = 'anim@amb@nightclub@peds@', - name = 'amb_world_human_stand_guard_male_base' - }, - - locations = { - { x = 4895.06, y = -4908.66, z = 2.38, heading = 188.63 }, - } - }, - - -- Seated Beach Party Goers - - { - model = 'u_f_y_spyactress', --- Woman In Black Dress - animation = { - dict = 'anim@amb@office@seating@female@var_a@base@', - name = 'idle_b' - }, - - locations = { - { x = 4885.13, y = -4914.28, z = 1.90, heading = 128.06 }, - } - }, - - { - model = 'ig_bestmen', --- Man In Wedding Suit - animation = { - dict = 'anim@amb@office@boardroom@crew@male@var_c@base@', - name = 'base', - }, - - locations = { - { x = 4885.8091, y = -4915.331, z = 1.90, heading = 107.5300 }, - } - }, - - --- BAR STAFF - - { - model = 's_f_y_clubbar_01', --- Cayo Perico Bar Staff - animation = { - dict = 'anim@amb@clubhouse@bar@drink@base', - name = 'idle_a', - }, - locations = { - { x = 4904.8154, y = -4941.528, z = 2.45, heading = 36.7061 }, - } - }, - - -- PILOT AT AIRFIELD CAYO PERICO - { - model = 'IG_Pilot', - scenario = 'WORLD_HUMAN_STAND_MOBILE', - locations = { - { x = 4440.37, y = -4482.26, z = 3.27, heading = 210.34 }, - } - }, - - -- VALET AT BEACH PARTY - { - model = 's_m_y_valet_01', - scenario = 'WORLD_HUMAN_VALET', - locations = { - { x = 4907.2705078125, y = -4913.9614257813, z = 2.463925457, heading = 287.32322421 }, - } - }, - - -- MERRYWEATHER IN TOWERS WITH BINOCULARS - { - model = 's_m_y_blackops_01', - scenario = 'WORLD_HUMAN_BINOCULARS', - locations = { - { x = 5030.9106445313, y = -4627.9067382813, z = 20.684608459473, heading = 34.79280090332 }, - { x = 4875.4072265625, y = -4488.1630859375, z = 25.933807373047, heading = 83.770568847656 }, - { x = 4370.2875976563, y = -4571.6118164063, z = 12.275736808777, heading = 334.50433349609 }, - { x = 5361.9082, y = -5435.1821, z = 65.1765, heading = 323.9476 }, - { x = 5146.7139, y = -5050.6099, z = 19.3915, heading = 354.6688 }, - { x = 5140.0962, y = -5241.7681, z = 25.2919, heading = 43.7077 }, - { x = 4890.0098, y = -5458.5781, z = 46.5237, heading = 269.9973 }, - { x = 5042.2295, y = -5117.4565, z = 21.9446, heading = 181.5855 }, - } - }, - - --MERRYWEATHER GUARDS WITH CARBINE RIFLE - { - model = 's_m_y_blackops_02', - weapons = { - { name = 'weapon_carbinerifle', minAmmo = 20, maxAmmo = 100 } - }, - defaultWeapon = 'weapon_carbinerifle', - locations = { - { x = 5142.8008, y = -4950.2944, z = 13.3500, heading = 42.6497 }, -- Gate Guard - { x = 5389.8999, y = -5198.6660, z = 30.8349, heading = 240.1498 }, -- Drug Field - { x = 5590.2148, y = -5226.1582, z = 13.3706, heading = 231.7484 }, -- Anti Missle Launcher Guard? - { x = 4998.0562, y = -5168.9185, z = 1.7072, heading = 120.6005 }, -- Boat Docks Guard 1 - { x = 4563.7959, y = -4487.3418, z = 2.9870, heading = 20.6171 }, --Welcome Sign Guard - { x = 4521.5278, y = -4457.7344, z = 3.1947, heading = 27.2946 }, --Helipad Guard - { x = 4436.44, y = -4453.26, z = 3.3297, heading = 208.9827 }, -- Cayo Hangar - { x = 4282.7207, y = -4539.1514, z = 3.2392, heading = 200.9217 }, -- Anti Missle Launcher Guard Near Runway - } - }, - - { - model = 's_m_y_blackops_01', - weapons = { - { name = 'weapon_carbinerifle', minAmmo = 20, maxAmmo = 100 } - }, - defaultWeapon = 'weapon_carbinerifle', - locations = { - { x = 5158.2783, y = -4948.9546, z = 12.9534, heading = 224.3090 }, -- Gate Guard 2 - { x = 5272.7031, y = -5420.6362, z = 64.4035, heading = 329.7317 }, -- Gate Guard, Tallest Tower On Island - { x = 4963.0137, y = -5111.9639, z = 1.9689, heading = 160.8599 }, -- Boat Docks Guard, Drug Shed - { x = 5109.2515, y = -5150.1997, z = 0.9325, heading = 96.1466 }, -- Boat Docks West - { x = 5157.3232, y = -5113.3691, z = 2.2911, heading = 358.5474 }, -- Boat Docks West 2,Standing On Steps Outside Building - { x = 4965.4629, y = -4826.4941, z = 4.8288, heading = 22.4904 }, -- Guard Outside Beach Party Gates 1 - { x = 4480.9404, y = -4580.4287, z = 4.5550, heading = 20.5372 }, -- Guard at Substation (Power Station) - { x = 5053.6094, y = -4597.3765, z = 1.8886, heading = 159.2844 }, - } - }, - - { - model = 's_m_y_blackops_01', --Merryweather with patrol animation - scenario = 'WORLD_HUMAN_GUARD_PATROL', - weapons = { - { name = 'weapon_carbinerifle', minAmmo = 20, maxAmmo = 100 } - }, - defaultWeapon = 'weapon_carbinerifle', - locations = { - { x = 5139.5684, y = -4937.5210, z = 13.9347, heading = 50.7190 }, -- Gate Guard 3 - { x = 4446.5771, y = -4451.5332, z = 6.2374, heading = 111.5040 }, -- Hangar Patrol 2nd Floor - { x = 4841.7212, y = -5176.0024, z = 1.2985, heading = 289.3102 }, -- Anti Missle Launcher Guard? - { x = 5087.8208, y = -4684.2808, z = 1.3888, heading = 80.0721 }, -- Boat Docks Guard, Drug Shed 2 - } - }, - - { - model = 's_m_y_blackops_02', --Merryweather with guard animation - scenario = 'WORLD_HUMAN_GUARD_STAND', - - weapons = { - - { name = 'weapon_carbinerifle', minAmmo = 20, maxAmmo = 100 } - }, - defaultWeapon = 'weapon_carbinerifle', - locations = { - { x = 5006.0273, y = -4922.4644, z = 8.6626, heading = 290.6752 }, - { x = 5109.4121, y = -5524.6172, z = 53.2467, heading = 280.0641 }, - { x = 5171.5396, y = -4657.8398, z = 1.5275, heading = 77.1855 }, - { x = 4885.0913, y = -5174.4175, z = 1.4827, heading = 346.1322 }, - } - }, - - { - model = 's_m_y_blackops_01', --Merryweather with sniper in tower - weapons = { - { name = 'weapon_sniperrifle', minAmmo = 20, maxAmmo = 100 } - }, - defaultWeapon = 'weapon_sniperrifle', - locations = { - { x = 5150.6274, y = -4933.0078, z = 29.8734, heading = 52.5540 }, - { x = 5123.5562, y = -5528.3716, z = 69.9703, heading = 122.7477 }, - } - }, - - -- Extra Mansion Guards - - { - model = 's_m_m_highsec_01', - weapons = { - { name = 'weapon_carbinerifle_mk2', minAmmo = 20, maxAmmo = 100 } - }, - defaultWeapon = 'weapon_carbinerifle_mk2', - locations = { - { x = 4946.5654, y = -5665.4673, z = 20.6658, heading = 282.3007 }, - { x = 4910.4609, y = -5733.1348, z = 24.2037, heading = 252.8478 }, - { x = 4871.2104, y = -5735.6514, z = 26.2023, heading = 246.3334 }, - { x = 5046.8457, y = -5769.7402, z = 14.7255, heading = 47.4775 }, - { x = 5000.2114, y = -5730.1509, z = 18.9156, heading = 52.8169 }, - { x = 5001.8638, y = -5756.1729, z = 18.8802, heading = 67.9312 }, - } - }, - - { - model = 's_m_m_highsec_02', - weapons = { - { name = 'weapon_carbinerifle_mk2', minAmmo = 20, maxAmmo = 100 } - }, - defaultWeapon = 'weapon_carbinerifle_mk2', - locations = { - { x = 5051.1470, y = -5784.3750, z = 14.7277, heading = 147.6031 }, - { x = 5022.4614, y = -5800.7637, z = 16.6776, heading = 308.1763 }, - { x = 5005.8208, y = -5768.6450, z = 15.2817, heading = 236.7728 }, - { x = 4994.1494, y = -5754.9365, z = 18.9003, heading = 65.9903 }, - { x = 5082.0288, y = -5738.6846, z = 14.6775, heading = 235.2939 }, - { x = 5086.6831, y = -5732.8706, z = 14.7726, heading = 331.9359 }, - { x = 4971.1885, y = -5594.6016, z = 22.5804, heading = 334.4602 }, - } - }, + }, ]] + -- + + --- ISLAND DANCERS --- + + --- Beach Dancer Female + { + model = "a_f_y_beach_01", + animation = { + dict = "anim@amb@nightclub@dancers@solomun_entourage@", + name = "mi_dance_facedj_17_v1_female^1", + }, + locations = { + { x = 4892.0171, y = -4915.774, z = 2.40, heading = -20.3340 }, -- Young Beach Girl 1 + }, + }, + + --- Beach Dancer Male + { + model = "a_m_y_beach_01", + animation = { + dict = "anim@amb@nightclub@dancers@crowddance_facedj@hi_intensity", + name = "hi_dance_facedj_09_v2_male^2", + }, + locations = { + { x = 4892.9990, y = -4916.062, z = 2.40, heading = 67.3608 }, -- Young Beach Guy 1 + }, + }, + + -- Topless Dancer + { + model = "a_f_y_topless_01", + animation = { + dict = "anim@amb@nightclub@dancers@crowddance_facedj@hi_intensity", + name = "hi_dance_facedj_11_v2_female^1", + }, + locations = { + { x = 4895.0640, y = -4916.393, z = 2.40, heading = 8.6855 }, -- Topless Girl + }, + }, + + -- Male Drinking Beer 1 + { + model = "a_m_y_beach_01", + scenario = "WORLD_HUMAN_PARTYING", + locations = { + { x = 4894.72, y = -4915.29, z = 2.40, heading = 201.51 }, + }, + }, + + --- Beach Dancer Female 2 + { + model = "a_f_y_beach_01", + animation = { + dict = "anim@amb@nightclub@dancers@crowddance_facedj@", + name = "mi_dance_facedj_13_v2_female^1", + }, + locations = { + { x = 4897.1362, y = -4913.779, z = 2.30, heading = 8.6855 }, + }, + }, + + -- Jetski Dancer Male + { + model = "a_m_y_jetski_01", + animation = { + dict = "anim@amb@nightclub@dancers@crowddance_facedj@hi_intensity", + name = "hi_dance_facedj_09_v1_male^2", + }, + locations = { + { x = 4897.0518, y = -4912.960, z = 2.40, heading = -160.3151 }, -- Topless Girl + }, + }, + + -- Kerry McIntost Dancer + { + model = "ig_kerrymcintosh", + animation = { + dict = "anim@amb@nightclub@dancers@crowddance_facedj@hi_intensity", + name = "hi_dance_facedj_17_v2_female^3", + }, + locations = { + { x = 4891.78, y = -4912.63, z = 2.45, heading = 309.39 }, + }, + }, + + -- Porn Dude + { + model = "csb_porndudes", + animation = { + dict = "anim@amb@casino@mini@dance@dance_solo@female@var_b@", + name = "med_center", + }, + locations = { + { x = 4892.4839, y = -4912.159, z = 2.40, heading = 125.2700 }, + }, + }, + + --- Beach DJ Security With Weapons + + { + model = "s_m_y_doorman_01", + animation = { + dict = "anim@amb@nightclub@peds@", + name = "amb_world_human_stand_guard_male_base", + }, + weapons = { + { name = "weapon_microsmg", minAmmo = 20, maxAmmo = 100 }, + }, + defaultWeapon = "weapon_microsmg", + locations = { + { x = 4893.7612, y = -4904.039, z = 2.48, heading = -173.3417 }, + }, + }, + + -- DJ Cayo Perico -- Dr Dre's model name is ig_ary + + { + model = "ig_ary", + animation = { + dict = "anim@amb@nightclub@djs@dixon@", + name = "dixn_sync_cntr_b_dix", + }, + locations = { + { x = 4893.5679, y = -4905.452, z = 2.48, heading = 172.2963 }, + }, + }, + + -- Beach DJ Security Without Weapons + + { + model = "s_m_m_highsec_01", + animation = { + dict = "anim@amb@nightclub@peds@", + name = "amb_world_human_stand_guard_male_base", + }, + + locations = { + { x = 4895.06, y = -4908.66, z = 2.38, heading = 188.63 }, + }, + }, + + -- Seated Beach Party Goers + + { + model = "u_f_y_spyactress", --- Woman In Black Dress + animation = { + dict = "anim@amb@office@seating@female@var_a@base@", + name = "idle_b", + }, + + locations = { + { x = 4885.13, y = -4914.28, z = 1.90, heading = 128.06 }, + }, + }, + + { + model = "ig_bestmen", --- Man In Wedding Suit + animation = { + dict = "anim@amb@office@boardroom@crew@male@var_c@base@", + name = "base", + }, + + locations = { + { x = 4885.8091, y = -4915.331, z = 1.90, heading = 107.5300 }, + }, + }, + + --- BAR STAFF + + { + model = "s_f_y_clubbar_01", --- Cayo Perico Bar Staff + animation = { + dict = "anim@amb@clubhouse@bar@drink@base", + name = "idle_a", + }, + locations = { + { x = 4904.8154, y = -4941.528, z = 2.45, heading = 36.7061 }, + }, + }, + + -- PILOT AT AIRFIELD CAYO PERICO + { + model = "IG_Pilot", + scenario = "WORLD_HUMAN_STAND_MOBILE", + locations = { + { x = 4440.37, y = -4482.26, z = 3.27, heading = 210.34 }, + }, + }, + + -- VALET AT BEACH PARTY + { + model = "s_m_y_valet_01", + scenario = "WORLD_HUMAN_VALET", + locations = { + { x = 4907.2705078125, y = -4913.9614257813, z = 2.463925457, heading = 287.32322421 }, + }, + }, + + -- MERRYWEATHER IN TOWERS WITH BINOCULARS + { + model = "s_m_y_blackops_01", + scenario = "WORLD_HUMAN_BINOCULARS", + locations = { + { x = 5030.9106445313, y = -4627.9067382813, z = 20.684608459473, heading = 34.79280090332 }, + { x = 4875.4072265625, y = -4488.1630859375, z = 25.933807373047, heading = 83.770568847656 }, + { x = 4370.2875976563, y = -4571.6118164063, z = 12.275736808777, heading = 334.50433349609 }, + { x = 5361.9082, y = -5435.1821, z = 65.1765, heading = 323.9476 }, + { x = 5146.7139, y = -5050.6099, z = 19.3915, heading = 354.6688 }, + { x = 5140.0962, y = -5241.7681, z = 25.2919, heading = 43.7077 }, + { x = 4890.0098, y = -5458.5781, z = 46.5237, heading = 269.9973 }, + { x = 5042.2295, y = -5117.4565, z = 21.9446, heading = 181.5855 }, + }, + }, + + --MERRYWEATHER GUARDS WITH CARBINE RIFLE + { + model = "s_m_y_blackops_02", + weapons = { + { name = "weapon_carbinerifle", minAmmo = 20, maxAmmo = 100 }, + }, + defaultWeapon = "weapon_carbinerifle", + locations = { + { x = 5142.8008, y = -4950.2944, z = 13.3500, heading = 42.6497 }, -- Gate Guard + { x = 5389.8999, y = -5198.6660, z = 30.8349, heading = 240.1498 }, -- Drug Field + { x = 5590.2148, y = -5226.1582, z = 13.3706, heading = 231.7484 }, -- Anti Missle Launcher Guard? + { x = 4998.0562, y = -5168.9185, z = 1.7072, heading = 120.6005 }, -- Boat Docks Guard 1 + { x = 4563.7959, y = -4487.3418, z = 2.9870, heading = 20.6171 }, --Welcome Sign Guard + { x = 4521.5278, y = -4457.7344, z = 3.1947, heading = 27.2946 }, --Helipad Guard + { x = 4436.44, y = -4453.26, z = 3.3297, heading = 208.9827 }, -- Cayo Hangar + { x = 4282.7207, y = -4539.1514, z = 3.2392, heading = 200.9217 }, -- Anti Missle Launcher Guard Near Runway + }, + }, + + { + model = "s_m_y_blackops_01", + weapons = { + { name = "weapon_carbinerifle", minAmmo = 20, maxAmmo = 100 }, + }, + defaultWeapon = "weapon_carbinerifle", + locations = { + { x = 5158.2783, y = -4948.9546, z = 12.9534, heading = 224.3090 }, -- Gate Guard 2 + { x = 5272.7031, y = -5420.6362, z = 64.4035, heading = 329.7317 }, -- Gate Guard, Tallest Tower On Island + { x = 4963.0137, y = -5111.9639, z = 1.9689, heading = 160.8599 }, -- Boat Docks Guard, Drug Shed + { x = 5109.2515, y = -5150.1997, z = 0.9325, heading = 96.1466 }, -- Boat Docks West + { x = 5157.3232, y = -5113.3691, z = 2.2911, heading = 358.5474 }, -- Boat Docks West 2,Standing On Steps Outside Building + { x = 4965.4629, y = -4826.4941, z = 4.8288, heading = 22.4904 }, -- Guard Outside Beach Party Gates 1 + { x = 4480.9404, y = -4580.4287, z = 4.5550, heading = 20.5372 }, -- Guard at Substation (Power Station) + { x = 5053.6094, y = -4597.3765, z = 1.8886, heading = 159.2844 }, + }, + }, + + { + model = "s_m_y_blackops_01", --Merryweather with patrol animation + scenario = "WORLD_HUMAN_GUARD_PATROL", + weapons = { + { name = "weapon_carbinerifle", minAmmo = 20, maxAmmo = 100 }, + }, + defaultWeapon = "weapon_carbinerifle", + locations = { + { x = 5139.5684, y = -4937.5210, z = 13.9347, heading = 50.7190 }, -- Gate Guard 3 + { x = 4446.5771, y = -4451.5332, z = 6.2374, heading = 111.5040 }, -- Hangar Patrol 2nd Floor + { x = 4841.7212, y = -5176.0024, z = 1.2985, heading = 289.3102 }, -- Anti Missle Launcher Guard? + { x = 5087.8208, y = -4684.2808, z = 1.3888, heading = 80.0721 }, -- Boat Docks Guard, Drug Shed 2 + }, + }, + + { + model = "s_m_y_blackops_02", --Merryweather with guard animation + scenario = "WORLD_HUMAN_GUARD_STAND", + + weapons = { + + { name = "weapon_carbinerifle", minAmmo = 20, maxAmmo = 100 }, + }, + defaultWeapon = "weapon_carbinerifle", + locations = { + { x = 5006.0273, y = -4922.4644, z = 8.6626, heading = 290.6752 }, + { x = 5109.4121, y = -5524.6172, z = 53.2467, heading = 280.0641 }, + { x = 5171.5396, y = -4657.8398, z = 1.5275, heading = 77.1855 }, + { x = 4885.0913, y = -5174.4175, z = 1.4827, heading = 346.1322 }, + }, + }, + + { + model = "s_m_y_blackops_01", --Merryweather with sniper in tower + weapons = { + { name = "weapon_sniperrifle", minAmmo = 20, maxAmmo = 100 }, + }, + defaultWeapon = "weapon_sniperrifle", + locations = { + { x = 5150.6274, y = -4933.0078, z = 29.8734, heading = 52.5540 }, + { x = 5123.5562, y = -5528.3716, z = 69.9703, heading = 122.7477 }, + }, + }, + + -- Extra Mansion Guards + + { + model = "s_m_m_highsec_01", + weapons = { + { name = "weapon_carbinerifle_mk2", minAmmo = 20, maxAmmo = 100 }, + }, + defaultWeapon = "weapon_carbinerifle_mk2", + locations = { + { x = 4946.5654, y = -5665.4673, z = 20.6658, heading = 282.3007 }, + { x = 4910.4609, y = -5733.1348, z = 24.2037, heading = 252.8478 }, + { x = 4871.2104, y = -5735.6514, z = 26.2023, heading = 246.3334 }, + { x = 5046.8457, y = -5769.7402, z = 14.7255, heading = 47.4775 }, + { x = 5000.2114, y = -5730.1509, z = 18.9156, heading = 52.8169 }, + { x = 5001.8638, y = -5756.1729, z = 18.8802, heading = 67.9312 }, + }, + }, + + { + model = "s_m_m_highsec_02", + weapons = { + { name = "weapon_carbinerifle_mk2", minAmmo = 20, maxAmmo = 100 }, + }, + defaultWeapon = "weapon_carbinerifle_mk2", + locations = { + { x = 5051.1470, y = -5784.3750, z = 14.7277, heading = 147.6031 }, + { x = 5022.4614, y = -5800.7637, z = 16.6776, heading = 308.1763 }, + { x = 5005.8208, y = -5768.6450, z = 15.2817, heading = 236.7728 }, + { x = 4994.1494, y = -5754.9365, z = 18.9003, heading = 65.9903 }, + { x = 5082.0288, y = -5738.6846, z = 14.6775, heading = 235.2939 }, + { x = 5086.6831, y = -5732.8706, z = 14.7726, heading = 331.9359 }, + { x = 4971.1885, y = -5594.6016, z = 22.5804, heading = 334.4602 }, + }, + }, } diff --git a/server-data/resources/[maps]/CayoTwoIslands/scripts/static_emitters.lua b/server-data/resources/[maps]/CayoTwoIslands/scripts/static_emitters.lua index fa6ec0a2b..cbb20b926 100644 --- a/server-data/resources/[maps]/CayoTwoIslands/scripts/static_emitters.lua +++ b/server-data/resources/[maps]/CayoTwoIslands/scripts/static_emitters.lua @@ -2,10 +2,10 @@ Citizen.CreateThread(function() while true do Wait(0) if NetworkIsSessionStarted() then - SetStaticEmitterEnabled('SE_DLC_AW_ARENA_CONSTRUCTION_01', false) - SetStaticEmitterEnabled('SE_DLC_AW_ARENA_CROWD_BACKGROUND_MAIN', false) - SetStaticEmitterEnabled('SE_DLC_AW_CROWD_EXTERIOR_LOBBY', false) - SetStaticEmitterEnabled('SE_DLC_AW_CROWD_INTERIOR_LOBBY', false) + SetStaticEmitterEnabled("SE_DLC_AW_ARENA_CONSTRUCTION_01", false) + SetStaticEmitterEnabled("SE_DLC_AW_ARENA_CROWD_BACKGROUND_MAIN", false) + SetStaticEmitterEnabled("SE_DLC_AW_CROWD_EXTERIOR_LOBBY", false) + SetStaticEmitterEnabled("SE_DLC_AW_CROWD_INTERIOR_LOBBY", false) return end end diff --git a/server-data/resources/[maps]/CayoTwoIslands/scripts/twoislands.lua b/server-data/resources/[maps]/CayoTwoIslands/scripts/twoislands.lua index 9a5f56652..3e91b7919 100644 --- a/server-data/resources/[maps]/CayoTwoIslands/scripts/twoislands.lua +++ b/server-data/resources/[maps]/CayoTwoIslands/scripts/twoislands.lua @@ -321,9 +321,9 @@ end) CreateThread(function() SetZoneEnabled(GetZoneFromNameId("PrLog"), false) -- REMOVES SNOW FROM CP - SetScenarioGroupEnabled('Heist_Island_Peds', true) - SetAmbientZoneListStatePersistent('AZL_DLC_Hei4_Island_Zones', 1, 1) -- Ambient Sounds For Cayo Perico - SetAmbientZoneListStatePersistent('AZL_DLC_Hei4_Island_Disabled_Zones', 0, 1) -- Disable Other Ambient Sounds + SetScenarioGroupEnabled("Heist_Island_Peds", true) + SetAmbientZoneListStatePersistent("AZL_DLC_Hei4_Island_Zones", 1, 1) -- Ambient Sounds For Cayo Perico + SetAmbientZoneListStatePersistent("AZL_DLC_Hei4_Island_Disabled_Zones", 0, 1) -- Disable Other Ambient Sounds while true do local coords = GetEntityCoords(PlayerPedId()) @@ -370,7 +370,6 @@ CreateThread(function() SetRadarAsExteriorThisFrame() SetRadarAsInteriorThisFrame(GetHashKey("h4_fake_islandx"), 4700.0, -5145.0, 0, 0) wait = 0 - elseif not isCayoMinimapLoaded and nearIsland then -- If the minimap is not loaded with SetToggleMinimapHeistIsland and the player is close to cayo perico, then we load it isCayoMinimapLoaded = true diff --git a/server-data/resources/[maps]/CayoTwoIslands/scripts/zones.lua b/server-data/resources/[maps]/CayoTwoIslands/scripts/zones.lua index dd881a31a..d8eefd3b7 100644 --- a/server-data/resources/[maps]/CayoTwoIslands/scripts/zones.lua +++ b/server-data/resources/[maps]/CayoTwoIslands/scripts/zones.lua @@ -1,31 +1,31 @@ local zones = { - ["AIRP"] = "Los Santos International Airport", - ["ALAMO"] = "Alamo Sea", - ["ALTA"] = "Alta", - ["ARMYB"] = "Fort Zancudo", - ["BANHAMC"] = "Banham Canyon Dr", - ["BANNING"] = "Banning", - ["BEACH"] = "Vespucci Beach", - ["BHAMCA"] = "Banham Canyon", - ["BRADP"] = "Braddock Pass", - ["BRADT"] = "Braddock Tunnel", - ["BURTON"] = "Burton", - ["CALAFB"] = "Calafia Bridge", - ["CANNY"] = "Raton Canyon", - ["CCREAK"] = "Cassidy Creek", - ["CHAMH"] = "Chamberlain Hills", - ["CHIL"] = "Vinewood Hills", - ["CHU"] = "Chumash", - ["CMSW"] = "Chiliad Mountain State Wilderness", - ["CYPRE"] = "Cypress Flats", - ["DAVIS"] = "Davis", - ["DELBE"] = "Del Perro Beach", - ["DELPE"] = "Del Perro", - ["DELSOL"] = "La Puerta", - ["DESRT"] = "Grand Senora Desert", - ["DOWNT"] = "Downtown", - ["DTVINE"] = "Downtown Vinewood", - ["EAST_V"] = "East Vinewood", + ["AIRP"] = "Los Santos International Airport", + ["ALAMO"] = "Alamo Sea", + ["ALTA"] = "Alta", + ["ARMYB"] = "Fort Zancudo", + ["BANHAMC"] = "Banham Canyon Dr", + ["BANNING"] = "Banning", + ["BEACH"] = "Vespucci Beach", + ["BHAMCA"] = "Banham Canyon", + ["BRADP"] = "Braddock Pass", + ["BRADT"] = "Braddock Tunnel", + ["BURTON"] = "Burton", + ["CALAFB"] = "Calafia Bridge", + ["CANNY"] = "Raton Canyon", + ["CCREAK"] = "Cassidy Creek", + ["CHAMH"] = "Chamberlain Hills", + ["CHIL"] = "Vinewood Hills", + ["CHU"] = "Chumash", + ["CMSW"] = "Chiliad Mountain State Wilderness", + ["CYPRE"] = "Cypress Flats", + ["DAVIS"] = "Davis", + ["DELBE"] = "Del Perro Beach", + ["DELPE"] = "Del Perro", + ["DELSOL"] = "La Puerta", + ["DESRT"] = "Grand Senora Desert", + ["DOWNT"] = "Downtown", + ["DTVINE"] = "Downtown Vinewood", + ["EAST_V"] = "East Vinewood", ["EBURO"] = "El Burro Heights", ["ELGORL"] = "El Gordo Lighthouse", ["ELYSIAN"] = "Elysian Island", @@ -89,4 +89,4 @@ local zones = { ["ZANCUDO"] = "Zancudo River", ["ZP_ORT"] = "Port of South Los Santos", ["ZQ_UAR"] = "Davis Quartz", -} \ No newline at end of file +} diff --git a/server-data/resources/[maps]/bob74_ipl/fxmanifest.lua b/server-data/resources/[maps]/bob74_ipl/fxmanifest.lua index 6eeb0a018..1c82ddc52 100644 --- a/server-data/resources/[maps]/bob74_ipl/fxmanifest.lua +++ b/server-data/resources/[maps]/bob74_ipl/fxmanifest.lua @@ -12,119 +12,23 @@ version("2.0.15") lua54("yes") client_scripts({ - "lib/common.lua", - "lib/observers/interiorIdObserver.lua", - "lib/observers/officeSafeDoorHandler.lua", - "client.lua" - -- GTA V -, - "gtav/base.lua", -- Base IPLs to fix holes - "gtav/ammunations.lua", - "gtav/bahama.lua", - "gtav/floyd.lua", - "gtav/franklin.lua", - "gtav/franklin_aunt.lua", - "gtav/graffitis.lua", - "gtav/pillbox_hospital.lua", - "gtav/lester_factory.lua", - "gtav/michael.lua", - "gtav/north_yankton.lua", - "gtav/red_carpet.lua", - "gtav/simeon.lua", - "gtav/stripclub.lua", - "gtav/trevors_trailer.lua", - "gtav/ufo.lua", - "gtav/zancudo_gates.lua" - -- GTA Online -, - "gta_online/apartment_hi_1.lua", - "gta_online/apartment_hi_2.lua", - "gta_online/house_hi_1.lua", - "gta_online/house_hi_2.lua", - "gta_online/house_hi_3.lua", - "gta_online/house_hi_4.lua", - "gta_online/house_hi_5.lua", - "gta_online/house_hi_6.lua", - "gta_online/house_hi_7.lua", - "gta_online/house_hi_8.lua", - "gta_online/house_mid_1.lua", - "gta_online/house_low_1.lua" - -- DLC High Life -, - "dlc_high_life/apartment1.lua", - "dlc_high_life/apartment2.lua", - "dlc_high_life/apartment3.lua", - "dlc_high_life/apartment4.lua", - "dlc_high_life/apartment5.lua", - "dlc_high_life/apartment6.lua" - -- DLC Heists -, - "dlc_heists/carrier.lua", - "dlc_heists/yacht.lua" - -- DLC Executives & Other Criminals -, - "dlc_executive/apartment1.lua", - "dlc_executive/apartment2.lua", - "dlc_executive/apartment3.lua" - -- DLC Finance & Felony -, - "dlc_finance/office1.lua", - "dlc_finance/office2.lua", - "dlc_finance/office3.lua", - "dlc_finance/office4.lua", - "dlc_finance/organization.lua" - -- DLC Bikers -, - "dlc_bikers/cocaine.lua", - "dlc_bikers/counterfeit_cash.lua", - "dlc_bikers/document_forgery.lua", - "dlc_bikers/meth.lua", - "dlc_bikers/weed.lua", - "dlc_bikers/clubhouse1.lua", - "dlc_bikers/clubhouse2.lua", - "dlc_bikers/gang.lua" - -- DLC Import/Export -, - "dlc_import/garage1.lua", - "dlc_import/garage2.lua", - "dlc_import/garage3.lua", - "dlc_import/garage4.lua", - "dlc_import/vehicle_warehouse.lua" - -- DLC Gunrunning -, - "dlc_gunrunning/bunkers.lua", - "dlc_gunrunning/yacht.lua" - -- DLC Smuggler's Run -, - "dlc_smuggler/hangar.lua" - -- DLC Doomsday Heist -, - "dlc_doomsday/facility.lua" - -- DLC After Hours -, - "dlc_afterhours/nightclubs.lua" - -- DLC Diamond Casino (Requires forced build 2060 or higher) -, - "dlc_casino/casino.lua", - "dlc_casino/penthouse.lua" - -- DLC Tuners (Requires forced build 2372 or higher) -, - "dlc_tuner/garage.lua", - "dlc_tuner/meetup.lua", - "dlc_tuner/methlab.lua" - -- DLC The Contract (Requires forced build 2545 or higher) -, - "dlc_security/studio.lua", - "dlc_security/billboards.lua", - "dlc_security/musicrooftop.lua", - "dlc_security/garage.lua", - "dlc_security/office1.lua", - "dlc_security/office2.lua", - "dlc_security/office3.lua", - "dlc_security/office4.lua" - -- DLC The Criminal Enterprises (Requires forced build 2699 or higher) -, - "gta_mpsum2/simeonfix.lua", - "gta_mpsum2/vehicle_warehouse.lua", - "gta_mpsum2/warehouse.lua", + "lib/*.lua", + "lib/observers/*.lua", + "client.lua", + "gtav/*.lua", + "gta_online/*.lua", + "dlc_high_life/*.lua", + "dlc_heists/*.lua", + "dlc_executive/*.lua", + "dlc_finance/*.lua", + "dlc_bikers/*.lua", + "dlc_import/*.lua", + "dlc_gunrunning/*.lua", + "dlc_smuggler/*.lua", + "dlc_doomsday/*.lua", + "dlc_afterhours/*.lua", + "dlc_casino/*.lua", + "dlc_tuner/*.lua", + "dlc_security/*.lua", + "gta_mpsum2/*.lua", })