• Need help with Game mode!
    5 replies, posted
I want to make a game mode for gmod and im all done with the basic scripting, but the game mode does not appear in the drop-down menu in-game D: shared.lua : GM.Name = "Strategical_Assault" GM.Author = "sup3rt0aster" GM.Email = "Please leave all feedback on my youtube vid for this game mode" GM.Website = "http://www.youtube.com/sup3rt0aster" DeriveGamemode( "sandbox" ) team.SetUp( 1, "Red Team", Color( 255, 0, 0, 255 ) ) //Red Team team.SetUp( 2, "Blue Team", Color( 0, 0, 255, 255 ) ) //Blue Team team.SetUp( 3, "Green Team", Color( 0, 255, 0, 255 ) ) //Green Team team.SetUp( 4, "Joining", Color( 0, 0 , 0, 255 ) ) //Joining cl_init.lua: include( 'shared.lua' ) function set_team() Ready = vgui.Create( "DFrame" ) Ready:SetPos( ScrW() / 2, ScrH() / 2 ) Ready:SetSize( 175, 75 ) Ready:SetTitle( "LOLOLOLOLOL" ) Ready:SetVisible( true ) Ready:SetDraggable( false ) Ready:ShowCloseButton( false ) Ready:MakePopup() ready1 = vgui.Create( "DButton", Ready ) ready1:SetPos( 20, 25 ) ready1:SetSize( 140, 40 ) ready1:SetText( "LOLOL" ) ready1.DoClick = function() RunConsoleCommand( "sb_team1" ) end end concommand.Add( "sb_start", set_team ) init.lua: AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) AddCSLuaFile( "specialchars.lua" ) include( 'shared.lua' ) include( 'specialchars.lua' ) function GM:PlayerSpawn( ply ) self.BaseClass:PlayerSpawn( ply ) ply:SetGravity ( 1 ) ply:SetMaxHealth( 100, true ) ply:SetWalkSpeed( 325 ) ply:SetRunSpeed ( 325 ) end function GM:PlayerInitialSpawn( ply ) CheckSpecialCharacters( ply ) if ply:IsAdmin() then sb_team2( ply ) joining( ply ) RunConsoleCommand( "sb_start" ) end //Close the if end //close the function function GM:PlayerLoadout( ply ) if ply:Team() == 1 then ply:Give( "weapon_physgun" ) ply:Give( "gmod_tool" ) elseif ply:Team() == 2 then ply:Give( "weapon_physgun" ) ply:Give( "weapon_ar2" ) ply:Give( "gmod_tool" ) end end function sb_team1( ply ) ply:UnSpectate() ply:SetTeam( 1 ) ply:Spawn() ply:PrintMessage( HUD_PRINTTALK, "[Strategical Assault]Welcome to the server, " .. ply:Nick() ) end //End the function. function sb_team2( ply ) ply:SetTeam( 2 ) ply:Spawn() ply:PrintMessage( HUD_PRINTTALK, "[Strategical Assault]I recognize you as an admin, " .. ply:Nick() ) end concommand.Add( "sb_team1", sb_team1 ) function joining( ply ) ply:Spectate( 5 ) ply:SetTeam( 4 ) end //End the function
What about the info.txt?
[QUOTE=Zaubermuffin;29592609]What about the info.txt?[/QUOTE] aah.. forgot about that, typical me xD.. thnx man:D
[QUOTE=sup3rt0aster;29592133]:words:[/QUOTE] What is this... There are lua tags for a reason.
If its a warfare, Why is it derrived from Sandbox?
[QUOTE=tazy4tazy;30457200]If its a warfare, Why is it derrived from Sandbox?[/QUOTE] Maybe he's trying to make something like the STRONGHOLD gamemode where you build a base then fight.
Sorry, you need to Log In to post a reply to this thread.