Open thewsmred opened 1 year ago
Survivor bots will get a random loadout like any other player that does not choose a loadout. This is done by ZS itself, so you need to modify the gamemode in some way. The logic that gives default or random loadouts starts here:
You could modify it directly, or you could add a hook to this GM event, see facepunch.com/gmod/hook.Add.
I can't test it right now, but a hook for this could look like this:
hook.Add("GiveDefaultOrRandomEquipment", "GiveSurvivorBotLoadout", function(pl)
if not pl:IsBot() then return end
if GAMEMODE.CheckedOut[pl:UniqueID()] then return end
GAMEMODE.CheckedOut[pl:UniqueID()] = true
pl:Give("weapon_zs_peashooter")
pl:GiveAmmo(50, "pistol")
end)
This should give any survivor bot a peashooter and 50 ammo at the start of the round.
Save this as ...\garrysmod\lua\autorun\server\custom_bot_loadout.lua
or something similar. (Or even better: Put it into your own custom addon.)
It's there a way to make survivors spawn with weapons?