• Not showing weapons.
    0 replies, posted
I have a good gamemode going here with classes and rounds. but the problem is that when i have rounds the weapons are gone like the gamemode cant read the class files and without rounds i cant spawn. anyone help please? heres the shared.lua [code] /* shared.lua - Shared Component ----------------------------------------------------- This is the shared component of your gamemode, a lot of the game variables can be changed from here. */ include( "player_class.lua" ) include( "player_extension.lua" ) include( "class_default.lua" ) include( "player_colours.lua" ) fretta_voting = CreateConVar( "fretta_voting", "1", { FCVAR_REPLICATED, FCVAR_NOTIFY, FCVAR_ARCHIVE } ) GM.Name = "Future Wars" GM.Author = "EvilElmo and Agent Weenis" GM.Email = "skeletonsrfail@hotmail.com" GM.Website = "none" GM.Help = "No Help Available" DeriveGamemode( "fretta" ) IncludePlayerClasses() GM.TeamBased = true // Team based game or a Free For All game? GM.AllowAutoTeam = true // Allow auto-assign? GM.AllowSpectating = true // Allow people to spectate during the game? GM.SecondsBetweenTeamSwitches = 10 // The minimum time between each team change? GM.GameLength = 60 // The overall length of the game GM.RoundLimit = 4 // Maximum amount of rounds to be played in round based games GM.VotingDelay = 5 // Delay between end of game, and vote. if you want to display any extra screens before the vote pops up GM.NoPlayerSuicide = true // Set to true if players should not be allowed to commit suicide. GM.NoPlayerDamage = false // Set to true if players should not be able to damage each other. GM.NoPlayerSelfDamage = false // Allow players to hurt themselves? GM.NoPlayerTeamDamage = false // Allow team-members to hurt each other? GM.NoPlayerPlayerDamage = true // Allow players to hurt each other? GM.NoNonPlayerPlayerDamage = false // Allow damage from non players (physics, fire etc) GM.NoPlayerFootsteps = false // When true, all players have silent footsteps GM.PlayerCanNoClip = false // When true, players can use noclip without sv_cheats GM.TakeFragOnSuicide = true // -1 frag on suicide GM.MaximumDeathLength = 0 // Player will repspawn if death length > this (can be 0 to disable) GM.MinimumDeathLength = 20 // Player has to be dead for at least this long GM.AutomaticTeamBalance = true // Teams will be periodically balanced GM.ForceJoinBalancedTeams = true // Players won't be allowed to join a team if it has more players than another team GM.RealisticFallDamage = false // Set to true if you want realistic fall damage instead of the fix 10 damage. GM.AddFragsToTeamScore = true // Adds player's individual kills to team score (must be team based) GM.NoAutomaticSpawning = true // Players don't spawn automatically when they die, some other system spawns them GM.RoundBased = true // Round based, like CS GM.RoundLength = 300 // Round length, in seconds GM.RoundPreStartTime = 3 // Preperation time before a round starts GM.RoundPostLength = 8 // Seconds to show the 'x team won!' screen at the end of a round GM.RoundEndsWhenOneTeamAlive = true // CS Style rules GM.SelectClass = true // Allow players to select classes GM.EnableFreezeCam = true // TF2 Style Freezecam GM.DeathLingerTime = 4 // The time between you dying and it going into spectator mode, 0 disables GM.SelectModel = true // Can players use the playermodel picker in the F1 menu? GM.SelectColor = false // Can players modify the colour of their name? (ie.. no teams) GM.PlayerRingSize = 48 // How big are the colored rings under the player's feet (if they are enabled) ? GM.HudSkin = "SimpleSkin" // The Derma skin to use for the HUD components GM.SuicideString = "died" // The string to append to the player's name when they commit suicide. GM.DeathNoticeDefaultColor = Color( 255, 128, 0 ); // Default colour for entity kills GM.DeathNoticeTextColor = color_white; // colour for text ie. "died", "killed" GM.ValidSpectatorModes = { OBS_MODE_CHASE, OBS_MODE_IN_EYE, OBS_MODE_ROAMING } // The spectator modes that are allowed GM.ValidSpectatorEntities = { "player" } // Entities we can spectate, players being the obvious default choice. GM.CanOnlySpectateOwnTeam = true; // you can only spectate players on your own team DeriveGamemode( "fretta" ) TEAM_BLUE = 1 TEAM_RED = 2 /*--------------------------------------------------------- Name: gamemode:CreateTeams() Desc: Set up all your teams here. Note - HAS to be shared. ---------------------------------------------------------*/ function GM:CreateTeams() if ( !GAMEMODE.TeamBased ) then return end team.SetUp( TEAM_BLUE, "Blue Team", Color( 80, 150, 255 ) ) team.SetSpawnPoint( TEAM_BLUE, { "info_player_start" } ) team.SetClass( TEAM_BLUE, { "Soldier", "Scout", "Demo", "Sniper" } ) team.SetUp( TEAM_RED, "Red Team", Color( 255, 80, 80 ) ) team.SetSpawnPoint( TEAM_RED, { "info_player_start" } ) team.SetClass( TEAM_RED, { "Soldier", "Scout", "Demo", "Sniper" } ) team.SetUp( TEAM_SPECTATOR, "Spectators", Color( 200, 200, 200 ), true ) team.SetSpawnPoint( TEAM_SPECTATOR, "info_player_start" ) team.SetClass( TEAM_SPECTATOR, { "Spectator" } ) end function GM:InGamemodeVote() return GetGlobalBool( "InGamemodeVote", false ) end /*--------------------------------------------------------- Name: gamemode:TeamHasEnoughPlayers( Number teamid ) Desc: Return true if the team has too many players. Useful for when forced auto-assign is on. ---------------------------------------------------------*/ function GM:TeamHasEnoughPlayers( teamid ) local PlayerCount = team.NumPlayers( teamid ) // Don't let them join a team if it has more players than another team if ( GAMEMODE.ForceJoinBalancedTeams ) then for id, tm in pairs( team.GetAllTeams() ) do if ( id > 0 && id < 1000 && team.NumPlayers( id ) < PlayerCount && team.Joinable(id) ) then return true end end end return false end /*--------------------------------------------------------- Name: gamemode:PlayerCanJoinTeam( Player ply, Number teamid ) Desc: Are we allowed to join a team? Return true if so. ---------------------------------------------------------*/ function GM:PlayerCanJoinTeam( ply, teamid ) if ( SERVER && !self.BaseClass:PlayerCanJoinTeam( ply, teamid ) ) then return false end if ( GAMEMODE:TeamHasEnoughPlayers( teamid ) ) then ply:ChatPrint( "That team is full!" ) return false end return true end /*--------------------------------------------------------- Name: gamemode:Move( Player ply, CMoveData mv ) Desc: Setup Move, this also calls the player's class move function. ---------------------------------------------------------*/ function GM:Move( ply, mv ) if ( ply:CallClassFunction( "Move", mv ) ) then return true end end /*--------------------------------------------------------- Name: gamemode:KeyPress( Player ply, Number key ) Desc: Player presses a key, this also calls the player's class OnKeyPress function. ---------------------------------------------------------*/ function GM:KeyPress( ply, key ) if ( ply:CallClassFunction( "OnKeyPress", key ) ) then return true end end /*--------------------------------------------------------- Name: gamemode:KeyRelease( Player ply, Number key ) Desc: Player releases a key, this also calls the player's class OnKeyRelease function. ---------------------------------------------------------*/ function GM:KeyRelease( ply, key ) if ( ply:CallClassFunction( "OnKeyRelease", key ) ) then return true end end /*--------------------------------------------------------- Name: gamemode:PlayerFootstep( Player ply, Vector pos, Number foot, String sound, Float volume, CReceipientFilter rf ) Desc: Player's feet makes a sound, this also calls the player's class Footstep function. If you want to disable all footsteps set GM.NoPlayerFootste
Sorry, you need to Log In to post a reply to this thread.