//info.txt "Gamemode" { "name" "Chrispin'sMod" "version" "0.01" "author_name" "Chrispin" "author_email" "redfaction@cox.net" "info" "This mod has no real aim or goal yet." "hide" "0" "up_date" "3/6/07" } //cl_init.lua /*------------------------------------------- Chrispin'sMod by Chrispin ---------------------------------------------*/ include( 'shared.lua' ) //init.lua /*------------------------------------- Chrispin'sMod ---------------------------------------*/ AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include( 'shared.lua' ) include( 'teams.lua' ) function GM:PlayerInitialSpawn( ply ) timer.Create("InitialMessageAndSong", 2, 0, MessageAndSong, ply ) //to make sure that the song doesnt sound laggish end //hook.Add( "PlayerInitialSpawn", "playerInitialSpawn", FirstSpawn ); no need for this if you name the function GM:PlayerInitialSpawn function MessageAndSong(ply) //function that the timer runs once two seconds after the initial spawn of a player ply:ConCommand( "play cm/Hell_March_2" ) ply:PrintMessage(HUD_PRINTCENTER,"Chrispin'sMod v0.01") end function GM:PlayerLoadout( pl ) pl:GiveAmmo( 9,"grenade",true ) pl:Give( "weapon_stunstick" ) pl:Give( "weapon_frag" ) pl:Give( "weapon_physcannon" ) end //shared.lua /*------------------------------------ Chrispin'sMod by Chrispin -------------------------------------*/ GM.Name = "Chrispin'sMod" GM.Author = "Chrispin" GM.Email = "redfaction@cox.net" GM.Website = "" //teams.lua //This will create the teams. //team: (number, name, Color (r, g, b, a)) team.SetUp (1, "Red", Color(255, 0, 0, 255)) team.SetUp (2, "Blue", Color(0, 0, 255, 255)) function GM:PlayerSpawn(ply) if table.Count(team.GetPlayers(1)) < table.Count(team.GetPlayers(2)) then ply.SetTeam(1) elseif table.Count(team.GetPlayers(2)) < table.Count(team.GetPlayers(1)) then ply.SetTeam(2) else local i = math.random(0,1) if i == 0 then ply:SetTeam(1) else ply:SetTeam(2) end end end //cm_funtest.res "resources" { "sound/cm/Hell_March_2.mp3" "file" }