AddCSLuaFile( "cl_init.lua" ) //Tell the server that the client needs to download cl_init.lua
AddCSLuaFile( "shared.lua" ) //Tell the server that the client needs to download shared.lua
include( 'shared.lua' ) //Tell the server to load shared.lua
function GM:PlayerIntitialSpawn( ply )
ply:SetTeam( 1 ) //Join Team Spectators
ply:ConCommand( "ghidden_team" )
ply:ChatPrint( "[GHidden]Welcome to the Server, " .. ply:Nick() )
ply:CrosshairDisable()
end
function GM:PlayerLoadout( ply )
if ply:Team() == 1 then
ply:Spectate( 6 )
ply:SetMoveType( MOVETYPE_OBSERVER )
elseif ply:Team() == 2 then
//Weapons
ply:Give( "weapon_phycannon" )
ply:Give( "weapon_knife" )
//Ammo
//Model
ply:SetModel( "models/player/kleiner.mdl" )
ply:SetColor( 255, 255, 255, 22.5 )
//Data
ply:SetMaxHealth( 250 )
ply:SetHealth( 250 )
ply:SetArmor( 0 )
//Physics
ply:SetMoveSpeed( 350 )
ply:SetGravity( 0.75 )
ply:SetJumpPower( 320 )
ply:SetMoveType( MOVETYPE_WALK )
elseif ply:Team() == 3 then
//Weapons
ply:Give( "weapon_pistol" )
ply:Give( "weapon_357" )
ply:Give( "weapon_ar2" )
//Ammo
ply:GiveAmmo( 60, "pistol" )
ply:GiveAmmo( 12, "357" )
ply:GiveAmmo( 60, "ar2" )
//Model
ply:SetModel( "models/player/barney.mdl" )
//Data
ply:SetMaxHealth( 100 )
ply:SetArmor( 100 )
//Physics
ply:SetMoveSpeed( 250 )
ply:SetGravity( 1 )
ply:SetJumpPower( 160 )
ply:SetMoveType( MOVETYPE_WALK )
end
ply:Spawn()
end
// Custom Functions(Team)
function team_spec( ply )
ply:SetTeam( 1 )
ply:Kill()
ply:Spectate( 6 )
ply:SetMoveType( MOVETYPE_OBSERVER )
ply:ChatPrint( "Joined Team " .. Team.GetName( 3 ) )
ply:Spawn()
end
function team_playing( ply )
ply:SetTeam( 3 )
ply:Kill()
ply:ChatPrint( "" )
end
//ConCommands
concommand.Add( "ghidden_spectator", team_spec )
concommand.Add( "ghidden_hunter", team_playing )