|
|
@ -27,7 +27,7 @@ his email is jaxschellhorn@gmail.com
|
|
|
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if engine.ActiveGamemode() ~= "zombiesurvival" then return end
|
|
|
|
|
|
|
|
|
|
|
|
hook.Add("PlayerInitialSpawnRound", "ps_set", function(ply)
|
|
|
|
hook.Add("PlayerInitialSpawnRound", "ps_set", function(ply)
|
|
|
|
if gmod.GetGamemode().Name == "Zombie Survival" then
|
|
|
|
if gmod.GetGamemode().Name == "Zombie Survival" then
|
|
|
@ -44,8 +44,7 @@ end
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
hook.Add("PlayerDeath", "ps_catch", function(ply)
|
|
|
|
hook.Add("PlayerDeath", "ps_catch", function(ply)
|
|
|
|
|
|
|
|
if (ply:Team() == TEAM_HUMAN and game.GetMap() ~= "zs_obj_gauntlet_v3" and game.GetMap() ~="zs_gauntlet_reborn_b6") then
|
|
|
|
if (ply:Team() == TEAM_HUMAN and game.GetMap() ~= "zs_obj_gauntlet_v3" and game.GetMap() ~="zs_gauntlet_reborn_b6") and gmod.GetGamemode().Name == "Zombie Survival" then
|
|
|
|
|
|
|
|
ply:SetMoney(ply:GetPoints())
|
|
|
|
ply:SetMoney(ply:GetPoints())
|
|
|
|
-- WriteData(ply:SteamID64(), ply:GetPoints())
|
|
|
|
-- WriteData(ply:SteamID64(), ply:GetPoints())
|
|
|
|
-- PrintMessage(HUD_PRINTTALK,ply:GetDTInt(1))
|
|
|
|
-- PrintMessage(HUD_PRINTTALK,ply:GetDTInt(1))
|
|
|
@ -57,7 +56,7 @@ end)
|
|
|
|
|
|
|
|
|
|
|
|
--[[hook.Add("EndRound", "ps_save", function(winner)
|
|
|
|
--[[hook.Add("EndRound", "ps_save", function(winner)
|
|
|
|
print("end round hook")
|
|
|
|
print("end round hook")
|
|
|
|
if (game.GetMap() ~= "zs_obj_gauntlet_v3" and game.GetMap() ~="zs_gauntlet_reborn_b6") and gmod.GetGamemode().Name == "Zombie Survival" then
|
|
|
|
if (game.GetMap() ~= "zs_obj_gauntlet_v3" and game.GetMap() ~="zs_gauntlet_reborn_b6") then
|
|
|
|
if winner == TEAM_HUMAN then
|
|
|
|
if winner == TEAM_HUMAN then
|
|
|
|
for k,ply in pairs(player.GetAll()) do
|
|
|
|
for k,ply in pairs(player.GetAll()) do
|
|
|
|
if ply:Team() == TEAM_HUMAN then
|
|
|
|
if ply:Team() == TEAM_HUMAN then
|
|
|
@ -84,7 +83,7 @@ end
|
|
|
|
end)]]
|
|
|
|
end)]]
|
|
|
|
|
|
|
|
|
|
|
|
hook.Add("PlayerDisconnected", "ps_disc", function(ply)
|
|
|
|
hook.Add("PlayerDisconnected", "ps_disc", function(ply)
|
|
|
|
if (ply:Team() == TEAM_HUMAN and game.GetMap() ~= "zs_obj_gauntlet_v3" and game.GetMap() ~="zs_gauntlet_reborn_b6") and gmod.GetGamemode().Name == "Zombie Survival" then
|
|
|
|
if (ply:Team() == TEAM_HUMAN and game.GetMap() ~= "zs_obj_gauntlet_v3" and game.GetMap() ~="zs_gauntlet_reborn_b6") then
|
|
|
|
-- WriteData(ply:SteamID64(), ply:GetPoints())
|
|
|
|
-- WriteData(ply:SteamID64(), ply:GetPoints())
|
|
|
|
ply:SetMoney(ply:GetPoints())
|
|
|
|
ply:SetMoney(ply:GetPoints())
|
|
|
|
ply:SaveMoney()
|
|
|
|
ply:SaveMoney()
|
|
|
@ -96,7 +95,7 @@ end)
|
|
|
|
hook.Add("PlayerRedeemed", "ps_redeem", function(ply)
|
|
|
|
hook.Add("PlayerRedeemed", "ps_redeem", function(ply)
|
|
|
|
-- ply:SetPoints(ReadData(ply:SteamID64()))
|
|
|
|
-- ply:SetPoints(ReadData(ply:SteamID64()))
|
|
|
|
-- ply:SetMoney(ply:GetMoney())
|
|
|
|
-- ply:SetMoney(ply:GetMoney())
|
|
|
|
if (game.GetMap() ~= "zs_obj_gauntlet_v3" and game.GetMap() ~="zs_gauntlet_reborn_b6") and gmod.GetGamemode().Name == "Zombie Survival" then
|
|
|
|
if (game.GetMap() ~= "zs_obj_gauntlet_v3" and game.GetMap() ~="zs_gauntlet_reborn_b6") then
|
|
|
|
ply:SetPoints(ply:GetMoney())
|
|
|
|
ply:SetPoints(ply:GetMoney())
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
end)
|
|
|
@ -118,10 +117,8 @@ end)]]
|
|
|
|
|
|
|
|
|
|
|
|
-- ZSPS_Opt = CreateConVar("ZSPS_nosend", "0", FCVAR_ARCHIVE, "Opt out of the ZSPS server list"):GetBool()
|
|
|
|
-- ZSPS_Opt = CreateConVar("ZSPS_nosend", "0", FCVAR_ARCHIVE, "Opt out of the ZSPS server list"):GetBool()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hook.Add("PlayerSpawn" , "spawnplayerpoints" ,function(pl)
|
|
|
|
hook.Add("PlayerSpawn" , "spawnplayerpoints" ,function(pl)
|
|
|
|
if (pl:Team() == TEAM_HUMAN and game.GetMap() ~= "zs_obj_gauntlet_v3" and game.GetMap() ~="zs_gauntlet_reborn_b6") and gmod.GetGamemode().Name == "Zombie Survival" then
|
|
|
|
if (pl:Team() == TEAM_HUMAN and game.GetMap() ~= "zs_obj_gauntlet_v3" and game.GetMap() ~="zs_gauntlet_reborn_b6") then
|
|
|
|
pl:SetPoints(pl:GetMoney())
|
|
|
|
pl:SetPoints(pl:GetMoney())
|
|
|
|
-- pl:SetBegPoints(pl:GetDTInt(1))
|
|
|
|
-- pl:SetBegPoints(pl:GetDTInt(1))
|
|
|
|
end
|
|
|
|
end
|
|
|
|