mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-18 14:26:03 +01:00
Update main.lua
This commit is contained in:
@@ -122,18 +122,19 @@ AddEventHandler("newCharacter", function(newCharacter)
|
|||||||
local departmentCheck = validateDepartment(player, newCharacter.department)
|
local departmentCheck = validateDepartment(player, newCharacter.department)
|
||||||
if not departmentCheck then return end
|
if not departmentCheck then return end
|
||||||
|
|
||||||
|
local startingCash = newCharacter.startingCash
|
||||||
|
local startingBank = newCharacter.startingBank
|
||||||
|
print(startingCash)
|
||||||
if config.enableMoneySystem then
|
if config.enableMoneySystem then
|
||||||
local startingCash = newCharacter.startingCash
|
-- Don't trust the client, validate maximum amounts.
|
||||||
local startingBank = newCharacter.startingBank
|
local moneyCheck = validateMoney(startingCash, startingBank)
|
||||||
-- Don't trust the client, validate maximum amounts.
|
|
||||||
local moneyCheck = validateMoney(startingCash, startingBank)
|
|
||||||
|
|
||||||
-- Set money to maximum amount in the config .
|
-- Set money to maximum amount in the config .
|
||||||
-- Only triggers if the client is sending an amount that exceeds the maximum.
|
-- Only triggers if the client is sending an amount that exceeds the maximum.
|
||||||
if not moneyCheck then
|
if not moneyCheck then
|
||||||
startingCash = config.maxStartingCash
|
startingCash = config.maxStartingCash
|
||||||
startingBank = config.maxStartingBank
|
startingBank = config.maxStartingBank
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
exports.oxmysql:query("SELECT character_id FROM characters WHERE license = ?", {GetPlayerIdentifierFromType("license", player)}, function(result)
|
exports.oxmysql:query("SELECT character_id FROM characters WHERE license = ?", {GetPlayerIdentifierFromType("license", player)}, function(result)
|
||||||
|
|||||||
Reference in New Issue
Block a user