Hi there I recently went editing the sh_options file to add in the FA:S weapons and it all was fine when I only edited the worth menu part but after I added the rest of the weapons to the pointshop part now when you press f2 the pointshop wont open but the worth menu works fine on the round start. Heres the code to my menu below.
[LUA]GM.ZombieEscapeWeapons = {
"weapon_zs_zedeagle",
"weapon_zs_zeakbar",
"weapon_zs_zesweeper",
"weapon_zs_zesmg",
"weapon_zs_zestubber",
"weapon_zs_zebulletstorm"
}
-- Change this if you plan to alter the cost of items or you severely change how Worth works.
-- Having separate cart files allows people to have separate loadouts for different servers.
GM.CartFile = "zscarts.txt"
ITEMCAT_GUNS = 1
ITEMCAT_AMMO = 2
ITEMCAT_MELEE = 3
ITEMCAT_TOOLS = 4
ITEMCAT_OTHER = 5
ITEMCAT_TRAITS = 6
ITEMCAT_RETURNS = 7
ITEMCAT_ATT = 8
ITEMCAT_PISTOL = 9
ITEMCAT_SMG = 10
ITEMCAT_RIFLE = 11
ITEMCAT_SHOTGUN = 12
ITEMCAT_SNIPER = 13
ITEMCAT_HEAVY = 14
GM.ItemCategories = {
[ITEMCAT_GUNS] = "Starting Guns",
[ITEMCAT_AMMO] = "Ammunition",
[ITEMCAT_MELEE] = "Melee Weapons",
[ITEMCAT_TOOLS] = "Tools",
[ITEMCAT_OTHER] = "Other",
[ITEMCAT_TRAITS] = "Traits",
[ITEMCAT_RETURNS] = "Returns",
[ITEMCAT_ATT] = "Attachments",
[ITEMCAT_PISTOL] = "Pistols",
[ITEMCAT_SMG] = "SMG's",
[ITEMCAT_RIFLE] = "Assault Rifles",
[ITEMCAT_SHOTGUN] = "Shotguns",
[ITEMCAT_SNIPER] = "Sniper Rifles",
[ITEMCAT_HEAVY] = "Heavy Weapons"
}
--[[
Humans select what weapons (or other things) they want to start with and can even save favorites. Each object has a number of 'Worth' points.
Signature is a unique signature to give in case the item is renamed or reordered. Don't use a number or a string number!
A human can only use 100 points (default) when they join. Redeeming or joining late starts you out with a random loadout from above.
SWEP is a swep given when the player spawns with that perk chosen.
Callback is a function called. Model is a display model. If model isn't defined then the SWEP model will try to be used.
swep, callback, and model can all be nil or empty
]]
GM.Items = {}
function GM:AddItem(signature, name, desc, category, worth, swep, callback, model, worthshop, pointshop)
local tab = {Signature = signature, Name = name, Description = desc, Category = category, Worth = worth or 0, SWEP = swep, Callback = callback, Model = model, WorthShop = worthshop, PointShop = pointshop}
self.Items[#self.Items + 1] = tab
return tab
end
function GM:AddStartingItem(signature, name, desc, category, points, worth, callback, model)
return self:AddItem(signature, name, desc, category, points, worth, callback, model, true, false)
end
function GM:AddPointShopItem(signature, name, desc, category, points, worth, callback, model)
return self:AddItem("ps_"..signature, name, desc, category, points, worth, callback, model, false, true)
end
-- Weapons are registered after the gamemode.
timer.Simple(0, function()
for _, tab in pairs(GAMEMODE.Items) do
if not tab.Description and tab.SWEP then
local sweptab = weapons.GetStored(tab.SWEP)
if sweptab then
tab.Description = sweptab.Description
end
end
end
end)
-- How much ammo is considered one 'clip' of ammo? For use with setting up weapon defaults. Works directly with zs_survivalclips
GM.AmmoCache = {}
GM.AmmoCache["ar2"] = 30 -- Assault rifles.
GM.AmmoCache["alyxgun"] = 24 -- Not used.
GM.AmmoCache["pistol"] = 12 -- Pistols.
GM.AmmoCache["smg1"] = 30 -- SMG's and some rifles.
GM.AmmoCache["357"] = 6 -- Rifles, especially of the sniper variety.
GM.AmmoCache["xbowbolt"] = 4 -- Crossbows
GM.AmmoCache["buckshot"] = 8 -- Shotguns
GM.AmmoCache["ar2altfire"] = 1 -- Not used.
GM.AmmoCache["slam"] = 1 -- Force Field Emitters.
GM.AmmoCache["rpg_round"] = 1 -- Not used. Rockets?
GM.AmmoCache["smg1_grenade"] = 1 -- Not used.
GM.AmmoCache["sniperround"] = 1 -- Barricade Kit
GM.AmmoCache["sniperpenetratedround"] = 1 -- Remote Det pack.
GM.AmmoCache["grenade"] = 1 -- Grenades.
GM.AmmoCache["thumper"] = 1 -- Gun turret.
GM.AmmoCache["gravity"] = 1 -- Unused.
GM.AmmoCache["battery"] = 30 -- Used with the Medical Kit.
GM.AmmoCache["gaussenergy"] = 1 -- Nails used with the Carpenter's Hammer.
GM.AmmoCache["combinecannon"] = 1 -- Not used.
GM.AmmoCache["airboatgun"] = 1 -- Arsenal crates.
GM.AmmoCache["striderminigun"] = 1 -- Message beacons.
GM.AmmoCache["helicoptergun"] = 1 --Resupply boxes.
GM.AmmoCache["spotlamp"] = 1
GM.AmmoCache["manhack"] = 1
GM.AmmoCache["pulse"] = 30
-- These ammo types are available at ammunition boxes.
-- The amount is the ammo to give them.
-- If the player isn't holding a weapon that uses one of these then they will get smg1 ammo.
GM.AmmoResupply = {}
GM.AmmoResupply["ar2"] = 20
GM.AmmoResupply["alyxgun"] = GM.AmmoCache["alyxgun"]
GM.AmmoResupply["pistol"] = GM.AmmoCache["pistol"]
GM.AmmoResupply["smg1"] = 20
GM.AmmoResupply["357"] = GM.AmmoCache["357"]
GM.AmmoResupply["xbowbolt"] = GM.AmmoCache["xbowbolt"]
GM.AmmoResupply["buckshot"] = GM.AmmoCache["buckshot"]
GM.AmmoResupply["battery"] = 20
GM.AmmoResupply["pulse"] = GM.AmmoCache["pulse"]
-----------
-- Worth --
-----------
GM:AddStartingItem("p226", "'Covert' P226", nil, ITEMCAT_GUNS, 35, "fas2_p226")
GM:AddStartingItem("ots33", "'Stalker' OTS-33 Pernach", nil, ITEMCAT_GUNS, 35, "fas2_ots33")
GM:AddStartingItem("mp5k", "'Rusher' MP5K", nil, ITEMCAT_GUNS, 40, "fas2_mp5k")
GM:AddStartingItem("famas", "'Tactical' Famas F1", nil, ITEMCAT_GUNS, 40, "fas2_famas")
GM:AddStartingItem("m4", "'Classic Army' M4A1", nil, ITEMCAT_GUNS, 45, "fas2_m4a1")
GM:AddStartingItem("rem870", "'Owens' Remington 870", nil, ITEMCAT_GUNS, 45, "fas2_rem870")
GM:AddStartingItem("k98", "'Mauser' Kar98K", nil, ITEMCAT_GUNS, 50, "ww_k98")
GM:AddStartingItem("2pcp", "3 pistol ammo boxes", nil, ITEMCAT_AMMO, 15, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["pistol"] or 12) * 3, "pistol", true) end, "models/Items/BoxSRounds.mdl")
GM:AddStartingItem("2sgcp", "3 shotgun ammo boxes", nil, ITEMCAT_AMMO, 15, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["buckshot"] or 8) * 3, "buckshot", true) end, "models/Items/BoxBuckshot.mdl")
GM:AddStartingItem("2smgcp", "3 SMG ammo boxes", nil, ITEMCAT_AMMO, 15, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["smg1"] or 30) * 3, "smg1", true) end, "models/Items/BoxMRounds.mdl")
GM:AddStartingItem("2arcp", "3 assault rifle ammo boxes", nil, ITEMCAT_AMMO, 15, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["ar2"] or 30) * 3, "ar2", true) end, "models/Items/357ammobox.mdl")
GM:AddStartingItem("2rcp", "3 rifle ammo boxes", nil, ITEMCAT_AMMO, 15, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["357"] or 6) * 3, "357", true) end, "models/Items/BoxSniperRounds.mdl")
GM:AddStartingItem("2pls", "3 pulse ammo boxes", nil, ITEMCAT_AMMO, 20, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["pulse"] or 30) * 3, "pulse", true) end, "models/Items/combine_rifle_ammo01.mdl")
GM:AddStartingItem("3pcp", "5 pistol ammo boxes", nil, ITEMCAT_AMMO, 20, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["pistol"] or 12) * 5, "pistol", true) end, "models/Items/BoxSRounds.mdl")
GM:AddStartingItem("3sgcp", "5 shotgun ammo boxes", nil, ITEMCAT_AMMO, 20, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["buckshot"] or 8) * 5, "buckshot", true) end, "models/Items/BoxBuckshot.mdl")
GM:AddStartingItem("3smgcp", "5 SMG ammo boxes", nil, ITEMCAT_AMMO, 20, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["smg1"] or 30) * 5, "smg1", true) end, "models/Items/BoxMRounds.mdl")
GM:AddStartingItem("3arcp", "5 assault rifle ammo boxes", nil, ITEMCAT_AMMO, 20, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["ar2"] or 30) * 5, "ar2", true) end, "models/Items/357ammobox.mdl")
GM:AddStartingItem("3rcp", "5 rifle ammo boxes", nil, ITEMCAT_AMMO, 20, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["357"] or 6) * 5, "357", true) end, "models/Items/BoxSniperRounds.mdl")
GM:AddStartingItem("3pls", "5 pulse ammo boxes", nil, ITEMCAT_AMMO, 20, nil, function(pl) pl:GiveAmmo((GAMEMODE.AmmoCache["pulse"] o
is this the only thing you touched? what lines did you modify in the file?
Sorry, you need to Log In to post a reply to this thread.