not setting class/loadout

So i am trying to make it so when on initial join it sets to a specific class and that class with a basic loadout. Whenever I load in although, The class does not set that or the loadout is not working. I am clueless what to do.




PlayerSpawn calls PlayerSetModel and PlayerLoadout. If they’re not being called, chances are your baseclass call isn’t working as intended. To use it, you may need to use Derive GameMode / Base-Class…

so i gotta add or remove a line where and wat?

[editline]13th July 2014[/editline]

tried removing derived gamemode line, no change, readded

[editline]13th July 2014[/editline]

moved “if ply” lines from player loadout to player spawn, tested with and without derivegamemode line, no change

If the base call is working, it may be calling GM:Loadout, etc from the base gm directory.

Add this to your spawn:

	hook.Call( "PlayerSetModel", GAMEMODE, ply );
	hook.Call( "PlayerLoadout", GAMEMODE, ply );

a little more explanation on where and specifically what that hook does would be useful, sorry im still kinda new so every bit of knowledge is a great blessing.

If you overwrite function GM:PlayerSpawn( ply ), you’d add those 2 lines somewhere in the overwritten function towards the bottom.