mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 22:01:28 +00:00
feat(es_extended) Added in randomisation of default spawn coordinates
Replaced Config.DefaultSpawn in [core]\es_extended\config.lua:L21 with a table of default spawn coordinates, and updated [core]\es_extended\server\main.lua:L254 to use new coordinates table.
This commit is contained in:
@@ -18,7 +18,13 @@ Config.Accounts = {
|
||||
|
||||
Config.StartingAccountMoney = {bank = 50000}
|
||||
|
||||
Config.DefaultSpawn = {x = -269.4, y = -955.3, z = 31.2, heading = 205.8}
|
||||
Config.Spawns = { -- Default spawn locations are currently set to locations on San Andreas Avenue near the intersection of Strawberry Avenue at Legion Square
|
||||
{x = 222.2027, y = -864.0162, z = 30.2922, heading = 1.0},
|
||||
{x = 224.9865, y = -865.0871, z = 30.2922, heading = 1.0},
|
||||
{x = 227.8436, y = -866.0400, z = 30.2922, heading = 1.0},
|
||||
{x = 230.6051, y = -867.1450, z = 30.2922, heading = 1.0},
|
||||
{x = 233.5459, y = -868.2626, z = 30.2922, heading = 1.0}
|
||||
}
|
||||
|
||||
Config.EnablePaycheck = true -- enable paycheck
|
||||
Config.LogPaycheck = false -- Logs paychecks to a nominated Discord channel via webhook (default is false)
|
||||
|
||||
@@ -251,7 +251,7 @@ function loadESXPlayer(identifier, playerId, isNew)
|
||||
end
|
||||
|
||||
-- Position
|
||||
userData.coords = json.decode(result.position) or Config.DefaultSpawn
|
||||
userData.coords = json.decode(result.position) or Config.Spawns[math.random(#Config.Spawns)]
|
||||
|
||||
-- Skin
|
||||
if result.skin and result.skin ~= '' then
|
||||
|
||||
Reference in New Issue
Block a user