Fretta - Global and Local Loadouts

Simply put, I want to give everyone certain weapons and then give individual classes specific weapons. For example, in my base class loadout I give everyone a crowbar. However, when you define individual class loadouts, it overrides the base, so I’m forced to copy and paste for every class. Anyone know what’s wrong?

I’m not sure how fretta classes work, but In your derived class you could try:
[lua]function CLASS:Loadout( ply )
ply:Give( “weapons” )
ply:GiveAmmo( 100, “ammos” )

self.BaseClass.Loadout( self, ply )


I don’t know the fretta layout, but if you use GM:PlayerLoadout( ply ) in fretta you could just do:

function GM:PlayerLoadout( ply )
	ply:Give( "weapon_crowbar" )

	if classcheck here then
		give whatever here
	elseif classcheck2 here then
		give whatever here

Emperus, I’m trying to keep it to the class files to keep the code neat and tidy (and easy to change).

NullPoint, interesting idea, let me try it real quick.

AHA! It works! Thanks very much.

No Problem. :smile: