Giving a player a swep in my Gamemode?

Hi, I don’t really do a lot of game mode stuff and im stuck on how i give my player a lua swep i coded? any ideas?

(User was banned for this post ("Wrong section" - mahalis))

here’s a good way to get started, I suppose.

Download Laserdance or a gamemode that makes you start with a certain custom SWEP.

Study it.

All I can say for now, being the crappy Lua coder I am

in class_defult under Player_class have this:

[lua]function CLASS:Loadout( pl )

pl:Give( "(your weapons folder name)" )


Thank, now to work on Visual Effects :wink:

I don’t see him saying he’s using Fretta, so I’ll just leave this here too.

function GM:PlayerLoadout(ply)
ply:Give(“Your weapons folder name”)

This gamemode function handles what weapons players get after spawning, and you can also add checks (ply:IsAdmin()) to see if a player is admin, so you can make admin only weapons.