Limit points to minimum
This commit is contained in:
parent
21416551f0
commit
d0a0f452c6
@ -3,6 +3,7 @@ if engine.ActiveGamemode() ~= "zombiesurvival" then return end
|
|||||||
|
|
||||||
local settings = {
|
local settings = {
|
||||||
StartingSavedPoints = 100,
|
StartingSavedPoints = 100,
|
||||||
|
MinimumPoints = 0,
|
||||||
IgnoredMaps = { -- Use $ at the end if you want to define exact map names with versions. (Otherwise it will match with all maps beginning with the given name)
|
IgnoredMaps = { -- Use $ at the end if you want to define exact map names with versions. (Otherwise it will match with all maps beginning with the given name)
|
||||||
"zs_obj_gauntlet",
|
"zs_obj_gauntlet",
|
||||||
"zs_gauntlet_reborn"
|
"zs_gauntlet_reborn"
|
||||||
@ -70,6 +71,7 @@ if not SERVER then return end
|
|||||||
-- Server side methods
|
-- Server side methods
|
||||||
|
|
||||||
function meta:SetSavedPoints(amount)
|
function meta:SetSavedPoints(amount)
|
||||||
|
if amount < settings.MinimumPoints then amount = settings.MinimumPoints end
|
||||||
self:SetNWInt("zs_savedpoints", amount)
|
self:SetNWInt("zs_savedpoints", amount)
|
||||||
self:SetPData("zs_savedpoints", amount)
|
self:SetPData("zs_savedpoints", amount)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user