From e9e86905579fc99cbc84fb275671a559bc08e52a Mon Sep 17 00:00:00 2001 From: Romain Lanz Date: Sun, 8 Oct 2017 12:12:38 +0200 Subject: [PATCH] chore(style): correct indentation --- .editorconfig | 9 + __resource.lua | 36 +- client/main.lua | 1374 +++++++++++++++--------------- config.lua | 2 +- esx_property.sql | 98 +-- locales/br.lua | 52 +- locales/de.lua | 54 +- locales/en.lua | 54 +- locales/es.lua | 62 +- locales/fr.lua | 54 +- localization/de_esx_property.sql | 98 +-- offices.sql | 62 +- server/main.lua | 702 +++++++-------- 13 files changed, 1333 insertions(+), 1324 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..41c2aaf2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 2 +indent_style = space +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/__resource.lua b/__resource.lua index 33a3adc0..0c253fc9 100644 --- a/__resource.lua +++ b/__resource.lua @@ -5,28 +5,28 @@ description 'ESX Property' version '1.0.0' server_scripts { - '@es_extended/locale.lua', - 'locales/de.lua', - 'locales/br.lua', - 'locales/en.lua', - 'locales/fr.lua', - 'locales/es.lua', - '@mysql-async/lib/MySQL.lua', - 'config.lua', - 'server/main.lua' + '@es_extended/locale.lua', + 'locales/de.lua', + 'locales/br.lua', + 'locales/en.lua', + 'locales/fr.lua', + 'locales/es.lua', + '@mysql-async/lib/MySQL.lua', + 'config.lua', + 'server/main.lua' } client_scripts { - '@es_extended/locale.lua', - 'locales/de.lua', - 'locales/br.lua', - 'locales/en.lua', - 'locales/fr.lua', - 'locales/es.lua', - 'config.lua', - 'client/main.lua' + '@es_extended/locale.lua', + 'locales/de.lua', + 'locales/br.lua', + 'locales/en.lua', + 'locales/fr.lua', + 'locales/es.lua', + 'config.lua', + 'client/main.lua' } dependencies { - 'instance' + 'instance' } diff --git a/client/main.lua b/client/main.lua index 6f376dae..df395de4 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,13 +1,13 @@ local Keys = { - ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57, - ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177, - ["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18, - ["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182, - ["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81, - ["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70, - ["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178, - ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173, - ["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118 + ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57, + ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177, + ["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18, + ["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182, + ["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81, + ["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70, + ["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178, + ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173, + ["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118 } ESX = nil @@ -28,1067 +28,1067 @@ local HasChest = false function DrawSub(text, time) ClearPrints() - SetTextEntry_2('STRING') - AddTextComponentString(text) - DrawSubtitleTimed(time, 1) + SetTextEntry_2('STRING') + AddTextComponentString(text) + DrawSubtitleTimed(time, 1) end function CreateBlips() - for i=1, #Config.Properties, 1 do + for i=1, #Config.Properties, 1 do - local property = Config.Properties[i] + local property = Config.Properties[i] - if property.entering ~= nil then + if property.entering ~= nil then - Blips[property.name] = AddBlipForCoord(property.entering.x, property.entering.y, property.entering.z) + Blips[property.name] = AddBlipForCoord(property.entering.x, property.entering.y, property.entering.z) - SetBlipSprite (Blips[property.name], 369) - SetBlipDisplay(Blips[property.name], 4) - SetBlipScale (Blips[property.name], 1.0) - SetBlipAsShortRange(Blips[property.name], true) + SetBlipSprite (Blips[property.name], 369) + SetBlipDisplay(Blips[property.name], 4) + SetBlipScale (Blips[property.name], 1.0) + SetBlipAsShortRange(Blips[property.name], true) - BeginTextCommandSetBlipName("STRING") - AddTextComponentString(_U('free_prop')) - EndTextCommandSetBlipName(Blips[property.name]) + BeginTextCommandSetBlipName("STRING") + AddTextComponentString(_U('free_prop')) + EndTextCommandSetBlipName(Blips[property.name]) - end - end + end + end end function GetProperties() - return Config.Properties + return Config.Properties end function GetProperty(name) - for i=1, #Config.Properties, 1 do - if Config.Properties[i].name == name then - return Config.Properties[i] - end - end + for i=1, #Config.Properties, 1 do + if Config.Properties[i].name == name then + return Config.Properties[i] + end + end end function GetGateway(property) - for i=1, #Config.Properties, 1 do + for i=1, #Config.Properties, 1 do - local property2 = Config.Properties[i] + local property2 = Config.Properties[i] - if property2.isGateway and property2.name == property.gateway then - return property2 - end + if property2.isGateway and property2.name == property.gateway then + return property2 + end - end + end end function GetGatewayProperties(property) - local properties = {} + local properties = {} - for i=1, #Config.Properties, 1 do - if Config.Properties[i].gateway == property.name then - table.insert(properties, Config.Properties[i]) - end - end + for i=1, #Config.Properties, 1 do + if Config.Properties[i].gateway == property.name then + table.insert(properties, Config.Properties[i]) + end + end - return properties + return properties end function EnterProperty(name, owner) - local property = GetProperty(name) - local playerPed = GetPlayerPed(-1) - CurrentProperty = property - CurrentPropertyOwner = owner + local property = GetProperty(name) + local playerPed = GetPlayerPed(-1) + CurrentProperty = property + CurrentPropertyOwner = owner - for i=1, #Config.Properties, 1 do - if Config.Properties[i].name ~= name then - Config.Properties[i].disabled = true - end - end + for i=1, #Config.Properties, 1 do + if Config.Properties[i].name ~= name then + Config.Properties[i].disabled = true + end + end - TriggerServerEvent('esx_property:saveLastProperty', name) + TriggerServerEvent('esx_property:saveLastProperty', name) - Citizen.CreateThread(function() + Citizen.CreateThread(function() - DoScreenFadeOut(800) + DoScreenFadeOut(800) - while not IsScreenFadedOut() do - Citizen.Wait(0) - end + while not IsScreenFadedOut() do + Citizen.Wait(0) + end - for i=1, #property.ipls, 1 do + for i=1, #property.ipls, 1 do - RequestIpl(property.ipls[i]) + RequestIpl(property.ipls[i]) - while not IsIplActive(property.ipls[i]) do - Citizen.Wait(0) - end + while not IsIplActive(property.ipls[i]) do + Citizen.Wait(0) + end - end + end - SetEntityCoords(playerPed, property.inside.x, property.inside.y, property.inside.z) + SetEntityCoords(playerPed, property.inside.x, property.inside.y, property.inside.z) - DoScreenFadeIn(800) + DoScreenFadeIn(800) - DrawSub(property.label, 5000) - end) + DrawSub(property.label, 5000) + end) end function ExitProperty(name) - local property = GetProperty(name) - local playerPed = GetPlayerPed(-1) - local outside = nil - CurrentProperty = nil + local property = GetProperty(name) + local playerPed = GetPlayerPed(-1) + local outside = nil + CurrentProperty = nil - if property.isSingle then - outside = property.outside - else - outside = GetGateway(property).outside - end + if property.isSingle then + outside = property.outside + else + outside = GetGateway(property).outside + end - TriggerServerEvent('esx_property:deleteLastProperty') + TriggerServerEvent('esx_property:deleteLastProperty') - Citizen.CreateThread(function() + Citizen.CreateThread(function() - DoScreenFadeOut(800) + DoScreenFadeOut(800) - while not IsScreenFadedOut() do - Citizen.Wait(0) - end + while not IsScreenFadedOut() do + Citizen.Wait(0) + end - SetEntityCoords(playerPed, outside.x, outside.y, outside.z) + SetEntityCoords(playerPed, outside.x, outside.y, outside.z) - for i=1, #property.ipls, 1 do - RemoveIpl(property.ipls[i]) - end + for i=1, #property.ipls, 1 do + RemoveIpl(property.ipls[i]) + end - for i=1, #Config.Properties, 1 do - Config.Properties[i].disabled = false - end + for i=1, #Config.Properties, 1 do + Config.Properties[i].disabled = false + end - DoScreenFadeIn(800) + DoScreenFadeIn(800) - end) + end) end function SetPropertyOwned(name, owned) - local property = GetProperty(name) - local entering = nil - local enteringName = nil + local property = GetProperty(name) + local entering = nil + local enteringName = nil - if property.isSingle then - entering = property.entering - enteringName = property.name - else - local gateway = GetGateway(property) - entering = gateway.entering - enteringName = gateway.name - end + if property.isSingle then + entering = property.entering + enteringName = property.name + else + local gateway = GetGateway(property) + entering = gateway.entering + enteringName = gateway.name + end - if owned then + if owned then - OwnedProperties[name] = true + OwnedProperties[name] = true - RemoveBlip(Blips[enteringName]) + RemoveBlip(Blips[enteringName]) - Blips[enteringName] = AddBlipForCoord(entering.x, entering.y, entering.z) + Blips[enteringName] = AddBlipForCoord(entering.x, entering.y, entering.z) - SetBlipSprite(Blips[enteringName], 357) - SetBlipAsShortRange(Blips[enteringName], true) + SetBlipSprite(Blips[enteringName], 357) + SetBlipAsShortRange(Blips[enteringName], true) - BeginTextCommandSetBlipName("STRING") - AddTextComponentString(_U('property')) - EndTextCommandSetBlipName(Blips[enteringName]) + BeginTextCommandSetBlipName("STRING") + AddTextComponentString(_U('property')) + EndTextCommandSetBlipName(Blips[enteringName]) - else + else - OwnedProperties[name] = nil + OwnedProperties[name] = nil - local found = false + local found = false - for k,v in pairs(OwnedProperties) do + for k,v in pairs(OwnedProperties) do - local _property = GetProperty(k) - local _gateway = GetGateway(_property) + local _property = GetProperty(k) + local _gateway = GetGateway(_property) - if _gateway ~= nil then + if _gateway ~= nil then - if _gateway.name == enteringName then - found = true - break - end - end + if _gateway.name == enteringName then + found = true + break + end + end - end + end - if not found then + if not found then - RemoveBlip(Blips[enteringName]) + RemoveBlip(Blips[enteringName]) - Blips[enteringName] = AddBlipForCoord(entering.x, entering.y, entering.z) + Blips[enteringName] = AddBlipForCoord(entering.x, entering.y, entering.z) - SetBlipSprite(Blips[enteringName], 369) - SetBlipAsShortRange(Blips[enteringName], true) + SetBlipSprite(Blips[enteringName], 369) + SetBlipAsShortRange(Blips[enteringName], true) - BeginTextCommandSetBlipName("STRING") - AddTextComponentString(_U('free_prop')) - EndTextCommandSetBlipName(Blips[enteringName]) + BeginTextCommandSetBlipName("STRING") + AddTextComponentString(_U('free_prop')) + EndTextCommandSetBlipName(Blips[enteringName]) - end + end - end + end end function PropertyIsOwned(property) - return OwnedProperties[property.name] == true + return OwnedProperties[property.name] == true end function OpenPropertyMenu(property) - local elements = {} + local elements = {} - if PropertyIsOwned(property) then + if PropertyIsOwned(property) then - table.insert(elements, {label = _U('enter'), value = 'enter'}) + table.insert(elements, {label = _U('enter'), value = 'enter'}) - if not Config.EnablePlayerManagement then - table.insert(elements, {label = _U('leave'), value = 'leave'}) - end + if not Config.EnablePlayerManagement then + table.insert(elements, {label = _U('leave'), value = 'leave'}) + end - else + else - if not Config.EnablePlayerManagement then - table.insert(elements, {label = _U('buy'), value = 'buy'}) - table.insert(elements, {label = _U('rent'), value = 'rent'}) - end + if not Config.EnablePlayerManagement then + table.insert(elements, {label = _U('buy'), value = 'buy'}) + table.insert(elements, {label = _U('rent'), value = 'rent'}) + end - table.insert(elements, {label = _U('visit'), value = 'visit'}) + table.insert(elements, {label = _U('visit'), value = 'visit'}) - end + end - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'property', - { - title = property.label, - align = 'top-left', - elements = elements, - }, - function(data2, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'property', + { + title = property.label, + align = 'top-left', + elements = elements, + }, + function(data2, menu) - menu.close() + menu.close() - if data2.current.value == 'enter' then - TriggerEvent('instance:create', 'property', {property = property.name, owner = ESX.GetPlayerData().identifier}) - end + if data2.current.value == 'enter' then + TriggerEvent('instance:create', 'property', {property = property.name, owner = ESX.GetPlayerData().identifier}) + end - if data2.current.value == 'leave' then - TriggerServerEvent('esx_property:removeOwnedProperty', property.name) - end + if data2.current.value == 'leave' then + TriggerServerEvent('esx_property:removeOwnedProperty', property.name) + end - if data2.current.value == 'buy' then - TriggerServerEvent('esx_property:buyProperty', property.name) - end + if data2.current.value == 'buy' then + TriggerServerEvent('esx_property:buyProperty', property.name) + end - if data2.current.value == 'rent' then - TriggerServerEvent('esx_property:rentProperty', property.name) - end + if data2.current.value == 'rent' then + TriggerServerEvent('esx_property:rentProperty', property.name) + end - if data2.current.value == 'visit' then - TriggerEvent('instance:create', 'property', {property = property.name, owner = ESX.GetPlayerData().identifier}) - end + if data2.current.value == 'visit' then + TriggerEvent('instance:create', 'property', {property = property.name, owner = ESX.GetPlayerData().identifier}) + end - end, - function(data, menu) + end, + function(data, menu) - menu.close() + menu.close() - CurrentAction = 'property_menu' - CurrentActionMsg = _U('press_to_menu') - CurrentActionData = {property = property} - end - ) + CurrentAction = 'property_menu' + CurrentActionMsg = _U('press_to_menu') + CurrentActionData = {property = property} + end + ) end function OpenGatewayMenu(property) - if Config.EnablePlayerManagement then - OpenGatewayOwnedPropertiesMenu(gatewayProperties) - else + if Config.EnablePlayerManagement then + OpenGatewayOwnedPropertiesMenu(gatewayProperties) + else - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'gateway', - { - title = property.name, - align = 'top-left', - elements = { - {label = _U('owned_properties'), value = 'owned_properties'}, - {label = _U('available_properties'), value = 'available_properties'}, - } - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'gateway', + { + title = property.name, + align = 'top-left', + elements = { + {label = _U('owned_properties'), value = 'owned_properties'}, + {label = _U('available_properties'), value = 'available_properties'}, + } + }, + function(data, menu) - if data.current.value == 'owned_properties' then - OpenGatewayOwnedPropertiesMenu(property) - end + if data.current.value == 'owned_properties' then + OpenGatewayOwnedPropertiesMenu(property) + end - if data.current.value == 'available_properties' then - OpenGatewayAvailablePropertiesMenu(property) - end + if data.current.value == 'available_properties' then + OpenGatewayAvailablePropertiesMenu(property) + end - end, - function(data, menu) + end, + function(data, menu) - menu.close() + menu.close() - CurrentAction = 'gateway_menu' - CurrentActionMsg = _U('press_to_menu') - CurrentActionData = {property = property} + CurrentAction = 'gateway_menu' + CurrentActionMsg = _U('press_to_menu') + CurrentActionData = {property = property} - end - ) + end + ) - end + end end function OpenGatewayOwnedPropertiesMenu(property) - local gatewayProperties = GetGatewayProperties(property) - local elements = {} + local gatewayProperties = GetGatewayProperties(property) + local elements = {} - for i=1, #gatewayProperties, 1 do + for i=1, #gatewayProperties, 1 do - if PropertyIsOwned(gatewayProperties[i]) then - table.insert(elements, { - label = gatewayProperties[i].label, - value = gatewayProperties[i].name - }) - end + if PropertyIsOwned(gatewayProperties[i]) then + table.insert(elements, { + label = gatewayProperties[i].label, + value = gatewayProperties[i].name + }) + end - end + end - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'gateway_owned_properties', - { - title = property.name .. ' - ' .. _U('owned_properties'), - align = 'top-left', - elements = elements, - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'gateway_owned_properties', + { + title = property.name .. ' - ' .. _U('owned_properties'), + align = 'top-left', + elements = elements, + }, + function(data, menu) - menu.close() + menu.close() - local elements = { - {label = _U('enter'), value = 'enter'} - } + local elements = { + {label = _U('enter'), value = 'enter'} + } - if not Config.EnablePlayerManagement then - table.insert(elements, {label = _U('leave'), value = 'leave'}) - end + if not Config.EnablePlayerManagement then + table.insert(elements, {label = _U('leave'), value = 'leave'}) + end - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'gateway_owned_properties_actions', - { - title = data.current.label, - align = 'top-left', - elements = elements, - }, - function(data2, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'gateway_owned_properties_actions', + { + title = data.current.label, + align = 'top-left', + elements = elements, + }, + function(data2, menu) - menu.close() + menu.close() - if data2.current.value == 'enter' then - TriggerEvent('instance:create', 'property', {property = data.current.value, owner = ESX.GetPlayerData().identifier}) - end + if data2.current.value == 'enter' then + TriggerEvent('instance:create', 'property', {property = data.current.value, owner = ESX.GetPlayerData().identifier}) + end - if data2.current.value == 'leave' then - TriggerServerEvent('esx_property:removeOwnedProperty', data.current.value) - end + if data2.current.value == 'leave' then + TriggerServerEvent('esx_property:removeOwnedProperty', data.current.value) + end - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) end function OpenGatewayAvailablePropertiesMenu(property) - local gatewayProperties = GetGatewayProperties(property) - local elements = {} + local gatewayProperties = GetGatewayProperties(property) + local elements = {} - for i=1, #gatewayProperties, 1 do + for i=1, #gatewayProperties, 1 do - if not PropertyIsOwned(gatewayProperties[i]) then - table.insert(elements, { - label = gatewayProperties[i].label .. ' $' .. gatewayProperties[i].price, - value = gatewayProperties[i].name, - price = gatewayProperties[i].price - }) - end + if not PropertyIsOwned(gatewayProperties[i]) then + table.insert(elements, { + label = gatewayProperties[i].label .. ' $' .. gatewayProperties[i].price, + value = gatewayProperties[i].name, + price = gatewayProperties[i].price + }) + end - end + end - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'gateway_available_properties', - { - title = property.name.. ' - ' .. _U('available_properties'), - align = 'top-left', - elements = elements, - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'gateway_available_properties', + { + title = property.name.. ' - ' .. _U('available_properties'), + align = 'top-left', + elements = elements, + }, + function(data, menu) - menu.close() + menu.close() - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'gateway_available_properties_actions', - { - title = property.name, - align = 'top-left', - elements = { - {label = _U('buy'), value = 'buy'}, - {label = _U('rent'), value = 'rent'}, - {label = _U('visit'), value = 'visit'}, - }, - }, - function(data2, menu) - menu.close() + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'gateway_available_properties_actions', + { + title = property.name, + align = 'top-left', + elements = { + {label = _U('buy'), value = 'buy'}, + {label = _U('rent'), value = 'rent'}, + {label = _U('visit'), value = 'visit'}, + }, + }, + function(data2, menu) + menu.close() - if data2.current.value == 'buy' then - TriggerServerEvent('esx_property:buyProperty', data.current.value) - end + if data2.current.value == 'buy' then + TriggerServerEvent('esx_property:buyProperty', data.current.value) + end - if data2.current.value == 'rent' then - TriggerServerEvent('esx_property:rentProperty', data.current.value) - end + if data2.current.value == 'rent' then + TriggerServerEvent('esx_property:rentProperty', data.current.value) + end - if data2.current.value == 'visit' then - TriggerEvent('instance:create', 'property', {property = data.current.value, owner = ESX.GetPlayerData().identifier}) - end + if data2.current.value == 'visit' then + TriggerEvent('instance:create', 'property', {property = data.current.value, owner = ESX.GetPlayerData().identifier}) + end - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) end function OpenRoomMenu(property, owner) - local entering = nil - local elements = {} + local entering = nil + local elements = {} - if property.isSingle then - entering = property.entering - else - entering = GetGateway(property).entering - end + if property.isSingle then + entering = property.entering + else + entering = GetGateway(property).entering + end - table.insert(elements, {label = _U('invite_player'), value = 'invite_player'}) + table.insert(elements, {label = _U('invite_player'), value = 'invite_player'}) - if CurrentPropertyOwner == owner then - table.insert(elements, {label = _U('player_clothes'), value = 'player_dressing'}) - end + if CurrentPropertyOwner == owner then + table.insert(elements, {label = _U('player_clothes'), value = 'player_dressing'}) + end - table.insert(elements, {label = _U('remove_object'), value = 'room_inventory'}) - table.insert(elements, {label = _U('deposit_object'), value = 'player_inventory'}) + table.insert(elements, {label = _U('remove_object'), value = 'room_inventory'}) + table.insert(elements, {label = _U('deposit_object'), value = 'player_inventory'}) - ESX.UI.Menu.CloseAll() + ESX.UI.Menu.CloseAll() - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'room', - { - title = property.label, - align = 'top-left', - elements = elements, - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'room', + { + title = property.label, + align = 'top-left', + elements = elements, + }, + function(data, menu) - if data.current.value == 'invite_player' then + if data.current.value == 'invite_player' then - local playersInArea = ESX.Game.GetPlayersInArea(entering, 10.0) - local elements = {} + local playersInArea = ESX.Game.GetPlayersInArea(entering, 10.0) + local elements = {} - for i=1, #playersInArea, 1 do - if playersInArea[i] ~= PlayerId() then - table.insert(elements, {label = GetPlayerName(playersInArea[i]), value = playersInArea[i]}) - end - end + for i=1, #playersInArea, 1 do + if playersInArea[i] ~= PlayerId() then + table.insert(elements, {label = GetPlayerName(playersInArea[i]), value = playersInArea[i]}) + end + end - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'room_invite', - { - title = property.label .. ' - ' .. _U('invite'), - align = 'top-left', - elements = elements, - }, - function(data, menu) - TriggerEvent('instance:invite', 'property', GetPlayerServerId(data.current.value), {property = property.name, owner = owner}) - ESX.ShowNotification(_U('you_invited', GetPlayerName(data.current.value))) - end, - function(data, menu) - menu.close() - end - ) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'room_invite', + { + title = property.label .. ' - ' .. _U('invite'), + align = 'top-left', + elements = elements, + }, + function(data, menu) + TriggerEvent('instance:invite', 'property', GetPlayerServerId(data.current.value), {property = property.name, owner = owner}) + ESX.ShowNotification(_U('you_invited', GetPlayerName(data.current.value))) + end, + function(data, menu) + menu.close() + end + ) - end + end - if data.current.value == 'player_dressing' then + if data.current.value == 'player_dressing' then - ESX.TriggerServerCallback('esx_property:getPlayerDressing', function(dressing) + ESX.TriggerServerCallback('esx_property:getPlayerDressing', function(dressing) - local elements = {} + local elements = {} - for i=1, #dressing, 1 do - table.insert(elements, {label = dressing[i].label, value = dressing[i].skin}) - end + for i=1, #dressing, 1 do + table.insert(elements, {label = dressing[i].label, value = dressing[i].skin}) + end - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'player_dressing', - { - title = property.label .. ' - ' .. _U('player_clothes'), - align = 'top-left', - elements = elements, - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'player_dressing', + { + title = property.label .. ' - ' .. _U('player_clothes'), + align = 'top-left', + elements = elements, + }, + function(data, menu) - TriggerEvent('skinchanger:getSkin', function(skin) + TriggerEvent('skinchanger:getSkin', function(skin) - TriggerEvent('skinchanger:loadClothes', skin, data.current.value) - TriggerEvent('esx_skin:setLastSkin', skin) + TriggerEvent('skinchanger:loadClothes', skin, data.current.value) + TriggerEvent('esx_skin:setLastSkin', skin) - TriggerEvent('skinchanger:getSkin', function(skin) - TriggerServerEvent('esx_skin:save', skin) - end) + TriggerEvent('skinchanger:getSkin', function(skin) + TriggerServerEvent('esx_skin:save', skin) + end) - end) + end) - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) - end) + end) - end + end - if data.current.value == 'room_inventory' then - OpenRoomInventoryMenu(property, owner) - end + if data.current.value == 'room_inventory' then + OpenRoomInventoryMenu(property, owner) + end - if data.current.value == 'player_inventory' then - OpenPlayerInventoryMenu(property, owner) - end + if data.current.value == 'player_inventory' then + OpenPlayerInventoryMenu(property, owner) + end - end, - function(data, menu) + end, + function(data, menu) - menu.close() + menu.close() - CurrentAction = 'room_menu' - CurrentActionMsg = _U('press_to_menu') - CurrentActionData = {property = property, owner = owner} - end - ) + CurrentAction = 'room_menu' + CurrentActionMsg = _U('press_to_menu') + CurrentActionData = {property = property, owner = owner} + end + ) end function OpenRoomInventoryMenu(property, owner) - ESX.TriggerServerCallback('esx_property:getPropertyInventory', function(inventory) + ESX.TriggerServerCallback('esx_property:getPropertyInventory', function(inventory) - local elements = {} + local elements = {} - table.insert(elements, {label = _U('dirty_money') .. inventory.blackMoney, type = 'item_account', value = 'black_money'}) + table.insert(elements, {label = _U('dirty_money') .. inventory.blackMoney, type = 'item_account', value = 'black_money'}) - for i=1, #inventory.items, 1 do + for i=1, #inventory.items, 1 do - local item = inventory.items[i] + local item = inventory.items[i] - if item.count > 0 then - table.insert(elements, {label = item.label .. ' x' .. item.count, type = 'item_standard', value = item.name}) - end + if item.count > 0 then + table.insert(elements, {label = item.label .. ' x' .. item.count, type = 'item_standard', value = item.name}) + end - end + end - for i=1, #inventory.weapons, 1 do - local weapon = inventory.weapons[i] - table.insert(elements, {label = ESX.GetWeaponLabel(weapon.name) .. ' [' .. weapon.ammo .. ']', type = 'item_weapon', value = weapon.name, ammo = weapon.ammo}) - end + for i=1, #inventory.weapons, 1 do + local weapon = inventory.weapons[i] + table.insert(elements, {label = ESX.GetWeaponLabel(weapon.name) .. ' [' .. weapon.ammo .. ']', type = 'item_weapon', value = weapon.name, ammo = weapon.ammo}) + end - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'room_inventory', - { - title = property.label .. ' - ' .. _U('inventory'), - align = 'top-left', - elements = elements, - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'room_inventory', + { + title = property.label .. ' - ' .. _U('inventory'), + align = 'top-left', + elements = elements, + }, + function(data, menu) - if data.current.type == 'item_weapon' then + if data.current.type == 'item_weapon' then - menu.close() + menu.close() - TriggerServerEvent('esx_property:getItem', owner, data.current.type, data.current.value, data.current.ammo) + TriggerServerEvent('esx_property:getItem', owner, data.current.type, data.current.value, data.current.ammo) - ESX.SetTimeout(300, function() - OpenRoomInventoryMenu(property, owner) - end) + ESX.SetTimeout(300, function() + OpenRoomInventoryMenu(property, owner) + end) - else + else - ESX.UI.Menu.Open( - 'dialog', GetCurrentResourceName(), 'get_item_count', - { - title = _U('amount'), - }, - function(data2, menu) + ESX.UI.Menu.Open( + 'dialog', GetCurrentResourceName(), 'get_item_count', + { + title = _U('amount'), + }, + function(data2, menu) - local quantity = tonumber(data2.value) + local quantity = tonumber(data2.value) - if quantity == nil then - ESX.ShowNotification(_U('amount_invalid')) - else + if quantity == nil then + ESX.ShowNotification(_U('amount_invalid')) + else - menu.close() + menu.close() - TriggerServerEvent('esx_property:getItem', owner, data.current.type, data.current.value, quantity) + TriggerServerEvent('esx_property:getItem', owner, data.current.type, data.current.value, quantity) - ESX.SetTimeout(300, function() - OpenRoomInventoryMenu(property, owner) - end) + ESX.SetTimeout(300, function() + OpenRoomInventoryMenu(property, owner) + end) - end + end - end, - function(data2,menu) - menu.close() - end - ) + end, + function(data2,menu) + menu.close() + end + ) - end + end - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) - end, owner) + end, owner) end function OpenPlayerInventoryMenu(property, owner) - ESX.TriggerServerCallback('esx_property:getPlayerInventory', function(inventory) + ESX.TriggerServerCallback('esx_property:getPlayerInventory', function(inventory) - local elements = {} + local elements = {} - table.insert(elements, {label = _U('dirty_money') .. inventory.blackMoney, type = 'item_account', value = 'black_money'}) + table.insert(elements, {label = _U('dirty_money') .. inventory.blackMoney, type = 'item_account', value = 'black_money'}) - for i=1, #inventory.items, 1 do + for i=1, #inventory.items, 1 do - local item = inventory.items[i] + local item = inventory.items[i] - if item.count > 0 then - table.insert(elements, {label = item.label .. ' x' .. item.count, type = 'item_standard', value = item.name}) - end + if item.count > 0 then + table.insert(elements, {label = item.label .. ' x' .. item.count, type = 'item_standard', value = item.name}) + end - end + end - local playerPed = GetPlayerPed(-1) - local weaponList = ESX.GetWeaponList() + local playerPed = GetPlayerPed(-1) + local weaponList = ESX.GetWeaponList() - for i=1, #weaponList, 1 do + for i=1, #weaponList, 1 do - local weaponHash = GetHashKey(weaponList[i].name) + local weaponHash = GetHashKey(weaponList[i].name) - if HasPedGotWeapon(playerPed, weaponHash, false) and weaponList[i].name ~= 'WEAPON_UNARMED' then - local ammo = GetAmmoInPedWeapon(playerPed, weaponHash) - table.insert(elements, {label = weaponList[i].label .. ' [' .. ammo .. ']', type = 'item_weapon', value = weaponList[i].name, ammo = ammo}) - end + if HasPedGotWeapon(playerPed, weaponHash, false) and weaponList[i].name ~= 'WEAPON_UNARMED' then + local ammo = GetAmmoInPedWeapon(playerPed, weaponHash) + table.insert(elements, {label = weaponList[i].label .. ' [' .. ammo .. ']', type = 'item_weapon', value = weaponList[i].name, ammo = ammo}) + end - end + end - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'player_inventory', - { - title = property.label .. ' - ' .. _U('inventory'), - align = 'top-left', - elements = elements, - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'player_inventory', + { + title = property.label .. ' - ' .. _U('inventory'), + align = 'top-left', + elements = elements, + }, + function(data, menu) - if data.current.type == 'item_weapon' then + if data.current.type == 'item_weapon' then - menu.close() + menu.close() - TriggerServerEvent('esx_property:putItem', owner, data.current.type, data.current.value, data.current.ammo) + TriggerServerEvent('esx_property:putItem', owner, data.current.type, data.current.value, data.current.ammo) - ESX.SetTimeout(300, function() - OpenPlayerInventoryMenu(property, owner) - end) + ESX.SetTimeout(300, function() + OpenPlayerInventoryMenu(property, owner) + end) - else + else - ESX.UI.Menu.Open( - 'dialog', GetCurrentResourceName(), 'put_item_count', - { - title = _U('amount'), - }, - function(data2, menu) + ESX.UI.Menu.Open( + 'dialog', GetCurrentResourceName(), 'put_item_count', + { + title = _U('amount'), + }, + function(data2, menu) - menu.close() + menu.close() - TriggerServerEvent('esx_property:putItem', owner, data.current.type, data.current.value, tonumber(data2.value)) + TriggerServerEvent('esx_property:putItem', owner, data.current.type, data.current.value, tonumber(data2.value)) - ESX.SetTimeout(300, function() - OpenPlayerInventoryMenu(property, owner) - end) + ESX.SetTimeout(300, function() + OpenPlayerInventoryMenu(property, owner) + end) - end, - function(data2,menu) - menu.close() - end - ) + end, + function(data2,menu) + menu.close() + end + ) - end + end - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) - end) + end) end AddEventHandler('instance:loaded', function() - TriggerEvent('instance:registerType', 'property', - function(instance) - EnterProperty(instance.data.property, instance.data.owner) - end, - function(instance) - ExitProperty(instance.data.property) - end - ) - + TriggerEvent('instance:registerType', 'property', + function(instance) + EnterProperty(instance.data.property, instance.data.owner) + end, + function(instance) + ExitProperty(instance.data.property) + end + ) + end) AddEventHandler('playerSpawned', function() - if FirstSpawn then + if FirstSpawn then - Citizen.CreateThread(function() + Citizen.CreateThread(function() - while not ESX.IsPlayerLoaded() do - Citizen.Wait(0) - end + while not ESX.IsPlayerLoaded() do + Citizen.Wait(0) + end - ESX.TriggerServerCallback('esx_property:getLastProperty', function(propertyName) - if propertyName ~= nil then - TriggerEvent('instance:create', 'property', {property = propertyName, owner = ESX.GetPlayerData().identifier}) - end - end) + ESX.TriggerServerCallback('esx_property:getLastProperty', function(propertyName) + if propertyName ~= nil then + TriggerEvent('instance:create', 'property', {property = propertyName, owner = ESX.GetPlayerData().identifier}) + end + end) - end) + end) - FirstSpawn = false - end + FirstSpawn = false + end end) RegisterNetEvent('esx:playerLoaded') AddEventHandler('esx:playerLoaded', function(xPlayer) - PlayerLoaded = true + PlayerLoaded = true end) AddEventHandler('esx_property:getProperties', function(cb) - cb(GetProperties()) + cb(GetProperties()) end) AddEventHandler('esx_property:getProperty', function(name, cb) - cb(GetProperty(name)) + cb(GetProperty(name)) end) AddEventHandler('esx_property:getGateway', function(property, cb) - cb(GetGateway(property)) + cb(GetGateway(property)) end) RegisterNetEvent('esx_property:setPropertyOwned') AddEventHandler('esx_property:setPropertyOwned', function(name, owned) - SetPropertyOwned(name, owned) + SetPropertyOwned(name, owned) end) RegisterNetEvent('esx:playerLoaded') AddEventHandler('esx:playerLoaded', function(xPlayer) - ESX.TriggerServerCallback('esx_property:getOwnedProperties', function(ownedProperties) - for i=1, #ownedProperties, 1 do - SetPropertyOwned(ownedProperties[i], true) - end - end) + ESX.TriggerServerCallback('esx_property:getOwnedProperties', function(ownedProperties) + for i=1, #ownedProperties, 1 do + SetPropertyOwned(ownedProperties[i], true) + end + end) end) RegisterNetEvent('instance:onCreate') AddEventHandler('instance:onCreate', function(instance) - if instance.type == 'property' then - TriggerEvent('instance:enter', instance) - end + if instance.type == 'property' then + TriggerEvent('instance:enter', instance) + end end) RegisterNetEvent('instance:onEnter') AddEventHandler('instance:onEnter', function(instance) - - if instance.type == 'property' then - local property = GetProperty(instance.data.property) - local isHost = GetPlayerFromServerId(instance.host) == PlayerId() - local isOwned = false + if instance.type == 'property' then - if PropertyIsOwned(property) == true then - isOwned = true - end + local property = GetProperty(instance.data.property) + local isHost = GetPlayerFromServerId(instance.host) == PlayerId() + local isOwned = false - if(isOwned or not isHost) then - HasChest = true - else - HasChest = false - end + if PropertyIsOwned(property) == true then + isOwned = true + end - end + if(isOwned or not isHost) then + HasChest = true + else + HasChest = false + end + + end end) RegisterNetEvent('instance:onPlayerLeft') AddEventHandler('instance:onPlayerLeft', function(instance, player) - if player == instance.host then - TriggerEvent('instance:leave') - end + if player == instance.host then + TriggerEvent('instance:leave') + end end) AddEventHandler('esx_property:hasEnteredMarker', function(name, part) - local property = GetProperty(name) + local property = GetProperty(name) - if part == 'entering' then + if part == 'entering' then - if property.isSingle then - CurrentAction = 'property_menu' - CurrentActionMsg = _U('press_to_menu') - CurrentActionData = {property = property} - else - CurrentAction = 'gateway_menu' - CurrentActionMsg = _U('press_to_menu') - CurrentActionData = {property = property} - end + if property.isSingle then + CurrentAction = 'property_menu' + CurrentActionMsg = _U('press_to_menu') + CurrentActionData = {property = property} + else + CurrentAction = 'gateway_menu' + CurrentActionMsg = _U('press_to_menu') + CurrentActionData = {property = property} + end - end + end - if part == 'exit' then - CurrentAction = 'room_exit' - CurrentActionMsg = _U('press_to_exit') - CurrentActionData = {propertyName = name} - end + if part == 'exit' then + CurrentAction = 'room_exit' + CurrentActionMsg = _U('press_to_exit') + CurrentActionData = {propertyName = name} + end - if part == 'roomMenu' then - CurrentAction = 'room_menu' - CurrentActionMsg = _U('press_to_menu') - CurrentActionData = {property = property, owner = CurrentPropertyOwner} - end + if part == 'roomMenu' then + CurrentAction = 'room_menu' + CurrentActionMsg = _U('press_to_menu') + CurrentActionData = {property = property, owner = CurrentPropertyOwner} + end end) AddEventHandler('esx_property:hasExitedMarker', function(name, part) - ESX.UI.Menu.CloseAll() - CurrentAction = nil + ESX.UI.Menu.CloseAll() + CurrentAction = nil end) -- Init Citizen.CreateThread(function() - while ESX == nil do - TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) - Citizen.Wait(0) - end + while ESX == nil do + TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) + Citizen.Wait(0) + end - ESX.TriggerServerCallback('esx_property:getProperties', function(properties) - Config.Properties = properties - CreateBlips() - end) + ESX.TriggerServerCallback('esx_property:getProperties', function(properties) + Config.Properties = properties + CreateBlips() + end) end) -- Display markers Citizen.CreateThread(function() - while true do + while true do - Wait(0) + Wait(0) - local coords = GetEntityCoords(GetPlayerPed(-1)) + local coords = GetEntityCoords(GetPlayerPed(-1)) - for i=1, #Config.Properties, 1 do + for i=1, #Config.Properties, 1 do - local property = Config.Properties[i] - local isHost = false + local property = Config.Properties[i] + local isHost = false - if(property.entering ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.entering.x, property.entering.y, property.entering.z, true) < Config.DrawDistance) then - DrawMarker(Config.MarkerType, property.entering.x, property.entering.y, property.entering.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.MarkerSize.x, Config.MarkerSize.y, Config.MarkerSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false) - end + if(property.entering ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.entering.x, property.entering.y, property.entering.z, true) < Config.DrawDistance) then + DrawMarker(Config.MarkerType, property.entering.x, property.entering.y, property.entering.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.MarkerSize.x, Config.MarkerSize.y, Config.MarkerSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false) + end - if(property.exit ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.exit.x, property.exit.y, property.exit.z, true) < Config.DrawDistance) then - DrawMarker(Config.MarkerType, property.exit.x, property.exit.y, property.exit.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.MarkerSize.x, Config.MarkerSize.y, Config.MarkerSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false) - end + if(property.exit ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.exit.x, property.exit.y, property.exit.z, true) < Config.DrawDistance) then + DrawMarker(Config.MarkerType, property.exit.x, property.exit.y, property.exit.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.MarkerSize.x, Config.MarkerSize.y, Config.MarkerSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false) + end - if(property.roomMenu ~= nil and HasChest and not property.disabled and GetDistanceBetweenCoords(coords, property.roomMenu.x, property.roomMenu.y, property.roomMenu.z, true) < Config.DrawDistance) then - DrawMarker(Config.MarkerType, property.roomMenu.x, property.roomMenu.y, property.roomMenu.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.MarkerSize.x, Config.MarkerSize.y, Config.MarkerSize.z, Config.RoomMenuMarkerColor.r, Config.RoomMenuMarkerColor.g, Config.RoomMenuMarkerColor.b, 100, false, true, 2, false, false, false, false) - end + if(property.roomMenu ~= nil and HasChest and not property.disabled and GetDistanceBetweenCoords(coords, property.roomMenu.x, property.roomMenu.y, property.roomMenu.z, true) < Config.DrawDistance) then + DrawMarker(Config.MarkerType, property.roomMenu.x, property.roomMenu.y, property.roomMenu.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.MarkerSize.x, Config.MarkerSize.y, Config.MarkerSize.z, Config.RoomMenuMarkerColor.r, Config.RoomMenuMarkerColor.g, Config.RoomMenuMarkerColor.b, 100, false, true, 2, false, false, false, false) + end - end + end - end + end end) -- Enter / Exit marker events Citizen.CreateThread(function() - while true do + while true do - Wait(0) + Wait(0) - local coords = GetEntityCoords(GetPlayerPed(-1)) - local isInMarker = false - local currentProperty = nil - local currentPart = nil + local coords = GetEntityCoords(GetPlayerPed(-1)) + local isInMarker = false + local currentProperty = nil + local currentPart = nil - for i=1, #Config.Properties, 1 do + for i=1, #Config.Properties, 1 do - local property = Config.Properties[i] + local property = Config.Properties[i] - if(property.entering ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.entering.x, property.entering.y, property.entering.z, true) < Config.MarkerSize.x) then - isInMarker = true - currentProperty = property.name - currentPart = 'entering' - end + if(property.entering ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.entering.x, property.entering.y, property.entering.z, true) < Config.MarkerSize.x) then + isInMarker = true + currentProperty = property.name + currentPart = 'entering' + end - if(property.exit ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.exit.x, property.exit.y, property.exit.z, true) < Config.MarkerSize.x) then - isInMarker = true - currentProperty = property.name - currentPart = 'exit' - end + if(property.exit ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.exit.x, property.exit.y, property.exit.z, true) < Config.MarkerSize.x) then + isInMarker = true + currentProperty = property.name + currentPart = 'exit' + end - if(property.inside ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.inside.x, property.inside.y, property.inside.z, true) < Config.MarkerSize.x) then - isInMarker = true - currentProperty = property.name - currentPart = 'inside' - end + if(property.inside ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.inside.x, property.inside.y, property.inside.z, true) < Config.MarkerSize.x) then + isInMarker = true + currentProperty = property.name + currentPart = 'inside' + end - if(property.outside ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.outside.x, property.outside.y, property.outside.z, true) < Config.MarkerSize.x) then - isInMarker = true - currentProperty = property.name - currentPart = 'outside' - end + if(property.outside ~= nil and not property.disabled and GetDistanceBetweenCoords(coords, property.outside.x, property.outside.y, property.outside.z, true) < Config.MarkerSize.x) then + isInMarker = true + currentProperty = property.name + currentPart = 'outside' + end - if(property.roomMenu ~= nil and HasChest and not property.disabled and GetDistanceBetweenCoords(coords, property.roomMenu.x, property.roomMenu.y, property.roomMenu.z, true) < Config.MarkerSize.x) then - isInMarker = true - currentProperty = property.name - currentPart = 'roomMenu' - end + if(property.roomMenu ~= nil and HasChest and not property.disabled and GetDistanceBetweenCoords(coords, property.roomMenu.x, property.roomMenu.y, property.roomMenu.z, true) < Config.MarkerSize.x) then + isInMarker = true + currentProperty = property.name + currentPart = 'roomMenu' + end - end + end - if isInMarker and not HasAlreadyEnteredMarker or (isInMarker and (LastProperty ~= currentProperty or LastPart ~= currentPart) ) then + if isInMarker and not HasAlreadyEnteredMarker or (isInMarker and (LastProperty ~= currentProperty or LastPart ~= currentPart) ) then - HasAlreadyEnteredMarker = true - LastProperty = currentProperty - LastPart = currentPart + HasAlreadyEnteredMarker = true + LastProperty = currentProperty + LastPart = currentPart - TriggerEvent('esx_property:hasEnteredMarker', currentProperty, currentPart) - end + TriggerEvent('esx_property:hasEnteredMarker', currentProperty, currentPart) + end - if not isInMarker and HasAlreadyEnteredMarker then + if not isInMarker and HasAlreadyEnteredMarker then - HasAlreadyEnteredMarker = false + HasAlreadyEnteredMarker = false - TriggerEvent('esx_property:hasExitedMarker', LastProperty, LastPart) - end + TriggerEvent('esx_property:hasExitedMarker', LastProperty, LastPart) + end - end + end end) -- Key controls Citizen.CreateThread(function() - while true do + while true do - Citizen.Wait(0) + Citizen.Wait(0) - if CurrentAction ~= nil then + if CurrentAction ~= nil then - SetTextComponentFormat('STRING') - AddTextComponentString(CurrentActionMsg) - DisplayHelpTextFromStringLabel(0, 0, 1, -1) + SetTextComponentFormat('STRING') + AddTextComponentString(CurrentActionMsg) + DisplayHelpTextFromStringLabel(0, 0, 1, -1) - if IsControlPressed(0, Keys['E']) and (GetGameTimer() - GUI.Time) > 300 then + if IsControlPressed(0, Keys['E']) and (GetGameTimer() - GUI.Time) > 300 then - if CurrentAction == 'property_menu' then - OpenPropertyMenu(CurrentActionData.property) - end + if CurrentAction == 'property_menu' then + OpenPropertyMenu(CurrentActionData.property) + end - if CurrentAction == 'gateway_menu' then + if CurrentAction == 'gateway_menu' then - if Config.EnablePlayerManagement then - OpenGatewayOwnedPropertiesMenu(CurrentActionData.property) - else - OpenGatewayMenu(CurrentActionData.property) - end + if Config.EnablePlayerManagement then + OpenGatewayOwnedPropertiesMenu(CurrentActionData.property) + else + OpenGatewayMenu(CurrentActionData.property) + end - end + end - if CurrentAction == 'room_menu' then - OpenRoomMenu(CurrentActionData.property, CurrentActionData.owner) - end + if CurrentAction == 'room_menu' then + OpenRoomMenu(CurrentActionData.property, CurrentActionData.owner) + end - if CurrentAction == 'room_exit' then - TriggerEvent('instance:leave') - end + if CurrentAction == 'room_exit' then + TriggerEvent('instance:leave') + end - CurrentAction = nil - GUI.Time = GetGameTimer() + CurrentAction = nil + GUI.Time = GetGameTimer() - end + end - end + end - end + end end) diff --git a/config.lua b/config.lua index dcb4bb17..fe9d76c1 100644 --- a/config.lua +++ b/config.lua @@ -7,4 +7,4 @@ Config.MarkerType = 1 Config.Zones = {} Config.Properties = {} Config.EnablePlayerManagement = false -- If set to true you need esx_realestateagentjob -Config.Locale = 'fr' +Config.Locale = 'fr' diff --git a/esx_property.sql b/esx_property.sql index a532e62f..a2e2439f 100644 --- a/esx_property.sql +++ b/esx_property.sql @@ -1,7 +1,7 @@ USE `essentialmode`; -ALTER TABLE `users` - ADD COLUMN `last_property` VARCHAR(255) NULL +ALTER TABLE `users` + ADD COLUMN `last_property` VARCHAR(255) NULL ; INSERT INTO `addon_account` (name, label, shared) VALUES @@ -17,18 +17,18 @@ INSERT INTO `datastore` (name, label, shared) VALUES ; CREATE TABLE `owned_properties` ( - + `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `price` double NOT NULL, `rented` int(11) NOT NULL, `owner` varchar(60) NOT NULL, - + PRIMARY KEY (`id`) ); CREATE TABLE `properties` ( - + `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `label` varchar(255) DEFAULT NULL, @@ -43,52 +43,52 @@ CREATE TABLE `properties` ( `is_gateway` int(11) DEFAULT NULL, `room_menu` varchar(255) DEFAULT NULL, `price` int(11) NOT NULL, - + PRIMARY KEY (`id`) ); -INSERT INTO `properties` VALUES - (1,'WhispymoundDrive','2677 Whispymound Drive','{\"y\":564.89,\"z\":182.959,\"x\":119.384}','{\"x\":117.347,\"y\":559.506,\"z\":183.304}','{\"y\":557.032,\"z\":183.301,\"x\":118.037}','{\"y\":567.798,\"z\":182.131,\"x\":119.249}','[]',NULL,1,1,0,'{\"x\":118.748,\"y\":566.573,\"z\":175.697}',1500000), - (2,'NorthConkerAvenue2045','2045 North Conker Avenue','{\"x\":372.796,\"y\":428.327,\"z\":144.685}','{\"x\":373.548,\"y\":422.982,\"z\":144.907},','{\"y\":420.075,\"z\":145.904,\"x\":372.161}','{\"x\":372.454,\"y\":432.886,\"z\":143.443}','[]',NULL,1,1,0,'{\"x\":377.349,\"y\":429.422,\"z\":137.3}',1500000), - (3,'RichardMajesticApt2','Richard Majestic, Apt 2','{\"y\":-379.165,\"z\":37.961,\"x\":-936.363}','{\"y\":-365.476,\"z\":113.274,\"x\":-913.097}','{\"y\":-367.637,\"z\":113.274,\"x\":-918.022}','{\"y\":-382.023,\"z\":37.961,\"x\":-943.626}','[]',NULL,1,1,0,'{\"x\":-927.554,\"y\":-377.744,\"z\":112.674}',1700000), - (4,'NorthConkerAvenue2044','2044 North Conker Avenue','{\"y\":440.8,\"z\":146.702,\"x\":346.964}','{\"y\":437.456,\"z\":148.394,\"x\":341.683}','{\"y\":435.626,\"z\":148.394,\"x\":339.595}','{\"x\":350.535,\"y\":443.329,\"z\":145.764}','[]',NULL,1,1,0,'{\"x\":337.726,\"y\":436.985,\"z\":140.77}',1500000), - (5,'WildOatsDrive','3655 Wild Oats Drive','{\"y\":502.696,\"z\":136.421,\"x\":-176.003}','{\"y\":497.817,\"z\":136.653,\"x\":-174.349}','{\"y\":495.069,\"z\":136.666,\"x\":-173.331}','{\"y\":506.412,\"z\":135.0664,\"x\":-177.927}','[]',NULL,1,1,0,'{\"x\":-174.725,\"y\":493.095,\"z\":129.043}',1500000), - (6,'HillcrestAvenue2862','2862 Hillcrest Avenue','{\"y\":596.58,\"z\":142.641,\"x\":-686.554}','{\"y\":591.988,\"z\":144.392,\"x\":-681.728}','{\"y\":590.608,\"z\":144.392,\"x\":-680.124}','{\"y\":599.019,\"z\":142.059,\"x\":-689.492}','[]',NULL,1,1,0,'{\"x\":-680.46,\"y\":588.6,\"z\":136.769}',1500000), - (7,'LowEndApartment','Appartement de base','{\"y\":-1078.735,\"z\":28.4031,\"x\":292.528}','{\"y\":-1007.152,\"z\":-102.002,\"x\":265.845}','{\"y\":-1002.802,\"z\":-100.008,\"x\":265.307}','{\"y\":-1078.669,\"z\":28.401,\"x\":296.738}','[]',NULL,1,1,0,'{\"x\":265.916,\"y\":-999.38,\"z\":-100.008}',562500), - (8,'MadWayneThunder','2113 Mad Wayne Thunder','{\"y\":454.955,\"z\":96.462,\"x\":-1294.433}','{"x":-1289.917,"y":449.541,"z":96.902}','{\"y\":446.322,\"z\":96.899,\"x\":-1289.642}','{\"y\":455.453,\"z\":96.517,\"x\":-1298.851}','[]',NULL,1,1,0,'{\"x\":-1287.306,\"y\":455.901,\"z\":89.294}',1500000), - (9,'HillcrestAvenue2874','2874 Hillcrest Avenue','{\"x\":-853.346,\"y\":696.678,\"z\":147.782}','{\"y\":690.875,\"z\":151.86,\"x\":-859.961}','{\"y\":688.361,\"z\":151.857,\"x\":-859.395}','{\"y\":701.628,\"z\":147.773,\"x\":-855.007}','[]',NULL,1,1,0,'{\"x\":-858.543,\"y\":697.514,\"z\":144.253}',1500000), - (10,'HillcrestAvenue2868','2868 Hillcrest Avenue','{\"y\":620.494,\"z\":141.588,\"x\":-752.82}','{\"y\":618.62,\"z\":143.153,\"x\":-759.317}','{\"y\":617.629,\"z\":143.153,\"x\":-760.789}','{\"y\":621.281,\"z\":141.254,\"x\":-750.919}','[]',NULL,1,1,0,'{\"x\":-762.504,\"y\":618.992,\"z\":135.53}',1500000), - (11,'TinselTowersApt12','Tinsel Towers, Apt 42','{\"y\":37.025,\"z\":42.58,\"x\":-618.299}','{\"y\":58.898,\"z\":97.2,\"x\":-603.301}','{\"y\":58.941,\"z\":97.2,\"x\":-608.741}','{\"y\":30.603,\"z\":42.524,\"x\":-620.017}','[]',NULL,1,1,0,'{\"x\":-622.173,\"y\":54.585,\"z\":96.599}',1700000), - (12,'MiltonDrive','Milton Drive','{\"x\":-775.17,\"y\":312.01,\"z\":84.658}',NULL,NULL,'{\"x\":-775.346,\"y\":306.776,\"z\":84.7}','[]',NULL,0,0,1,NULL,0), - (13,'Modern1Apartment','Appartement Moderne 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_01_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.661,\"y\":327.672,\"z\":210.396}',1300000), - (14,'Modern2Apartment','Appartement Moderne 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_01_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.735,\"y\":326.757,\"z\":186.313}',1300000), - (15,'Modern3Apartment','Appartement Moderne 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_01_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.386,\"y\":330.782,\"z\":195.08}',1300000), - (16,'Mody1Apartment','Appartement Mode 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_02_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.615,\"y\":327.878,\"z\":210.396}',1300000), - (17,'Mody2Apartment','Appartement Mode 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_02_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.297,\"y\":327.092,\"z\":186.313}',1300000), - (18,'Mody3Apartment','Appartement Mode 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_02_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.303,\"y\":330.932,\"z\":195.085}',1300000), - (19,'Vibrant1Apartment','Appartement Vibrant 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_03_a\"]','MiltonDrive',0,1,0,'{\"x\":-765.885,\"y\":327.641,\"z\":210.396}',1300000), - (20,'Vibrant2Apartment','Appartement Vibrant 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_03_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.607,\"y\":327.344,\"z\":186.313}',1300000), - (21,'Vibrant3Apartment','Appartement Vibrant 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_03_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.525,\"y\":330.851,\"z\":195.085}',1300000), - (22,'Sharp1Apartment','Appartement Persan 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_04_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.527,\"y\":327.89,\"z\":210.396}',1300000), - (23,'Sharp2Apartment','Appartement Persan 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_04_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.642,\"y\":326.497,\"z\":186.313}',1300000), - (24,'Sharp3Apartment','Appartement Persan 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_04_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.503,\"y\":331.318,\"z\":195.085}',1300000), - (25,'Monochrome1Apartment','Appartement Monochrome 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_05_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.289,\"y\":328.086,\"z\":210.396}',1300000), - (26,'Monochrome2Apartment','Appartement Monochrome 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_05_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.692,\"y\":326.762,\"z\":186.313}',1300000), - (27,'Monochrome3Apartment','Appartement Monochrome 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_05_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.094,\"y\":330.976,\"z\":195.085}',1300000), - (28,'Seductive1Apartment','Appartement Séduisant 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_06_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.263,\"y\":328.104,\"z\":210.396}',1300000), - (29,'Seductive2Apartment','Appartement Séduisant 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_06_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.655,\"y\":326.611,\"z\":186.313}',1300000), - (30,'Seductive3Apartment','Appartement Séduisant 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_06_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.3,\"y\":331.414,\"z\":195.085}',1300000), - (31,'Regal1Apartment','Appartement Régal 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_07_a\"]','MiltonDrive',0,1,0,'{\"x\":-765.956,\"y\":328.257,\"z\":210.396}',1300000), - (32,'Regal2Apartment','Appartement Régal 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_07_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.545,\"y\":326.659,\"z\":186.313}',1300000), - (33,'Regal3Apartment','Appartement Régal 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_07_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.087,\"y\":331.429,\"z\":195.123}',1300000), - (34,'Aqua1Apartment','Appartement Aqua 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_08_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.187,\"y\":328.47,\"z\":210.396}',1300000), - (35,'Aqua2Apartment','Appartement Aqua 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_08_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.658,\"y\":326.563,\"z\":186.313}',1300000), - (36,'Aqua3Apartment','Appartement Aqua 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_08_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.287,\"y\":331.084,\"z\":195.086}',1300000), - (37,'IntegrityWay','4 Integrity Way','{\"x\":-47.804,\"y\":-585.867,\"z\":36.956}',NULL,NULL,'{\"x\":-54.178,\"y\":-583.762,\"z\":35.798}','[]',NULL,0,0,1,NULL,0), - (38,'IntegrityWay28','4 Integrity Way - Apt 28',NULL,'{\"x\":-31.409,\"y\":-594.927,\"z\":79.03}','{\"x\":-26.098,\"y\":-596.909,\"z\":79.03}',NULL,'[]','IntegrityWay',0,1,0,'{\"x\":-11.923,\"y\":-597.083,\"z\":78.43}',1700000), - (39,'IntegrityWay30','4 Integrity Way - Apt 30',NULL,'{\"x\":-17.702,\"y\":-588.524,\"z\":89.114}','{\"x\":-16.21,\"y\":-582.569,\"z\":89.114}',NULL,'[]','IntegrityWay',0,1,0,'{\"x\":-26.327,\"y\":-588.384,\"z\":89.123}',1700000), - (40,'DellPerroHeights','Dell Perro Heights','{\"x\":-1447.06,\"y\":-538.28,\"z\":33.74}',NULL,NULL,'{\"x\":-1440.022,\"y\":-548.696,\"z\":33.74}','[]',NULL,0,0,1,NULL,0), - (41,'DellPerroHeightst4','Dell Perro Heights - Apt 28',NULL,'{\"x\":-1452.125,\"y\":-540.591,\"z\":73.044}','{\"x\":-1455.435,\"y\":-535.79,\"z\":73.044}',NULL,'[]','DellPerroHeights',0,1,0,'{\"x\":-1467.058,\"y\":-527.571,\"z\":72.443}',1700000), - (42,'DellPerroHeightst7','Dell Perro Heights - Apt 30',NULL,'{\"x\":-1451.562,\"y\":-523.535,\"z\":55.928}','{\"x\":-1456.02,\"y\":-519.209,\"z\":55.929}',NULL,'[]','DellPerroHeights',0,1,0,'{\"x\":-1457.026,\"y\":-530.219,\"z\":55.937}',1700000) +INSERT INTO `properties` VALUES + (1,'WhispymoundDrive','2677 Whispymound Drive','{\"y\":564.89,\"z\":182.959,\"x\":119.384}','{\"x\":117.347,\"y\":559.506,\"z\":183.304}','{\"y\":557.032,\"z\":183.301,\"x\":118.037}','{\"y\":567.798,\"z\":182.131,\"x\":119.249}','[]',NULL,1,1,0,'{\"x\":118.748,\"y\":566.573,\"z\":175.697}',1500000), + (2,'NorthConkerAvenue2045','2045 North Conker Avenue','{\"x\":372.796,\"y\":428.327,\"z\":144.685}','{\"x\":373.548,\"y\":422.982,\"z\":144.907},','{\"y\":420.075,\"z\":145.904,\"x\":372.161}','{\"x\":372.454,\"y\":432.886,\"z\":143.443}','[]',NULL,1,1,0,'{\"x\":377.349,\"y\":429.422,\"z\":137.3}',1500000), + (3,'RichardMajesticApt2','Richard Majestic, Apt 2','{\"y\":-379.165,\"z\":37.961,\"x\":-936.363}','{\"y\":-365.476,\"z\":113.274,\"x\":-913.097}','{\"y\":-367.637,\"z\":113.274,\"x\":-918.022}','{\"y\":-382.023,\"z\":37.961,\"x\":-943.626}','[]',NULL,1,1,0,'{\"x\":-927.554,\"y\":-377.744,\"z\":112.674}',1700000), + (4,'NorthConkerAvenue2044','2044 North Conker Avenue','{\"y\":440.8,\"z\":146.702,\"x\":346.964}','{\"y\":437.456,\"z\":148.394,\"x\":341.683}','{\"y\":435.626,\"z\":148.394,\"x\":339.595}','{\"x\":350.535,\"y\":443.329,\"z\":145.764}','[]',NULL,1,1,0,'{\"x\":337.726,\"y\":436.985,\"z\":140.77}',1500000), + (5,'WildOatsDrive','3655 Wild Oats Drive','{\"y\":502.696,\"z\":136.421,\"x\":-176.003}','{\"y\":497.817,\"z\":136.653,\"x\":-174.349}','{\"y\":495.069,\"z\":136.666,\"x\":-173.331}','{\"y\":506.412,\"z\":135.0664,\"x\":-177.927}','[]',NULL,1,1,0,'{\"x\":-174.725,\"y\":493.095,\"z\":129.043}',1500000), + (6,'HillcrestAvenue2862','2862 Hillcrest Avenue','{\"y\":596.58,\"z\":142.641,\"x\":-686.554}','{\"y\":591.988,\"z\":144.392,\"x\":-681.728}','{\"y\":590.608,\"z\":144.392,\"x\":-680.124}','{\"y\":599.019,\"z\":142.059,\"x\":-689.492}','[]',NULL,1,1,0,'{\"x\":-680.46,\"y\":588.6,\"z\":136.769}',1500000), + (7,'LowEndApartment','Appartement de base','{\"y\":-1078.735,\"z\":28.4031,\"x\":292.528}','{\"y\":-1007.152,\"z\":-102.002,\"x\":265.845}','{\"y\":-1002.802,\"z\":-100.008,\"x\":265.307}','{\"y\":-1078.669,\"z\":28.401,\"x\":296.738}','[]',NULL,1,1,0,'{\"x\":265.916,\"y\":-999.38,\"z\":-100.008}',562500), + (8,'MadWayneThunder','2113 Mad Wayne Thunder','{\"y\":454.955,\"z\":96.462,\"x\":-1294.433}','{"x":-1289.917,"y":449.541,"z":96.902}','{\"y\":446.322,\"z\":96.899,\"x\":-1289.642}','{\"y\":455.453,\"z\":96.517,\"x\":-1298.851}','[]',NULL,1,1,0,'{\"x\":-1287.306,\"y\":455.901,\"z\":89.294}',1500000), + (9,'HillcrestAvenue2874','2874 Hillcrest Avenue','{\"x\":-853.346,\"y\":696.678,\"z\":147.782}','{\"y\":690.875,\"z\":151.86,\"x\":-859.961}','{\"y\":688.361,\"z\":151.857,\"x\":-859.395}','{\"y\":701.628,\"z\":147.773,\"x\":-855.007}','[]',NULL,1,1,0,'{\"x\":-858.543,\"y\":697.514,\"z\":144.253}',1500000), + (10,'HillcrestAvenue2868','2868 Hillcrest Avenue','{\"y\":620.494,\"z\":141.588,\"x\":-752.82}','{\"y\":618.62,\"z\":143.153,\"x\":-759.317}','{\"y\":617.629,\"z\":143.153,\"x\":-760.789}','{\"y\":621.281,\"z\":141.254,\"x\":-750.919}','[]',NULL,1,1,0,'{\"x\":-762.504,\"y\":618.992,\"z\":135.53}',1500000), + (11,'TinselTowersApt12','Tinsel Towers, Apt 42','{\"y\":37.025,\"z\":42.58,\"x\":-618.299}','{\"y\":58.898,\"z\":97.2,\"x\":-603.301}','{\"y\":58.941,\"z\":97.2,\"x\":-608.741}','{\"y\":30.603,\"z\":42.524,\"x\":-620.017}','[]',NULL,1,1,0,'{\"x\":-622.173,\"y\":54.585,\"z\":96.599}',1700000), + (12,'MiltonDrive','Milton Drive','{\"x\":-775.17,\"y\":312.01,\"z\":84.658}',NULL,NULL,'{\"x\":-775.346,\"y\":306.776,\"z\":84.7}','[]',NULL,0,0,1,NULL,0), + (13,'Modern1Apartment','Appartement Moderne 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_01_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.661,\"y\":327.672,\"z\":210.396}',1300000), + (14,'Modern2Apartment','Appartement Moderne 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_01_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.735,\"y\":326.757,\"z\":186.313}',1300000), + (15,'Modern3Apartment','Appartement Moderne 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_01_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.386,\"y\":330.782,\"z\":195.08}',1300000), + (16,'Mody1Apartment','Appartement Mode 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_02_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.615,\"y\":327.878,\"z\":210.396}',1300000), + (17,'Mody2Apartment','Appartement Mode 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_02_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.297,\"y\":327.092,\"z\":186.313}',1300000), + (18,'Mody3Apartment','Appartement Mode 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_02_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.303,\"y\":330.932,\"z\":195.085}',1300000), + (19,'Vibrant1Apartment','Appartement Vibrant 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_03_a\"]','MiltonDrive',0,1,0,'{\"x\":-765.885,\"y\":327.641,\"z\":210.396}',1300000), + (20,'Vibrant2Apartment','Appartement Vibrant 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_03_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.607,\"y\":327.344,\"z\":186.313}',1300000), + (21,'Vibrant3Apartment','Appartement Vibrant 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_03_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.525,\"y\":330.851,\"z\":195.085}',1300000), + (22,'Sharp1Apartment','Appartement Persan 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_04_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.527,\"y\":327.89,\"z\":210.396}',1300000), + (23,'Sharp2Apartment','Appartement Persan 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_04_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.642,\"y\":326.497,\"z\":186.313}',1300000), + (24,'Sharp3Apartment','Appartement Persan 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_04_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.503,\"y\":331.318,\"z\":195.085}',1300000), + (25,'Monochrome1Apartment','Appartement Monochrome 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_05_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.289,\"y\":328.086,\"z\":210.396}',1300000), + (26,'Monochrome2Apartment','Appartement Monochrome 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_05_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.692,\"y\":326.762,\"z\":186.313}',1300000), + (27,'Monochrome3Apartment','Appartement Monochrome 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_05_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.094,\"y\":330.976,\"z\":195.085}',1300000), + (28,'Seductive1Apartment','Appartement Séduisant 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_06_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.263,\"y\":328.104,\"z\":210.396}',1300000), + (29,'Seductive2Apartment','Appartement Séduisant 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_06_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.655,\"y\":326.611,\"z\":186.313}',1300000), + (30,'Seductive3Apartment','Appartement Séduisant 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_06_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.3,\"y\":331.414,\"z\":195.085}',1300000), + (31,'Regal1Apartment','Appartement Régal 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_07_a\"]','MiltonDrive',0,1,0,'{\"x\":-765.956,\"y\":328.257,\"z\":210.396}',1300000), + (32,'Regal2Apartment','Appartement Régal 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_07_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.545,\"y\":326.659,\"z\":186.313}',1300000), + (33,'Regal3Apartment','Appartement Régal 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_07_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.087,\"y\":331.429,\"z\":195.123}',1300000), + (34,'Aqua1Apartment','Appartement Aqua 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_08_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.187,\"y\":328.47,\"z\":210.396}',1300000), + (35,'Aqua2Apartment','Appartement Aqua 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_08_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.658,\"y\":326.563,\"z\":186.313}',1300000), + (36,'Aqua3Apartment','Appartement Aqua 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_08_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.287,\"y\":331.084,\"z\":195.086}',1300000), + (37,'IntegrityWay','4 Integrity Way','{\"x\":-47.804,\"y\":-585.867,\"z\":36.956}',NULL,NULL,'{\"x\":-54.178,\"y\":-583.762,\"z\":35.798}','[]',NULL,0,0,1,NULL,0), + (38,'IntegrityWay28','4 Integrity Way - Apt 28',NULL,'{\"x\":-31.409,\"y\":-594.927,\"z\":79.03}','{\"x\":-26.098,\"y\":-596.909,\"z\":79.03}',NULL,'[]','IntegrityWay',0,1,0,'{\"x\":-11.923,\"y\":-597.083,\"z\":78.43}',1700000), + (39,'IntegrityWay30','4 Integrity Way - Apt 30',NULL,'{\"x\":-17.702,\"y\":-588.524,\"z\":89.114}','{\"x\":-16.21,\"y\":-582.569,\"z\":89.114}',NULL,'[]','IntegrityWay',0,1,0,'{\"x\":-26.327,\"y\":-588.384,\"z\":89.123}',1700000), + (40,'DellPerroHeights','Dell Perro Heights','{\"x\":-1447.06,\"y\":-538.28,\"z\":33.74}',NULL,NULL,'{\"x\":-1440.022,\"y\":-548.696,\"z\":33.74}','[]',NULL,0,0,1,NULL,0), + (41,'DellPerroHeightst4','Dell Perro Heights - Apt 28',NULL,'{\"x\":-1452.125,\"y\":-540.591,\"z\":73.044}','{\"x\":-1455.435,\"y\":-535.79,\"z\":73.044}',NULL,'[]','DellPerroHeights',0,1,0,'{\"x\":-1467.058,\"y\":-527.571,\"z\":72.443}',1700000), + (42,'DellPerroHeightst7','Dell Perro Heights - Apt 30',NULL,'{\"x\":-1451.562,\"y\":-523.535,\"z\":55.928}','{\"x\":-1456.02,\"y\":-519.209,\"z\":55.929}',NULL,'[]','DellPerroHeights',0,1,0,'{\"x\":-1457.026,\"y\":-530.219,\"z\":55.937}',1700000) ; diff --git a/locales/br.lua b/locales/br.lua index b08da2f1..042c9d86 100644 --- a/locales/br.lua +++ b/locales/br.lua @@ -1,30 +1,30 @@ Locales['br'] = { - ['free_prop'] = 'Propriedade gratuita', - ['property'] = 'Propriedade', - ['enter'] = 'Entrar', - ['leave'] = 'Sair', - ['buy'] = 'Comprar', - ['rent'] = 'Alugar', - ['visit'] = 'Visitar', - ['press_to_menu'] = 'Pressione ~INPUT_CONTEXT~ para acessar o menu', - ['owned_properties'] = 'Propriedades adquiridas', - ['available_properties'] = 'Propriedades disponíveis', - ['invite_player'] = 'Convidar um jogador', - ['player_clothes'] = 'Roupas', - ['remove_object'] = 'Remover objeto', - ['deposit_object'] = 'Depositar objeto', - ['invite'] = 'Convidar', - ['dirty_money'] = 'Dinheiro sujo $', - ['inventory'] = 'Inventário', - ['amount'] = 'valor?', - ['amount_invalid'] = 'quantidade inválida', - ['press_to_exit'] = 'Pressione ~INPUT_CONTEXT~ para sair da propriedade', - ['rented_for'] = 'Você alugou uma propriedade por $', - ['purchased_for'] = 'Você comprou uma propriedade por $', - ['made_property'] = 'Você criou uma propriedade', - ['not_enough'] = 'Você não tem dinheiro suficiente', - ['invalid_quantity'] = 'Quantidade inválida', - ['paid_rent'] = 'Você ~g~pagou~s~ seu aluguel: ~g~$', + ['free_prop'] = 'Propriedade gratuita', + ['property'] = 'Propriedade', + ['enter'] = 'Entrar', + ['leave'] = 'Sair', + ['buy'] = 'Comprar', + ['rent'] = 'Alugar', + ['visit'] = 'Visitar', + ['press_to_menu'] = 'Pressione ~INPUT_CONTEXT~ para acessar o menu', + ['owned_properties'] = 'Propriedades adquiridas', + ['available_properties'] = 'Propriedades disponíveis', + ['invite_player'] = 'Convidar um jogador', + ['player_clothes'] = 'Roupas', + ['remove_object'] = 'Remover objeto', + ['deposit_object'] = 'Depositar objeto', + ['invite'] = 'Convidar', + ['dirty_money'] = 'Dinheiro sujo $', + ['inventory'] = 'Inventário', + ['amount'] = 'valor?', + ['amount_invalid'] = 'quantidade inválida', + ['press_to_exit'] = 'Pressione ~INPUT_CONTEXT~ para sair da propriedade', + ['rented_for'] = 'Você alugou uma propriedade por $', + ['purchased_for'] = 'Você comprou uma propriedade por $', + ['made_property'] = 'Você criou uma propriedade', + ['not_enough'] = 'Você não tem dinheiro suficiente', + ['invalid_quantity'] = 'Quantidade inválida', + ['paid_rent'] = 'Você ~g~pagou~s~ seu aluguel: ~g~$', } diff --git a/locales/de.lua b/locales/de.lua index ffc3fdf4..2777520c 100644 --- a/locales/de.lua +++ b/locales/de.lua @@ -1,31 +1,31 @@ Locales['de'] = { - ['free_prop'] = 'Kostenlose Immobilie', - ['property'] = 'Immobilie', - ['enter'] = 'Eintreten', - ['leave'] = 'Verlassen', - ['buy'] = 'Kaufen', - ['rent'] = 'Mieten', - ['visit'] = 'Ansehen', - ['press_to_menu'] = 'Drücke ~INPUT_CONTEXT~ um das Menü zu öffnen', - ['owned_properties'] = 'Gekaufte Immobilien', - ['available_properties'] = 'Verfügbare Immobilien', - ['invite_player'] = 'Spieler einladen', - ['you_invited'] = 'Du hast %s eingeladen', - ['player_clothes'] = 'Kleidung', - ['remove_object'] = 'Objekt nehmen', - ['deposit_object'] = 'Objekt deponieren', - ['invite'] = 'Einladen', - ['dirty_money'] = 'Schwarzgeld $', - ['inventory'] = 'Inventar', - ['amount'] = 'Anzahlt?', - ['amount_invalid'] = 'Ungültiger Wert', - ['press_to_exit'] = 'Drücke ~INPUT_CONTEXT~ um die Immobilie zu verlassen', - ['rented_for'] = 'Du hast eine Immobilie gemietet $', - ['purchased_for'] = 'Du hast eine Immobilie gekauft $', - ['made_property'] = 'Du hast eine Immobilie gemacht', - ['not_enough'] = 'du hast nicht genug Geld', - ['invalid_quantity'] = 'Ungültiger Betrag', - ['paid_rent'] = 'du ~g~bezahlst~s~ deine Miete: ~g~$', + ['free_prop'] = 'Kostenlose Immobilie', + ['property'] = 'Immobilie', + ['enter'] = 'Eintreten', + ['leave'] = 'Verlassen', + ['buy'] = 'Kaufen', + ['rent'] = 'Mieten', + ['visit'] = 'Ansehen', + ['press_to_menu'] = 'Drücke ~INPUT_CONTEXT~ um das Menü zu öffnen', + ['owned_properties'] = 'Gekaufte Immobilien', + ['available_properties'] = 'Verfügbare Immobilien', + ['invite_player'] = 'Spieler einladen', + ['you_invited'] = 'Du hast %s eingeladen', + ['player_clothes'] = 'Kleidung', + ['remove_object'] = 'Objekt nehmen', + ['deposit_object'] = 'Objekt deponieren', + ['invite'] = 'Einladen', + ['dirty_money'] = 'Schwarzgeld $', + ['inventory'] = 'Inventar', + ['amount'] = 'Anzahlt?', + ['amount_invalid'] = 'Ungültiger Wert', + ['press_to_exit'] = 'Drücke ~INPUT_CONTEXT~ um die Immobilie zu verlassen', + ['rented_for'] = 'Du hast eine Immobilie gemietet $', + ['purchased_for'] = 'Du hast eine Immobilie gekauft $', + ['made_property'] = 'Du hast eine Immobilie gemacht', + ['not_enough'] = 'du hast nicht genug Geld', + ['invalid_quantity'] = 'Ungültiger Betrag', + ['paid_rent'] = 'du ~g~bezahlst~s~ deine Miete: ~g~$', } diff --git a/locales/en.lua b/locales/en.lua index 133b42d1..4d2d3b1a 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -1,31 +1,31 @@ Locales['en'] = { - ['free_prop'] = 'free property', - ['property'] = 'property', - ['enter'] = 'enter', - ['leave'] = 'leave', - ['buy'] = 'buy', - ['rent'] = 'rent', - ['visit'] = 'visit', - ['press_to_menu'] = 'press ~INPUT_CONTEXT~ to access the menu', - ['owned_properties'] = 'acquired properties', - ['available_properties'] = 'available properties', - ['invite_player'] = 'invite a player', - ['you_invited'] = 'you invited %s', - ['player_clothes'] = 'clothes', - ['remove_object'] = 'remove object', - ['deposit_object'] = 'deposit object', - ['invite'] = 'invite', - ['dirty_money'] = 'dirty money $', - ['inventory'] = 'inventory', - ['amount'] = 'amount?', - ['amount_invalid'] = 'invalid amount', - ['press_to_exit'] = 'press ~INPUT_CONTEXT~ to exit the property', - ['rented_for'] = 'you rented a property for $', - ['purchased_for'] = 'you purchased a property for $', - ['made_property'] = 'you have made a property', - ['not_enough'] = 'you do not have enough money', - ['invalid_quantity'] = 'invalid quantity', - ['paid_rent'] = 'you ~g~paid~s~ your rent: ~g~$', + ['free_prop'] = 'free property', + ['property'] = 'property', + ['enter'] = 'enter', + ['leave'] = 'leave', + ['buy'] = 'buy', + ['rent'] = 'rent', + ['visit'] = 'visit', + ['press_to_menu'] = 'press ~INPUT_CONTEXT~ to access the menu', + ['owned_properties'] = 'acquired properties', + ['available_properties'] = 'available properties', + ['invite_player'] = 'invite a player', + ['you_invited'] = 'you invited %s', + ['player_clothes'] = 'clothes', + ['remove_object'] = 'remove object', + ['deposit_object'] = 'deposit object', + ['invite'] = 'invite', + ['dirty_money'] = 'dirty money $', + ['inventory'] = 'inventory', + ['amount'] = 'amount?', + ['amount_invalid'] = 'invalid amount', + ['press_to_exit'] = 'press ~INPUT_CONTEXT~ to exit the property', + ['rented_for'] = 'you rented a property for $', + ['purchased_for'] = 'you purchased a property for $', + ['made_property'] = 'you have made a property', + ['not_enough'] = 'you do not have enough money', + ['invalid_quantity'] = 'invalid quantity', + ['paid_rent'] = 'you ~g~paid~s~ your rent: ~g~$', } diff --git a/locales/es.lua b/locales/es.lua index 6f2e99fc..c069fd30 100644 --- a/locales/es.lua +++ b/locales/es.lua @@ -1,31 +1,31 @@ -Locales['es'] = { - - ['free_prop'] = 'Propiedad libre', - ['property'] = 'Propiedad', - ['enter'] = 'Entrar', - ['leave'] = 'Salir', - ['buy'] = 'Comprar', - ['rent'] = 'Alquilar', - ['visit'] = 'Visitar', - ['press_to_menu'] = 'Presionar ~INPUT_CONTEXT~ para acceder al menú', - ['owned_properties'] = 'Propiedad adquirida', - ['available_properties'] = 'Propiedades disponibles', - ['invite_player'] = 'Invitar a un jugador', - ['you_invited'] = 'Has invitado a %s', - ['player_clothes'] = 'Ropa', - ['remove_object'] = 'Retirar objeto', - ['deposit_object'] = 'Depositar objeto', - ['invite'] = 'Invitar', - ['dirty_money'] = 'Dinero sucio €', - ['inventory'] = 'Inventario', - ['amount'] = '¿Cantidad?', - ['amount_invalid'] = 'Cantidad inválida', - ['press_to_exit'] = 'Presione ~INPUT_CONTEXT~ para salir de la propiedad', - ['rented_for'] = 'Has alquilado una propiedad por €', - ['purchased_for'] = 'Has comprado una propiedad por €', - ['made_property'] = 'Ha hecho una propiedad', - ['not_enough'] = 'n\'No tiene suficiente d\'dinero', - ['invalid_quantity'] = 'Cantidad inválida', - ['paid_rent'] = 'Has ~g~pagado~s~ por el alquiler : ~g~€', - -} +Locales['es'] = { + + ['free_prop'] = 'Propiedad libre', + ['property'] = 'Propiedad', + ['enter'] = 'Entrar', + ['leave'] = 'Salir', + ['buy'] = 'Comprar', + ['rent'] = 'Alquilar', + ['visit'] = 'Visitar', + ['press_to_menu'] = 'Presionar ~INPUT_CONTEXT~ para acceder al menú', + ['owned_properties'] = 'Propiedad adquirida', + ['available_properties'] = 'Propiedades disponibles', + ['invite_player'] = 'Invitar a un jugador', + ['you_invited'] = 'Has invitado a %s', + ['player_clothes'] = 'Ropa', + ['remove_object'] = 'Retirar objeto', + ['deposit_object'] = 'Depositar objeto', + ['invite'] = 'Invitar', + ['dirty_money'] = 'Dinero sucio €', + ['inventory'] = 'Inventario', + ['amount'] = '¿Cantidad?', + ['amount_invalid'] = 'Cantidad inválida', + ['press_to_exit'] = 'Presione ~INPUT_CONTEXT~ para salir de la propiedad', + ['rented_for'] = 'Has alquilado una propiedad por €', + ['purchased_for'] = 'Has comprado una propiedad por €', + ['made_property'] = 'Ha hecho una propiedad', + ['not_enough'] = 'n\'No tiene suficiente d\'dinero', + ['invalid_quantity'] = 'Cantidad inválida', + ['paid_rent'] = 'Has ~g~pagado~s~ por el alquiler : ~g~€', + +} diff --git a/locales/fr.lua b/locales/fr.lua index 3b7a3567..b54ff0e3 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -1,31 +1,31 @@ Locales['fr'] = { - ['free_prop'] = 'propriété libre', - ['property'] = 'propriété', - ['enter'] = 'entrer', - ['leave'] = 'rendre', - ['buy'] = 'acheter', - ['rent'] = 'louer', - ['visit'] = 'visiter', - ['press_to_menu'] = 'appuyez sur ~INPUT_CONTEXT~ pour accéder au menu', - ['owned_properties'] = 'propriétés acquises', - ['available_properties'] = 'propriétés disponibles', - ['invite_player'] = 'inviter un joueur', - ['you_invited'] = 'vous avez invité %s', - ['player_clothes'] = 'vêtements', - ['remove_object'] = 'retirer objet', - ['deposit_object'] = 'déposer objet', - ['invite'] = 'inviter', - ['dirty_money'] = 'argent sale $', - ['inventory'] = 'inventaire', - ['amount'] = 'quantité ?', - ['amount_invalid'] = 'montant invalide', - ['press_to_exit'] = 'appuyez sur ~INPUT_CONTEXT~ pour sortir de la propriété', - ['rented_for'] = 'vous avez loué une propriété pour $', - ['purchased_for'] = 'vous avez acheté une propriété pour $', - ['made_property'] = 'vous avez rendu une propriété', - ['not_enough'] = 'vous n\'avez pas assez d\'argent', - ['invalid_quantity'] = 'quantité invalide', - ['paid_rent'] = 'vous avez ~g~payé~s~ votre loyer : ~g~$', + ['free_prop'] = 'propriété libre', + ['property'] = 'propriété', + ['enter'] = 'entrer', + ['leave'] = 'rendre', + ['buy'] = 'acheter', + ['rent'] = 'louer', + ['visit'] = 'visiter', + ['press_to_menu'] = 'appuyez sur ~INPUT_CONTEXT~ pour accéder au menu', + ['owned_properties'] = 'propriétés acquises', + ['available_properties'] = 'propriétés disponibles', + ['invite_player'] = 'inviter un joueur', + ['you_invited'] = 'vous avez invité %s', + ['player_clothes'] = 'vêtements', + ['remove_object'] = 'retirer objet', + ['deposit_object'] = 'déposer objet', + ['invite'] = 'inviter', + ['dirty_money'] = 'argent sale $', + ['inventory'] = 'inventaire', + ['amount'] = 'quantité ?', + ['amount_invalid'] = 'montant invalide', + ['press_to_exit'] = 'appuyez sur ~INPUT_CONTEXT~ pour sortir de la propriété', + ['rented_for'] = 'vous avez loué une propriété pour $', + ['purchased_for'] = 'vous avez acheté une propriété pour $', + ['made_property'] = 'vous avez rendu une propriété', + ['not_enough'] = 'vous n\'avez pas assez d\'argent', + ['invalid_quantity'] = 'quantité invalide', + ['paid_rent'] = 'vous avez ~g~payé~s~ votre loyer : ~g~$', } diff --git a/localization/de_esx_property.sql b/localization/de_esx_property.sql index cb819d08..900472cd 100644 --- a/localization/de_esx_property.sql +++ b/localization/de_esx_property.sql @@ -1,7 +1,7 @@ USE `essentialmode`; -ALTER TABLE `users` - ADD COLUMN `last_property` VARCHAR(255) NULL +ALTER TABLE `users` + ADD COLUMN `last_property` VARCHAR(255) NULL ; INSERT INTO `addon_account` (name, label, shared) VALUES @@ -17,18 +17,18 @@ INSERT INTO `datastore` (name, label, shared) VALUES ; CREATE TABLE `owned_properties` ( - + `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `price` double NOT NULL, `rented` int(11) NOT NULL, `owner` varchar(60) NOT NULL, - + PRIMARY KEY (`id`) ); CREATE TABLE `properties` ( - + `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `label` varchar(255) DEFAULT NULL, @@ -43,52 +43,52 @@ CREATE TABLE `properties` ( `is_gateway` int(11) DEFAULT NULL, `room_menu` varchar(255) DEFAULT NULL, `price` int(11) NOT NULL, - + PRIMARY KEY (`id`) ); -INSERT INTO `properties` VALUES - (1,'WhispymoundDrive','2677 Whispymound Drive','{\"y\":564.89,\"z\":182.959,\"x\":119.384}','{\"x\":117.347,\"y\":559.506,\"z\":183.304}','{\"y\":557.032,\"z\":183.301,\"x\":118.037}','{\"y\":567.798,\"z\":182.131,\"x\":119.249}','[]',NULL,1,1,0,'{\"x\":118.748,\"y\":566.573,\"z\":175.697}',1500000), - (2,'NorthConkerAvenue2045','2045 North Conker Avenue','{\"x\":372.796,\"y\":428.327,\"z\":144.685}','{\"x\":373.548,\"y\":422.982,\"z\":144.907},','{\"y\":420.075,\"z\":145.904,\"x\":372.161}','{\"x\":372.454,\"y\":432.886,\"z\":143.443}','[]',NULL,1,1,0,'{\"x\":377.349,\"y\":429.422,\"z\":137.3}',1500000), - (3,'RichardMajesticApt2','Richard Majestic, Apt 2','{\"y\":-379.165,\"z\":37.961,\"x\":-936.363}','{\"y\":-365.476,\"z\":113.274,\"x\":-913.097}','{\"y\":-367.637,\"z\":113.274,\"x\":-918.022}','{\"y\":-382.023,\"z\":37.961,\"x\":-943.626}','[]',NULL,1,1,0,'{\"x\":-927.554,\"y\":-377.744,\"z\":112.674}',1700000), - (4,'NorthConkerAvenue2044','2044 North Conker Avenue','{\"y\":440.8,\"z\":146.702,\"x\":346.964}','{\"y\":437.456,\"z\":148.394,\"x\":341.683}','{\"y\":435.626,\"z\":148.394,\"x\":339.595}','{\"x\":350.535,\"y\":443.329,\"z\":145.764}','[]',NULL,1,1,0,'{\"x\":337.726,\"y\":436.985,\"z\":140.77}',1500000), - (5,'WildOatsDrive','3655 Wild Oats Drive','{\"y\":502.696,\"z\":136.421,\"x\":-176.003}','{\"y\":497.817,\"z\":136.653,\"x\":-174.349}','{\"y\":495.069,\"z\":136.666,\"x\":-173.331}','{\"y\":506.412,\"z\":135.0664,\"x\":-177.927}','[]',NULL,1,1,0,'{\"x\":-174.725,\"y\":493.095,\"z\":129.043}',1500000), - (6,'HillcrestAvenue2862','2862 Hillcrest Avenue','{\"y\":596.58,\"z\":142.641,\"x\":-686.554}','{\"y\":591.988,\"z\":144.392,\"x\":-681.728}','{\"y\":590.608,\"z\":144.392,\"x\":-680.124}','{\"y\":599.019,\"z\":142.059,\"x\":-689.492}','[]',NULL,1,1,0,'{\"x\":-680.46,\"y\":588.6,\"z\":136.769}',1500000), - (7,'LowEndApartment','Appartement de base','{\"y\":-1078.735,\"z\":28.4031,\"x\":292.528}','{\"y\":-1007.152,\"z\":-102.002,\"x\":265.845}','{\"y\":-1002.802,\"z\":-100.008,\"x\":265.307}','{\"y\":-1078.669,\"z\":28.401,\"x\":296.738}','[]',NULL,1,1,0,'{\"x\":265.916,\"y\":-999.38,\"z\":-100.008}',562500), - (8,'MadWayneThunder','2113 Mad Wayne Thunder','{\"y\":454.955,\"z\":96.462,\"x\":-1294.433}','{"x":-1289.917,"y":449.541,"z":96.902}','{\"y\":446.322,\"z\":96.899,\"x\":-1289.642}','{\"y\":455.453,\"z\":96.517,\"x\":-1298.851}','[]',NULL,1,1,0,'{\"x\":-1287.306,\"y\":455.901,\"z\":89.294}',1500000), - (9,'HillcrestAvenue2874','2874 Hillcrest Avenue','{\"x\":-853.346,\"y\":696.678,\"z\":147.782}','{\"y\":690.875,\"z\":151.86,\"x\":-859.961}','{\"y\":688.361,\"z\":151.857,\"x\":-859.395}','{\"y\":701.628,\"z\":147.773,\"x\":-855.007}','[]',NULL,1,1,0,'{\"x\":-858.543,\"y\":697.514,\"z\":144.253}',1500000), - (10,'HillcrestAvenue2868','2868 Hillcrest Avenue','{\"y\":620.494,\"z\":141.588,\"x\":-752.82}','{\"y\":618.62,\"z\":143.153,\"x\":-759.317}','{\"y\":617.629,\"z\":143.153,\"x\":-760.789}','{\"y\":621.281,\"z\":141.254,\"x\":-750.919}','[]',NULL,1,1,0,'{\"x\":-762.504,\"y\":618.992,\"z\":135.53}',1500000), - (11,'TinselTowersApt12','Tinsel Towers, Apt 42','{\"y\":37.025,\"z\":42.58,\"x\":-618.299}','{\"y\":58.898,\"z\":97.2,\"x\":-603.301}','{\"y\":58.941,\"z\":97.2,\"x\":-608.741}','{\"y\":30.603,\"z\":42.524,\"x\":-620.017}','[]',NULL,1,1,0,'{\"x\":-622.173,\"y\":54.585,\"z\":96.599}',1700000), - (12,'MiltonDrive','Milton Drive','{\"x\":-775.17,\"y\":312.01,\"z\":84.658}',NULL,NULL,'{\"x\":-775.346,\"y\":306.776,\"z\":84.7}','[]',NULL,0,0,1,NULL,0), - (13,'Modern1Apartment','Appartement Moderne 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_01_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.661,\"y\":327.672,\"z\":210.396}',1300000), - (14,'Modern2Apartment','Appartement Moderne 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_01_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.735,\"y\":326.757,\"z\":186.313}',1300000), - (15,'Modern3Apartment','Appartement Moderne 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_01_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.386,\"y\":330.782,\"z\":195.08}',1300000), - (16,'Mody1Apartment','Appartement Mode 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_02_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.615,\"y\":327.878,\"z\":210.396}',1300000), - (17,'Mody2Apartment','Appartement Mode 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_02_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.297,\"y\":327.092,\"z\":186.313}',1300000), - (18,'Mody3Apartment','Appartement Mode 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_02_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.303,\"y\":330.932,\"z\":195.085}',1300000), - (19,'Vibrant1Apartment','Appartement Vibrant 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_03_a\"]','MiltonDrive',0,1,0,'{\"x\":-765.885,\"y\":327.641,\"z\":210.396}',1300000), - (20,'Vibrant2Apartment','Appartement Vibrant 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_03_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.607,\"y\":327.344,\"z\":186.313}',1300000), - (21,'Vibrant3Apartment','Appartement Vibrant 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_03_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.525,\"y\":330.851,\"z\":195.085}',1300000), - (22,'Sharp1Apartment','Appartement Persan 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_04_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.527,\"y\":327.89,\"z\":210.396}',1300000), - (23,'Sharp2Apartment','Appartement Persan 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_04_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.642,\"y\":326.497,\"z\":186.313}',1300000), - (24,'Sharp3Apartment','Appartement Persan 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_04_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.503,\"y\":331.318,\"z\":195.085}',1300000), - (25,'Monochrome1Apartment','Appartement Monochrome 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_05_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.289,\"y\":328.086,\"z\":210.396}',1300000), - (26,'Monochrome2Apartment','Appartement Monochrome 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_05_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.692,\"y\":326.762,\"z\":186.313}',1300000), - (27,'Monochrome3Apartment','Appartement Monochrome 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_05_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.094,\"y\":330.976,\"z\":195.085}',1300000), - (28,'Seductive1Apartment','Appartement Séduisant 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_06_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.263,\"y\":328.104,\"z\":210.396}',1300000), - (29,'Seductive2Apartment','Appartement Séduisant 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_06_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.655,\"y\":326.611,\"z\":186.313}',1300000), - (30,'Seductive3Apartment','Appartement Séduisant 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_06_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.3,\"y\":331.414,\"z\":195.085}',1300000), - (31,'Regal1Apartment','Appartement Régal 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_07_a\"]','MiltonDrive',0,1,0,'{\"x\":-765.956,\"y\":328.257,\"z\":210.396}',1300000), - (32,'Regal2Apartment','Appartement Régal 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_07_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.545,\"y\":326.659,\"z\":186.313}',1300000), - (33,'Regal3Apartment','Appartement Régal 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_07_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.087,\"y\":331.429,\"z\":195.123}',1300000), - (34,'Aqua1Apartment','Appartement Aqua 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_08_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.187,\"y\":328.47,\"z\":210.396}',1300000), - (35,'Aqua2Apartment','Appartement Aqua 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_08_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.658,\"y\":326.563,\"z\":186.313}',1300000), - (36,'Aqua3Apartment','Appartement Aqua 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_08_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.287,\"y\":331.084,\"z\":195.086}',1300000), - (37,'IntegrityWay','4 Integrity Way','{\"x\":-47.804,\"y\":-585.867,\"z\":36.956}',NULL,NULL,'{\"x\":-54.178,\"y\":-583.762,\"z\":35.798}','[]',NULL,0,0,1,NULL,0), - (38,'IntegrityWay28','4 Integrity Way - Apt 28',NULL,'{\"x\":-31.409,\"y\":-594.927,\"z\":79.03}','{\"x\":-26.098,\"y\":-596.909,\"z\":79.03}',NULL,'[]','IntegrityWay',0,1,0,'{\"x\":-11.923,\"y\":-597.083,\"z\":78.43}',1700000), - (39,'IntegrityWay30','4 Integrity Way - Apt 30',NULL,'{\"x\":-17.702,\"y\":-588.524,\"z\":89.114}','{\"x\":-16.21,\"y\":-582.569,\"z\":89.114}',NULL,'[]','IntegrityWay',0,1,0,'{\"x\":-26.327,\"y\":-588.384,\"z\":89.123}',1700000), - (40,'DellPerroHeights','Dell Perro Heights','{\"x\":-1447.06,\"y\":-538.28,\"z\":33.74}',NULL,NULL,'{\"x\":-1440.022,\"y\":-548.696,\"z\":33.74}','[]',NULL,0,0,1,NULL,0), - (41,'DellPerroHeightst4','Dell Perro Heights - Apt 28',NULL,'{\"x\":-1452.125,\"y\":-540.591,\"z\":73.044}','{\"x\":-1455.435,\"y\":-535.79,\"z\":73.044}',NULL,'[]','DellPerroHeights',0,1,0,'{\"x\":-1467.058,\"y\":-527.571,\"z\":72.443}',1700000), - (42,'DellPerroHeightst7','Dell Perro Heights - Apt 30',NULL,'{\"x\":-1451.562,\"y\":-523.535,\"z\":55.928}','{\"x\":-1456.02,\"y\":-519.209,\"z\":55.929}',NULL,'[]','DellPerroHeights',0,1,0,'{\"x\":-1457.026,\"y\":-530.219,\"z\":55.937}',1700000) +INSERT INTO `properties` VALUES + (1,'WhispymoundDrive','2677 Whispymound Drive','{\"y\":564.89,\"z\":182.959,\"x\":119.384}','{\"x\":117.347,\"y\":559.506,\"z\":183.304}','{\"y\":557.032,\"z\":183.301,\"x\":118.037}','{\"y\":567.798,\"z\":182.131,\"x\":119.249}','[]',NULL,1,1,0,'{\"x\":118.748,\"y\":566.573,\"z\":175.697}',1500000), + (2,'NorthConkerAvenue2045','2045 North Conker Avenue','{\"x\":372.796,\"y\":428.327,\"z\":144.685}','{\"x\":373.548,\"y\":422.982,\"z\":144.907},','{\"y\":420.075,\"z\":145.904,\"x\":372.161}','{\"x\":372.454,\"y\":432.886,\"z\":143.443}','[]',NULL,1,1,0,'{\"x\":377.349,\"y\":429.422,\"z\":137.3}',1500000), + (3,'RichardMajesticApt2','Richard Majestic, Apt 2','{\"y\":-379.165,\"z\":37.961,\"x\":-936.363}','{\"y\":-365.476,\"z\":113.274,\"x\":-913.097}','{\"y\":-367.637,\"z\":113.274,\"x\":-918.022}','{\"y\":-382.023,\"z\":37.961,\"x\":-943.626}','[]',NULL,1,1,0,'{\"x\":-927.554,\"y\":-377.744,\"z\":112.674}',1700000), + (4,'NorthConkerAvenue2044','2044 North Conker Avenue','{\"y\":440.8,\"z\":146.702,\"x\":346.964}','{\"y\":437.456,\"z\":148.394,\"x\":341.683}','{\"y\":435.626,\"z\":148.394,\"x\":339.595}','{\"x\":350.535,\"y\":443.329,\"z\":145.764}','[]',NULL,1,1,0,'{\"x\":337.726,\"y\":436.985,\"z\":140.77}',1500000), + (5,'WildOatsDrive','3655 Wild Oats Drive','{\"y\":502.696,\"z\":136.421,\"x\":-176.003}','{\"y\":497.817,\"z\":136.653,\"x\":-174.349}','{\"y\":495.069,\"z\":136.666,\"x\":-173.331}','{\"y\":506.412,\"z\":135.0664,\"x\":-177.927}','[]',NULL,1,1,0,'{\"x\":-174.725,\"y\":493.095,\"z\":129.043}',1500000), + (6,'HillcrestAvenue2862','2862 Hillcrest Avenue','{\"y\":596.58,\"z\":142.641,\"x\":-686.554}','{\"y\":591.988,\"z\":144.392,\"x\":-681.728}','{\"y\":590.608,\"z\":144.392,\"x\":-680.124}','{\"y\":599.019,\"z\":142.059,\"x\":-689.492}','[]',NULL,1,1,0,'{\"x\":-680.46,\"y\":588.6,\"z\":136.769}',1500000), + (7,'LowEndApartment','Appartement de base','{\"y\":-1078.735,\"z\":28.4031,\"x\":292.528}','{\"y\":-1007.152,\"z\":-102.002,\"x\":265.845}','{\"y\":-1002.802,\"z\":-100.008,\"x\":265.307}','{\"y\":-1078.669,\"z\":28.401,\"x\":296.738}','[]',NULL,1,1,0,'{\"x\":265.916,\"y\":-999.38,\"z\":-100.008}',562500), + (8,'MadWayneThunder','2113 Mad Wayne Thunder','{\"y\":454.955,\"z\":96.462,\"x\":-1294.433}','{"x":-1289.917,"y":449.541,"z":96.902}','{\"y\":446.322,\"z\":96.899,\"x\":-1289.642}','{\"y\":455.453,\"z\":96.517,\"x\":-1298.851}','[]',NULL,1,1,0,'{\"x\":-1287.306,\"y\":455.901,\"z\":89.294}',1500000), + (9,'HillcrestAvenue2874','2874 Hillcrest Avenue','{\"x\":-853.346,\"y\":696.678,\"z\":147.782}','{\"y\":690.875,\"z\":151.86,\"x\":-859.961}','{\"y\":688.361,\"z\":151.857,\"x\":-859.395}','{\"y\":701.628,\"z\":147.773,\"x\":-855.007}','[]',NULL,1,1,0,'{\"x\":-858.543,\"y\":697.514,\"z\":144.253}',1500000), + (10,'HillcrestAvenue2868','2868 Hillcrest Avenue','{\"y\":620.494,\"z\":141.588,\"x\":-752.82}','{\"y\":618.62,\"z\":143.153,\"x\":-759.317}','{\"y\":617.629,\"z\":143.153,\"x\":-760.789}','{\"y\":621.281,\"z\":141.254,\"x\":-750.919}','[]',NULL,1,1,0,'{\"x\":-762.504,\"y\":618.992,\"z\":135.53}',1500000), + (11,'TinselTowersApt12','Tinsel Towers, Apt 42','{\"y\":37.025,\"z\":42.58,\"x\":-618.299}','{\"y\":58.898,\"z\":97.2,\"x\":-603.301}','{\"y\":58.941,\"z\":97.2,\"x\":-608.741}','{\"y\":30.603,\"z\":42.524,\"x\":-620.017}','[]',NULL,1,1,0,'{\"x\":-622.173,\"y\":54.585,\"z\":96.599}',1700000), + (12,'MiltonDrive','Milton Drive','{\"x\":-775.17,\"y\":312.01,\"z\":84.658}',NULL,NULL,'{\"x\":-775.346,\"y\":306.776,\"z\":84.7}','[]',NULL,0,0,1,NULL,0), + (13,'Modern1Apartment','Appartement Moderne 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_01_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.661,\"y\":327.672,\"z\":210.396}',1300000), + (14,'Modern2Apartment','Appartement Moderne 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_01_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.735,\"y\":326.757,\"z\":186.313}',1300000), + (15,'Modern3Apartment','Appartement Moderne 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_01_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.386,\"y\":330.782,\"z\":195.08}',1300000), + (16,'Mody1Apartment','Appartement Mode 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_02_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.615,\"y\":327.878,\"z\":210.396}',1300000), + (17,'Mody2Apartment','Appartement Mode 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_02_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.297,\"y\":327.092,\"z\":186.313}',1300000), + (18,'Mody3Apartment','Appartement Mode 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_02_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.303,\"y\":330.932,\"z\":195.085}',1300000), + (19,'Vibrant1Apartment','Appartement Vibrant 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_03_a\"]','MiltonDrive',0,1,0,'{\"x\":-765.885,\"y\":327.641,\"z\":210.396}',1300000), + (20,'Vibrant2Apartment','Appartement Vibrant 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_03_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.607,\"y\":327.344,\"z\":186.313}',1300000), + (21,'Vibrant3Apartment','Appartement Vibrant 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_03_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.525,\"y\":330.851,\"z\":195.085}',1300000), + (22,'Sharp1Apartment','Appartement Persan 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_04_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.527,\"y\":327.89,\"z\":210.396}',1300000), + (23,'Sharp2Apartment','Appartement Persan 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_04_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.642,\"y\":326.497,\"z\":186.313}',1300000), + (24,'Sharp3Apartment','Appartement Persan 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_04_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.503,\"y\":331.318,\"z\":195.085}',1300000), + (25,'Monochrome1Apartment','Appartement Monochrome 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_05_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.289,\"y\":328.086,\"z\":210.396}',1300000), + (26,'Monochrome2Apartment','Appartement Monochrome 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_05_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.692,\"y\":326.762,\"z\":186.313}',1300000), + (27,'Monochrome3Apartment','Appartement Monochrome 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_05_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.094,\"y\":330.976,\"z\":195.085}',1300000), + (28,'Seductive1Apartment','Appartement Séduisant 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_06_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.263,\"y\":328.104,\"z\":210.396}',1300000), + (29,'Seductive2Apartment','Appartement Séduisant 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_06_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.655,\"y\":326.611,\"z\":186.313}',1300000), + (30,'Seductive3Apartment','Appartement Séduisant 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_06_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.3,\"y\":331.414,\"z\":195.085}',1300000), + (31,'Regal1Apartment','Appartement Régal 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_07_a\"]','MiltonDrive',0,1,0,'{\"x\":-765.956,\"y\":328.257,\"z\":210.396}',1300000), + (32,'Regal2Apartment','Appartement Régal 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_07_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.545,\"y\":326.659,\"z\":186.313}',1300000), + (33,'Regal3Apartment','Appartement Régal 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_07_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.087,\"y\":331.429,\"z\":195.123}',1300000), + (34,'Aqua1Apartment','Appartement Aqua 1',NULL,'{\"x\":-784.194,\"y\":323.636,\"z\":210.997}','{\"x\":-779.751,\"y\":323.385,\"z\":210.997}',NULL,'[\"apa_v_mp_h_08_a\"]','MiltonDrive',0,1,0,'{\"x\":-766.187,\"y\":328.47,\"z\":210.396}',1300000), + (35,'Aqua2Apartment','Appartement Aqua 2',NULL,'{\"x\":-786.8663,\"y\":315.764,\"z\":186.913}','{\"x\":-781.808,\"y\":315.866,\"z\":186.913}',NULL,'[\"apa_v_mp_h_08_c\"]','MiltonDrive',0,1,0,'{\"x\":-795.658,\"y\":326.563,\"z\":186.313}',1300000), + (36,'Aqua3Apartment','Appartement Aqua 3',NULL,'{\"x\":-774.012,\"y\":342.042,\"z\":195.686}','{\"x\":-779.057,\"y\":342.063,\"z\":195.686}',NULL,'[\"apa_v_mp_h_08_b\"]','MiltonDrive',0,1,0,'{\"x\":-765.287,\"y\":331.084,\"z\":195.086}',1300000), + (37,'IntegrityWay','4 Integrity Way','{\"x\":-47.804,\"y\":-585.867,\"z\":36.956}',NULL,NULL,'{\"x\":-54.178,\"y\":-583.762,\"z\":35.798}','[]',NULL,0,0,1,NULL,0), + (38,'IntegrityWay28','4 Integrity Way - Apt 28',NULL,'{\"x\":-31.409,\"y\":-594.927,\"z\":79.03}','{\"x\":-26.098,\"y\":-596.909,\"z\":79.03}',NULL,'[]','IntegrityWay',0,1,0,'{\"x\":-11.923,\"y\":-597.083,\"z\":78.43}',1700000), + (39,'IntegrityWay30','4 Integrity Way - Apt 30',NULL,'{\"x\":-17.702,\"y\":-588.524,\"z\":89.114}','{\"x\":-16.21,\"y\":-582.569,\"z\":89.114}',NULL,'[]','IntegrityWay',0,1,0,'{\"x\":-26.327,\"y\":-588.384,\"z\":89.123}',1700000), + (40,'DellPerroHeights','Dell Perro Heights','{\"x\":-1447.06,\"y\":-538.28,\"z\":33.74}',NULL,NULL,'{\"x\":-1440.022,\"y\":-548.696,\"z\":33.74}','[]',NULL,0,0,1,NULL,0), + (41,'DellPerroHeightst4','Dell Perro Heights - Apt 28',NULL,'{\"x\":-1452.125,\"y\":-540.591,\"z\":73.044}','{\"x\":-1455.435,\"y\":-535.79,\"z\":73.044}',NULL,'[]','DellPerroHeights',0,1,0,'{\"x\":-1467.058,\"y\":-527.571,\"z\":72.443}',1700000), + (42,'DellPerroHeightst7','Dell Perro Heights - Apt 30',NULL,'{\"x\":-1451.562,\"y\":-523.535,\"z\":55.928}','{\"x\":-1456.02,\"y\":-519.209,\"z\":55.929}',NULL,'[]','DellPerroHeights',0,1,0,'{\"x\":-1457.026,\"y\":-530.219,\"z\":55.937}',1700000) ; diff --git a/offices.sql b/offices.sql index 638e54e7..5947c03f 100644 --- a/offices.sql +++ b/offices.sql @@ -1,32 +1,32 @@ INSERT INTO `properties` VALUES - (43, 'MazeBankBuilding', 'Maze Bank Building', '{\"x\":-79.18,\"y\":-795.92,\"z\":43.35}', NULL, NULL, '{\"x\":-72.50,\"y\":-786.92,\"z\":43.40}', '[]', NULL, 0, 0, 1, NULL, 0), - (44, 'OldSpiceWarm', 'Old Spice Warm', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_01a\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), - (45, 'OldSpiceClassical', 'Old Spice Classical', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_01b\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), - (46, 'OldSpiceVintage', 'Old Spice Vintage', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_01c\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), - (47, 'ExecutiveRich', 'Executive Rich', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_02b\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), - (48, 'ExecutiveCool', 'Executive Cool', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_02c\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), - (49, 'ExecutiveContrast', 'Executive Contrast', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_02a\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), - (50, 'PowerBrokerIce', 'Power Broker Ice', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_03a\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), - (51, 'PowerBrokerConservative', 'Power Broker Conservative', NULL, '', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_03b\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), - (52, 'PowerBrokerPolished', 'Power Broker Polished', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_03c\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), - (53, 'LomBank', 'Lom Bank', '{\"x\":-1581.36,\"y\":-558.23,\"z\":34.07}', NULL, NULL, '{\"x\":-1583.60,\"y\":-555.12,\"z\":34.07}', '[]', NULL, 0, 0, 1, NULL, 0), - (54, 'LBOldSpiceWarm', 'LB Old Spice Warm', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_01a\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), - (55, 'LBOldSpiceClassical', 'LB Old Spice Classical', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_01b\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), - (56, 'LBOldSpiceVintage', 'LB Old Spice Vintage', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_01c\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), - (57, 'LBExecutiveRich', 'LB Executive Rich', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_02b\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), - (58, 'LBExecutiveCool', 'LB Executive Cool', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_02c\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), - (59, 'LBExecutiveContrast', 'LB Executive Contrast', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_02a\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), - (60, 'LBPowerBrokerIce', 'LB Power Broker Ice', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_03a\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), - (61, 'LBPowerBrokerConservative', 'LB Power Broker Conservative', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_03b\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), - (62, 'LBPowerBrokerPolished', 'LB Power Broker Polished', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_03c\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), - (63, 'MazeBankWest', 'Maze Bank West', '{\"x\":-1379.58,\"y\":-499.63,\"z\":32.22}', NULL, NULL, '{\"x\":-1378.95,\"y\":-502.82,\"z\":32.22}', '[]', NULL, 0, 0, 1, NULL, 0), - (64, 'MBWOldSpiceWarm', 'MBW Old Spice Warm', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_01a\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), - (65, 'MBWOldSpiceClassical', 'MBW Old Spice Classical', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_01b\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), - (66, 'MBWOldSpiceVintage', 'MBW Old Spice Vintage', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_01c\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), - (67, 'MBWExecutiveRich', 'MBW Executive Rich', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_02b\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), - (68, 'MBWExecutiveCool', 'MBW Executive Cool', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_02c\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), - (69, 'MBWExecutive Contrast', 'MBW Executive Contrast', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_02a\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), - (70, 'MBWPowerBrokerIce', 'MBW Power Broker Ice', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_03a\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), - (71, 'MBWPowerBrokerConvservative', 'MBW Power Broker Convservative', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_03b\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), - (72, 'MBWPowerBrokerPolished', 'MBW Power Broker Polished', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_03c\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000); -; + (43, 'MazeBankBuilding', 'Maze Bank Building', '{\"x\":-79.18,\"y\":-795.92,\"z\":43.35}', NULL, NULL, '{\"x\":-72.50,\"y\":-786.92,\"z\":43.40}', '[]', NULL, 0, 0, 1, NULL, 0), + (44, 'OldSpiceWarm', 'Old Spice Warm', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_01a\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), + (45, 'OldSpiceClassical', 'Old Spice Classical', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_01b\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), + (46, 'OldSpiceVintage', 'Old Spice Vintage', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_01c\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), + (47, 'ExecutiveRich', 'Executive Rich', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_02b\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), + (48, 'ExecutiveCool', 'Executive Cool', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_02c\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), + (49, 'ExecutiveContrast', 'Executive Contrast', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_02a\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), + (50, 'PowerBrokerIce', 'Power Broker Ice', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_03a\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), + (51, 'PowerBrokerConservative', 'Power Broker Conservative', NULL, '', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_03b\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), + (52, 'PowerBrokerPolished', 'Power Broker Polished', NULL, '{\"x\":-75.69,\"y\":-827.08,\"z\":242.43}', '{\"x\":-75.51,\"y\":-823.90,\"z\":242.43}', NULL, '[\"ex_dt1_11_office_03c\"]', 'MazeBankBuilding', 0, 1, 0, '{\"x\":-76.49,\"y\":-826.80,\"z\":243.38}', 5000000), + (53, 'LomBank', 'Lom Bank', '{\"x\":-1581.36,\"y\":-558.23,\"z\":34.07}', NULL, NULL, '{\"x\":-1583.60,\"y\":-555.12,\"z\":34.07}', '[]', NULL, 0, 0, 1, NULL, 0), + (54, 'LBOldSpiceWarm', 'LB Old Spice Warm', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_01a\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), + (55, 'LBOldSpiceClassical', 'LB Old Spice Classical', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_01b\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), + (56, 'LBOldSpiceVintage', 'LB Old Spice Vintage', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_01c\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), + (57, 'LBExecutiveRich', 'LB Executive Rich', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_02b\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), + (58, 'LBExecutiveCool', 'LB Executive Cool', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_02c\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), + (59, 'LBExecutiveContrast', 'LB Executive Contrast', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_02a\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), + (60, 'LBPowerBrokerIce', 'LB Power Broker Ice', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_03a\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), + (61, 'LBPowerBrokerConservative', 'LB Power Broker Conservative', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_03b\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), + (62, 'LBPowerBrokerPolished', 'LB Power Broker Polished', NULL, '{\"x\":-1579.53,\"y\":-564.89,\"z\":107.62}', '{\"x\":-1576.42,\"y\":-567.57,\"z\":107.62}', NULL, '[\"ex_sm_13_office_03c\"]', 'LomBank', 0, 1, 0, '{\"x\":-1577.68,\"y\":-565.91,\"z\":108.52}', 3500000), + (63, 'MazeBankWest', 'Maze Bank West', '{\"x\":-1379.58,\"y\":-499.63,\"z\":32.22}', NULL, NULL, '{\"x\":-1378.95,\"y\":-502.82,\"z\":32.22}', '[]', NULL, 0, 0, 1, NULL, 0), + (64, 'MBWOldSpiceWarm', 'MBW Old Spice Warm', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_01a\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), + (65, 'MBWOldSpiceClassical', 'MBW Old Spice Classical', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_01b\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), + (66, 'MBWOldSpiceVintage', 'MBW Old Spice Vintage', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_01c\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), + (67, 'MBWExecutiveRich', 'MBW Executive Rich', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_02b\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), + (68, 'MBWExecutiveCool', 'MBW Executive Cool', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_02c\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), + (69, 'MBWExecutive Contrast', 'MBW Executive Contrast', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_02a\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), + (70, 'MBWPowerBrokerIce', 'MBW Power Broker Ice', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_03a\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), + (71, 'MBWPowerBrokerConvservative', 'MBW Power Broker Convservative', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_03b\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000), + (72, 'MBWPowerBrokerPolished', 'MBW Power Broker Polished', NULL, '{\"x\":-1392.74,\"y\":-480.18,\"z\":71.14}', '{\"x\":-1389.43,\"y\":-479.01,\"z\":71.14}', NULL, '[\"ex_sm_15_office_03c\"]', 'MazeBankWest', 0, 1, 0, '{\"x\":-1390.76,\"y\":-479.22,\"z\":72.04}', 2700000); +; diff --git a/server/main.lua b/server/main.lua index fa4067f4..ec5af03b 100644 --- a/server/main.lua +++ b/server/main.lua @@ -4,579 +4,579 @@ TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) function GetProperty(name) - for i=1, #Config.Properties, 1 do - if Config.Properties[i].name == name then - return Config.Properties[i] - end - end + for i=1, #Config.Properties, 1 do + if Config.Properties[i].name == name then + return Config.Properties[i] + end + end end function SetPropertyOwned(name, price, rented, owner) - MySQL.Async.execute( - 'INSERT INTO owned_properties (name, price, rented, owner) VALUES (@name, @price, @rented, @owner)', - { - ['@name'] = name, - ['@price'] = price, - ['@rented'] = (rented and 1 or 0), - ['@owner'] = owner - }, - function(rowsChanged) + MySQL.Async.execute( + 'INSERT INTO owned_properties (name, price, rented, owner) VALUES (@name, @price, @rented, @owner)', + { + ['@name'] = name, + ['@price'] = price, + ['@rented'] = (rented and 1 or 0), + ['@owner'] = owner + }, + function(rowsChanged) - local xPlayers = ESX.GetPlayers() + local xPlayers = ESX.GetPlayers() - for i=1, #xPlayers, 1 do + for i=1, #xPlayers, 1 do - local xPlayer = ESX.GetPlayerFromId(xPlayers[i]) - - if xPlayer.identifier == owner then + local xPlayer = ESX.GetPlayerFromId(xPlayers[i]) - TriggerClientEvent('esx_property:setPropertyOwned', xPlayer.source, name, true) + if xPlayer.identifier == owner then - if rented then - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('rented_for') .. price) - else - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('purchased_for') .. price) - end + TriggerClientEvent('esx_property:setPropertyOwned', xPlayer.source, name, true) - break - end - end + if rented then + TriggerClientEvent('esx:showNotification', xPlayer.source, _U('rented_for') .. price) + else + TriggerClientEvent('esx:showNotification', xPlayer.source, _U('purchased_for') .. price) + end - end - ) + break + end + end + + end + ) end function RemoveOwnedProperty(name, owner) - MySQL.Async.execute( - 'DELETE FROM owned_properties WHERE name = @name AND owner = @owner', - { - ['@name'] = name, - ['@owner'] = owner - }, - function(rowsChanged) + MySQL.Async.execute( + 'DELETE FROM owned_properties WHERE name = @name AND owner = @owner', + { + ['@name'] = name, + ['@owner'] = owner + }, + function(rowsChanged) - local xPlayers = ESX.GetPlayers() + local xPlayers = ESX.GetPlayers() - for i=1, #xPlayers, 1 do + for i=1, #xPlayers, 1 do - local xPlayer = ESX.GetPlayerFromId(xPlayers[i]) - - if xPlayer.identifier == owner then - TriggerClientEvent('esx_property:setPropertyOwned', xPlayer.source, name, false) - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('made_property')) - break - end - end + local xPlayer = ESX.GetPlayerFromId(xPlayers[i]) - end - ) + if xPlayer.identifier == owner then + TriggerClientEvent('esx_property:setPropertyOwned', xPlayer.source, name, false) + TriggerClientEvent('esx:showNotification', xPlayer.source, _U('made_property')) + break + end + end + + end + ) end AddEventHandler('onMySQLReady', function () - MySQL.Async.fetchAll('SELECT * FROM properties', {}, function(properties) + MySQL.Async.fetchAll('SELECT * FROM properties', {}, function(properties) - for i=1, #properties, 1 do + for i=1, #properties, 1 do - local entering = nil - local exit = nil - local inside = nil - local outside = nil - local isSingle = nil - local isRoom = nil - local isGateway = nil - local roomMenu = nil + local entering = nil + local exit = nil + local inside = nil + local outside = nil + local isSingle = nil + local isRoom = nil + local isGateway = nil + local roomMenu = nil - if properties[i].entering ~= nil then - entering = json.decode(properties[i].entering) - end + if properties[i].entering ~= nil then + entering = json.decode(properties[i].entering) + end - if properties[i].exit ~= nil then - exit = json.decode(properties[i].exit) - end + if properties[i].exit ~= nil then + exit = json.decode(properties[i].exit) + end - if properties[i].inside ~= nil then - inside = json.decode(properties[i].inside) - end + if properties[i].inside ~= nil then + inside = json.decode(properties[i].inside) + end - if properties[i].outside ~= nil then - outside = json.decode(properties[i].outside) - end + if properties[i].outside ~= nil then + outside = json.decode(properties[i].outside) + end - if properties[i].is_single == 0 then - isSingle = false - else - isSingle = true - end + if properties[i].is_single == 0 then + isSingle = false + else + isSingle = true + end - if properties[i].is_room == 0 then - isRoom = false - else - isRoom = true - end + if properties[i].is_room == 0 then + isRoom = false + else + isRoom = true + end - if properties[i].is_gateway == 0 then - isGateway = false - else - isGateway = true - end + if properties[i].is_gateway == 0 then + isGateway = false + else + isGateway = true + end - if properties[i].room_menu ~= nil then - roomMenu = json.decode(properties[i].room_menu) - end + if properties[i].room_menu ~= nil then + roomMenu = json.decode(properties[i].room_menu) + end - table.insert(Config.Properties, { - name = properties[i].name, - label = properties[i].label, - entering = entering, - exit = exit, - inside = inside, - outside = outside, - ipls = json.decode(properties[i].ipls), - gateway = properties[i].gateway, - isSingle = isSingle, - isRoom = isRoom, - isGateway = isGateway, - roomMenu = roomMenu, - price = properties[i].price - }) + table.insert(Config.Properties, { + name = properties[i].name, + label = properties[i].label, + entering = entering, + exit = exit, + inside = inside, + outside = outside, + ipls = json.decode(properties[i].ipls), + gateway = properties[i].gateway, + isSingle = isSingle, + isRoom = isRoom, + isGateway = isGateway, + roomMenu = roomMenu, + price = properties[i].price + }) - end + end - end) + end) end) AddEventHandler('esx_ownedproperty:getOwnedProperties', function(cb) - MySQL.Async.fetchAll( - 'SELECT * FROM owned_properties', - {}, - function(result) + MySQL.Async.fetchAll( + 'SELECT * FROM owned_properties', + {}, + function(result) - local properties = {} + local properties = {} - for i=1, #result, 1 do + for i=1, #result, 1 do - table.insert(properties, { - id = result[i].id, - name = result[i].name, - price = result[i].price, - rented = (rented == 1 and true or false), - owner = result[i].owner, - }) - end + table.insert(properties, { + id = result[i].id, + name = result[i].name, + price = result[i].price, + rented = (rented == 1 and true or false), + owner = result[i].owner, + }) + end - cb(properties) + cb(properties) - end - ) + end + ) end) AddEventHandler('esx_property:setPropertyOwned', function(name, price, rented, owner) - SetPropertyOwned(name, price, rented, owner) + SetPropertyOwned(name, price, rented, owner) end) AddEventHandler('esx_property:removeOwnedProperty', function(name, owner) - RemoveOwnedProperty(name, owner) + RemoveOwnedProperty(name, owner) end) RegisterServerEvent('esx_property:rentProperty') AddEventHandler('esx_property:rentProperty', function(propertyName) - local xPlayer = ESX.GetPlayerFromId(source) - local property = GetProperty(propertyName) + local xPlayer = ESX.GetPlayerFromId(source) + local property = GetProperty(propertyName) - SetPropertyOwned(propertyName, property.price / 200, true, xPlayer.identifier) + SetPropertyOwned(propertyName, property.price / 200, true, xPlayer.identifier) end) RegisterServerEvent('esx_property:buyProperty') AddEventHandler('esx_property:buyProperty', function(propertyName) - local xPlayer = ESX.GetPlayerFromId(source) - local property = GetProperty(propertyName) + local xPlayer = ESX.GetPlayerFromId(source) + local property = GetProperty(propertyName) - if property.price <= xPlayer.get('money') then + if property.price <= xPlayer.get('money') then - xPlayer.removeMoney(property.price) - SetPropertyOwned(propertyName, property.price, false, xPlayer.identifier) + xPlayer.removeMoney(property.price) + SetPropertyOwned(propertyName, property.price, false, xPlayer.identifier) - else - TriggerClientEvent('esx:showNotification', source, _U('not_enough')) - end + else + TriggerClientEvent('esx:showNotification', source, _U('not_enough')) + end end) RegisterServerEvent('esx_property:removeOwnedProperty') AddEventHandler('esx_property:removeOwnedProperty', function(propertyName) - local xPlayer = ESX.GetPlayerFromId(source) + local xPlayer = ESX.GetPlayerFromId(source) - RemoveOwnedProperty(propertyName, xPlayer.identifier) + RemoveOwnedProperty(propertyName, xPlayer.identifier) end) AddEventHandler('esx_property:removeOwnedPropertyIdentifier', function(propertyName, identifier) - RemoveOwnedProperty(propertyName, identifier) + RemoveOwnedProperty(propertyName, identifier) end) RegisterServerEvent('esx_property:saveLastProperty') AddEventHandler('esx_property:saveLastProperty', function(property) - local xPlayer = ESX.GetPlayerFromId(source) + local xPlayer = ESX.GetPlayerFromId(source) - MySQL.Async.execute( - 'UPDATE users SET last_property = @last_property WHERE identifier = @identifier', - { - ['@last_property'] = property, - ['@identifier'] = xPlayer.identifier - } - ) + MySQL.Async.execute( + 'UPDATE users SET last_property = @last_property WHERE identifier = @identifier', + { + ['@last_property'] = property, + ['@identifier'] = xPlayer.identifier + } + ) end) RegisterServerEvent('esx_property:deleteLastProperty') AddEventHandler('esx_property:deleteLastProperty', function() - local xPlayer = ESX.GetPlayerFromId(source) + local xPlayer = ESX.GetPlayerFromId(source) - MySQL.Async.execute( - 'UPDATE users SET last_property = NULL WHERE identifier = @identifier', - { - ['@identifier'] = xPlayer.identifier - } - ) + MySQL.Async.execute( + 'UPDATE users SET last_property = NULL WHERE identifier = @identifier', + { + ['@identifier'] = xPlayer.identifier + } + ) end) RegisterServerEvent('esx_property:getItem') AddEventHandler('esx_property:getItem', function(owner, type, item, count) - local _source = source - local xPlayer = ESX.GetPlayerFromId(_source) - local xPlayerOwner = ESX.GetPlayerFromIdentifier(owner) + local _source = source + local xPlayer = ESX.GetPlayerFromId(_source) + local xPlayerOwner = ESX.GetPlayerFromIdentifier(owner) - if type == 'item_standard' then + if type == 'item_standard' then - TriggerEvent('esx_addoninventory:getInventory', 'property', xPlayerOwner.identifier, function(inventory) + TriggerEvent('esx_addoninventory:getInventory', 'property', xPlayerOwner.identifier, function(inventory) - local roomItemCount = inventory.getItem(item).count + local roomItemCount = inventory.getItem(item).count - if roomItemCount >= count then - inventory.removeItem(item, count) - xPlayer.addInventoryItem(item, count) - else - TriggerClientEvent('esx:showNotification', _source, _U('invalid_quantity')) - end + if roomItemCount >= count then + inventory.removeItem(item, count) + xPlayer.addInventoryItem(item, count) + else + TriggerClientEvent('esx:showNotification', _source, _U('invalid_quantity')) + end - end) + end) - end + end - if type == 'item_account' then + if type == 'item_account' then - TriggerEvent('esx_addonaccount:getAccount', 'property_' .. item, xPlayerOwner.identifier, function(account) + TriggerEvent('esx_addonaccount:getAccount', 'property_' .. item, xPlayerOwner.identifier, function(account) - local roomAccountMoney = account.money + local roomAccountMoney = account.money - if roomAccountMoney >= count then - account.removeMoney(count) - xPlayer.addAccountMoney(item, count) - else - TriggerClientEvent('esx:showNotification', _source, _U('amount_invalid')) - end + if roomAccountMoney >= count then + account.removeMoney(count) + xPlayer.addAccountMoney(item, count) + else + TriggerClientEvent('esx:showNotification', _source, _U('amount_invalid')) + end - end) + end) - end + end - if type == 'item_weapon' then + if type == 'item_weapon' then - TriggerEvent('esx_datastore:getDataStore', 'property', xPlayerOwner.identifier, function(store) + TriggerEvent('esx_datastore:getDataStore', 'property', xPlayerOwner.identifier, function(store) - local storeWeapons = store.get('weapons') + local storeWeapons = store.get('weapons') - if storeWeapons == nil then - storeWeapons = {} - end + if storeWeapons == nil then + storeWeapons = {} + end - local weaponName = nil - local ammo = nil + local weaponName = nil + local ammo = nil - for i=1, #storeWeapons, 1 do - if storeWeapons[i].name == item then + for i=1, #storeWeapons, 1 do + if storeWeapons[i].name == item then - weaponName = storeWeapons[i].name - ammo = storeWeapons[i].ammo + weaponName = storeWeapons[i].name + ammo = storeWeapons[i].ammo - table.remove(storeWeapons, i) + table.remove(storeWeapons, i) - break - end - end + break + end + end - store.set('weapons', storeWeapons) + store.set('weapons', storeWeapons) - xPlayer.addWeapon(weaponName, ammo) + xPlayer.addWeapon(weaponName, ammo) - end) + end) - end + end end) RegisterServerEvent('esx_property:putItem') AddEventHandler('esx_property:putItem', function(owner, type, item, count) - local _source = source - local xPlayer = ESX.GetPlayerFromId(_source) - local xPlayerOwner = ESX.GetPlayerFromIdentifier(owner) + local _source = source + local xPlayer = ESX.GetPlayerFromId(_source) + local xPlayerOwner = ESX.GetPlayerFromIdentifier(owner) - if type == 'item_standard' then + if type == 'item_standard' then - local playerItemCount = xPlayer.getInventoryItem(item).count + local playerItemCount = xPlayer.getInventoryItem(item).count - if playerItemCount >= count then + if playerItemCount >= count then - xPlayer.removeInventoryItem(item, count) + xPlayer.removeInventoryItem(item, count) - TriggerEvent('esx_addoninventory:getInventory', 'property', xPlayerOwner.identifier, function(inventory) - inventory.addItem(item, count) - end) + TriggerEvent('esx_addoninventory:getInventory', 'property', xPlayerOwner.identifier, function(inventory) + inventory.addItem(item, count) + end) - else - TriggerClientEvent('esx:showNotification', _source, _U('invalid_quantity')) - end + else + TriggerClientEvent('esx:showNotification', _source, _U('invalid_quantity')) + end - end + end - if type == 'item_account' then + if type == 'item_account' then - local playerAccountMoney = xPlayer.getAccount(item).money + local playerAccountMoney = xPlayer.getAccount(item).money - if playerAccountMoney >= count then + if playerAccountMoney >= count then - xPlayer.removeAccountMoney(item, count) + xPlayer.removeAccountMoney(item, count) - TriggerEvent('esx_addonaccount:getAccount', 'property_' .. item, xPlayerOwner.identifier, function(account) - account.addMoney(count) - end) + TriggerEvent('esx_addonaccount:getAccount', 'property_' .. item, xPlayerOwner.identifier, function(account) + account.addMoney(count) + end) - else - TriggerClientEvent('esx:showNotification', _source, _U('amount_invalid')) - end + else + TriggerClientEvent('esx:showNotification', _source, _U('amount_invalid')) + end - end + end - if type == 'item_weapon' then + if type == 'item_weapon' then - TriggerEvent('esx_datastore:getDataStore', 'property', xPlayerOwner.identifier, function(store) + TriggerEvent('esx_datastore:getDataStore', 'property', xPlayerOwner.identifier, function(store) - local storeWeapons = store.get('weapons') + local storeWeapons = store.get('weapons') - if storeWeapons == nil then - storeWeapons = {} - end + if storeWeapons == nil then + storeWeapons = {} + end - table.insert(storeWeapons, { - name = item, - ammo = count - }) + table.insert(storeWeapons, { + name = item, + ammo = count + }) - store.set('weapons', storeWeapons) + store.set('weapons', storeWeapons) - xPlayer.removeWeapon(item) + xPlayer.removeWeapon(item) - end) + end) - end + end end) ESX.RegisterServerCallback('esx_property:getProperties', function(source, cb) - cb(Config.Properties) + cb(Config.Properties) end) ESX.RegisterServerCallback('esx_property:getOwnedProperties', function(source, cb) - local xPlayer = ESX.GetPlayerFromId(source) + local xPlayer = ESX.GetPlayerFromId(source) - MySQL.Async.fetchAll( - 'SELECT * FROM owned_properties WHERE owner = @owner', - { - ['@owner'] = xPlayer.identifier - }, - function(ownedProperties) + MySQL.Async.fetchAll( + 'SELECT * FROM owned_properties WHERE owner = @owner', + { + ['@owner'] = xPlayer.identifier + }, + function(ownedProperties) - local properties = {} + local properties = {} - for i=1, #ownedProperties, 1 do - table.insert(properties, ownedProperties[i].name) - end + for i=1, #ownedProperties, 1 do + table.insert(properties, ownedProperties[i].name) + end - cb(properties) - end - ) + cb(properties) + end + ) end) ESX.RegisterServerCallback('esx_property:getLastProperty', function(source, cb) - local xPlayer = ESX.GetPlayerFromId(source) + local xPlayer = ESX.GetPlayerFromId(source) - MySQL.Async.fetchAll( - 'SELECT * FROM users WHERE identifier = @identifier', - { - ['@identifier'] = xPlayer.identifier - }, - function(users) - cb(users[1].last_property) - end - ) + MySQL.Async.fetchAll( + 'SELECT * FROM users WHERE identifier = @identifier', + { + ['@identifier'] = xPlayer.identifier + }, + function(users) + cb(users[1].last_property) + end + ) end) ESX.RegisterServerCallback('esx_property:getPropertyInventory', function(source, cb, owner) - local xPlayer = ESX.GetPlayerFromIdentifier(owner) - local blackMoney = 0 - local items = {} - local weapons = {} + local xPlayer = ESX.GetPlayerFromIdentifier(owner) + local blackMoney = 0 + local items = {} + local weapons = {} - TriggerEvent('esx_addonaccount:getAccount', 'property_black_money', xPlayer.identifier, function(account) - blackMoney = account.money - end) + TriggerEvent('esx_addonaccount:getAccount', 'property_black_money', xPlayer.identifier, function(account) + blackMoney = account.money + end) - TriggerEvent('esx_addoninventory:getInventory', 'property', xPlayer.identifier, function(inventory) - items = inventory.items - end) + TriggerEvent('esx_addoninventory:getInventory', 'property', xPlayer.identifier, function(inventory) + items = inventory.items + end) - TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store) + TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store) - local storeWeapons = store.get('weapons') + local storeWeapons = store.get('weapons') - if storeWeapons ~= nil then - weapons = storeWeapons - end + if storeWeapons ~= nil then + weapons = storeWeapons + end - end) + end) - cb({ - blackMoney = blackMoney, - items = items, - weapons = weapons - }) + cb({ + blackMoney = blackMoney, + items = items, + weapons = weapons + }) end) ESX.RegisterServerCallback('esx_property:getPlayerInventory', function(source, cb) - local xPlayer = ESX.GetPlayerFromId(source) - local blackMoney = xPlayer.getAccount('black_money').money - local items = xPlayer.inventory + local xPlayer = ESX.GetPlayerFromId(source) + local blackMoney = xPlayer.getAccount('black_money').money + local items = xPlayer.inventory - cb({ - blackMoney = blackMoney, - items = items - }) + cb({ + blackMoney = blackMoney, + items = items + }) end) ESX.RegisterServerCallback('esx_property:getPlayerDressing', function(source, cb) - local xPlayer = ESX.GetPlayerFromId(source) - local dressing = {} + local xPlayer = ESX.GetPlayerFromId(source) + local dressing = {} - TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store) + TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store) - local storeDressing = store.get('dressing') + local storeDressing = store.get('dressing') - if storeDressing ~= nil then - dressing = storeDressing - end + if storeDressing ~= nil then + dressing = storeDressing + end - end) + end) - cb(dressing) + cb(dressing) end) function PayRent(d, h, m) - MySQL.Async.fetchAll( - 'SELECT * FROM users', - {}, - function(_users) + MySQL.Async.fetchAll( + 'SELECT * FROM users', + {}, + function(_users) - local prevMoney = {} - local newMoney = {} + local prevMoney = {} + local newMoney = {} - for i=1, #_users, 1 do - prevMoney[_users[i].identifier] = _users[i].money - newMoney[_users[i].identifier] = _users[i].money - end + for i=1, #_users, 1 do + prevMoney[_users[i].identifier] = _users[i].money + newMoney[_users[i].identifier] = _users[i].money + end - MySQL.Async.fetchAll( - 'SELECT * FROM owned_properties WHERE rented = 1', - {}, - function(result) + MySQL.Async.fetchAll( + 'SELECT * FROM owned_properties WHERE rented = 1', + {}, + function(result) - local xPlayers = ESX.GetPlayers() + local xPlayers = ESX.GetPlayers() - for i=1, #result, 1 do + for i=1, #result, 1 do - local foundPlayer = false - local xPlayer = nil + local foundPlayer = false + local xPlayer = nil - for j=1, #xPlayers, 1 do + for j=1, #xPlayers, 1 do - local xPlayer2 = ESX.GetPlayerFromId(xPlayers[j]) - - if xPlayer2.identifier == result[i].owner then - foundPlayer = true - xPlayer = xPlayer2 - end - end + local xPlayer2 = ESX.GetPlayerFromId(xPlayers[j]) - if foundPlayer then + if xPlayer2.identifier == result[i].owner then + foundPlayer = true + xPlayer = xPlayer2 + end + end - xPlayer.removeMoney(result[i].price) - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('paid_rent') .. result[i].price) + if foundPlayer then - else - newMoney[result[i].owner] = newMoney[result[i].owner] - result[i].price - end + xPlayer.removeMoney(result[i].price) + TriggerClientEvent('esx:showNotification', xPlayer.source, _U('paid_rent') .. result[i].price) - TriggerEvent('esx_addonaccount:getSharedAccount', 'society_realestateagent', function(account) - account.addMoney(result[i].price) - end) + else + newMoney[result[i].owner] = newMoney[result[i].owner] - result[i].price + end - end + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_realestateagent', function(account) + account.addMoney(result[i].price) + end) - for k,v in pairs(prevMoney) do - if v ~= newMoney[k] then + end - MySQL.Async.execute( - 'UPDATE users SET money = @money WHERE identifier = @identifier', - { - ['@money'] = newMoney[k], - ['@identifier'] = k - } - ) + for k,v in pairs(prevMoney) do + if v ~= newMoney[k] then - end - end + MySQL.Async.execute( + 'UPDATE users SET money = @money WHERE identifier = @identifier', + { + ['@money'] = newMoney[k], + ['@identifier'] = k + } + ) - end - ) + end + end - end - ) + end + ) + + end + ) end