• Change Spawn Weapons
    4 replies, posted
So I just downloaded the Mad Cows 3.0 Beta SWEP base and found that I liked the weapons they included in that a lot more than the standard HL2 weapons (they have better animations and ironsights), and was wondering how I could change it so I would respawn with those instead. I think I read a way to do it on a map-by-map basis but I forgot how. Also if you know of a way to have it do that across all maps would be even better. Any help is appreciated.
I have a very related problem, so I'll post it here. I used to know a tiny bit about lua etc. but I've forgotten a lot, so bare with me. I was trying to figure out how to do this as well, with a different goal, but essentially the same as what OP is trying to do. I remember modifying gamemodes\sandbox\gamemode\init.lua to do it, simply modifying some function or something with "loadout" in the name. My problem with this is, I cannot for the love of me find init.lua for the sandbox gamemode. And the thing is, I've done it before a few years ago. [IMG]http://i26.tinypic.com/2lowsp.jpg[/IMG] I'm assuming with updates etc. it has changed, so if anyone experienced can help out it would be great.
[QUOTE=Northern Petrol;23591518]My problem with this is, I cannot for the love of me find init.lua for the sandbox gamemode. And the thing is, I've done it before a few years ago. [/QUOTE] It's in the .gcf, you can browse it [url=http://luabin.overvprojects.nl/?path=/gamemodes/sandbox/gamemode/init.lua]here[/url].
I'm assuming it's just like any custom content, and if I paste it in its folder manually it will take priority over the .gcf one right?
In shared.lua do... [QUOTE] function GM:PlayerLoadout( ply ) local weapons={} weapons[1]="weapon_smg1" weapons[2]="weapon_357" /* Change the weapons names to whatever you want and add more by adding additional fields to the table by weapons[3]=.... ect */ for k,v in pairs(weapons) do ply:Give( v ) end end [/QUOTE] This should work for you just fine.
Sorry, you need to Log In to post a reply to this thread.