Merge pull request #1053 from thesysadmindev/dev

feat(es_extended): Added in randomisation of default spawn coordinates
This commit is contained in:
Thekuca
2023-05-29 14:08:16 +02:00
committed by GitHub
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -18,12 +18,20 @@ Config.Accounts = {
Config.StartingAccountMoney = {bank = 50000}
Config.DefaultSpawns = { -- If you want to have more spawn positions and select them randomly uncomment commented code or add more locations
{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.AdminGroups = {
['owner'] = true,
['admin'] = true
}
Config.DefaultSpawn = {x = -269.4, y = -955.3, z = 31.2, heading = 205.8}
Config.EnablePaycheck = true -- enable paycheck
Config.LogPaycheck = false -- Logs paychecks to a nominated Discord channel via webhook (default is false)
+1 -1
View File
@@ -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.DefaultSpawns[math.random(#Config.DefaultSpawns)]
-- Skin
if result.skin and result.skin ~= '' then