Okay maybe someone could help me here, I am trying to assign my player classes for my gamemode and as far as I know I set up my player classes correctly. But how do I assign them and where do I assign them? I have tried many different ways in shared.lua and init.lua but none have worked so far.
So far no errors have showed up concerning the classes when I tried assigning then but the player just doesn't have any of the class' elements.
:L Can anyone help?
I do it in PlayerInitialSpawn and PlayerSpawn. Probably not the best way but hey it works.
Like so:
[code]
function GM:PlayerInitialSpawn( ply )
ply:SetTeam(1)
player_manager.SetPlayerClass(ply, "player_abyssrp")
end
function GM:PlayerSpawn( ply )
player_manager.SetPlayerClass(ply, "player_abyssrp")
self.BaseClass.BaseClass.PlayerSpawn(self,ply) -- This calls base gamemode PlayerSpawn since I derive from Sandbox
end
[/code]
Obviously replace player_abyssrp with your own playerclass.
Sorry, you need to Log In to post a reply to this thread.