I have a gamemode, and I have player classes, but I have no idea how to make them be called and set from a derma menu in the gamemode cl_init.
I tried the wiki but it didn’t really help that much.
This is what I’m calling in the client file:
[lua]
bluClass = vgui.Create( “DButton” )
bluClass:SetText( “Medic: M416” )
bluClass.DoClick = function()
surface.PlaySound( “jessev92/bf2/menu/kitSelect.wav” )
player_manager.SetPlayerClass( ply, “soldier_medic_416” )
frame:Close()
end
CategoryList:AddItem( bluClass ) [/lua]
Is there a reason it isn’t working? I get no errors or things telling me it isn’t working.