Is there a way to alter the set of weapons I spawn with? For example, I've no need for the crossbow, or the generic pistol, machine gun, or revolver; I'd rather spawn with some Sweps I have installed, such as one or two CSS weapons, or this laser gun.
Annoyingly yours,
Devavres
You would have to edit the Lua files in the gamemode you play in, headover to the Lua forum and ask about there my friend.
gamemodes\sandbox\gamemode\init.lua
It has
pl:Give( "weapon_crowbar" )
pl:Give( "weapon_pistol" )
pl:Give( "weapon_smg1" )
pl:Give( "weapon_frag" )
pl:Give( "weapon_physcannon" )
pl:Give( "weapon_crossbow" )
pl:Give( "weapon_shotgun" )
pl:Give( "weapon_357" )
pl:Give( "weapon_rpg" )
pl:Give( "weapon_ar2" )
Edit, add or remove lines you require.
Hey thanks for that, could help a lot of people ;)
Thank you; now my only question is, how do I find out the name of each weapon? Would it be the names in the info.txt?
If it's for your sweps, go to the sweps folder and the folder name is generally the command name for the swep.
And for the in-built CS:S weapons, mouse over them in the swep menu and I think it gives you the filename.
I may be wrong though
I'm gonna make a thread in Lau scripting; I must be doing something wrong because every time I change the init.lua file, it'll revert back to its original setting once I launch gmod.
Thank you for all the help though.
Sorry, you need to Log In to post a reply to this thread.