How can i make a script that force a spectator to spawn in the server by Lua code?
Like first, setplayers team = Random(1,2)
Then spawn the player...
addhook("join","onJoin") function onJoin(id) 	if (math.random(0,2) >= 1) 		parse('maket '..id) 	else 		parse('makect '..id) 	end end
addhook("join", "_join") function _join(id) 	-- forceRandomTeamRespawn when they join the server 	forceRandomTeamRespawn(id) end addhook("team", "teamselect") function teamselect(id, team) 	if team == 0 then -- if they join spec, forceRandomTeamRespawn then 		forceRandomTeamRespawn(id) 	end end function forceRandomTeamRespawn(id) 	-- have them join a random team 	local team = math.random(1,2) 	if team == 1 then 		parse('maket '..id) 	else 		parse('makect '..id) 	end 	-- spawn them 	parse('spawnplayer '..id) end