I’m coding a basic gamemdoe for my own amusement, and I’ve been following a tutorial which has 3 teams, with a popup window to select team when a player joins. However, when I join my test server, I get the error “command team_menu” not found. If I then open console and enter “team_menu” (without quotes), it works the way it should. I’m not sure why the command isn’t initializing when the player joins, but it doesn’t work.
include( "shared.lua" ) function GM:PlayerInitialSpawn( ply ) ply:SetTeam( 1 ) concommand.Run( ply, "team_menu" ) end
include( "shared.lua" ) concommand.Add( "team_menu", function() --My code for the team chooser window end