Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Lua by Neth ( 17 years ago )
INIT.LUA


AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )

include( 'shared.lua' )


// Serverside only stuff goes here

function GM:PlayerSpawn( ply )

 if ply:Team() == 1 then
 
 ply:SetMaxHealth ( 100, true )
 ply:SetModel( "models/player/citizen.mdl" )
 ply:Give ("Weapon_crowbar")
 ply:Spawn
 
 else if ply:Team() == 2 then

 ply:SetMaxHealth ( 125, true )
 ply:SetModel( "models/player/combine_e.mdl" )
 ply:Give ( "weapon_physcannon" )
 ply:Give ( "weapon_crowbar" )
 ply:Give ( "weapon_smg1" )
 ply:Spawn
 
  end
 end
end

function GM:PlayerSelectSpawn( ply )

 if ply:Team() == 1 then
  local Prisoners_spawns = ents.FindByClass( "info_player_counterterrorist" )
  local random = math.random(#Prisoners_spawns)
  Prisoners_spawns(random)


 else if ply:Team() == 2 then
  local Guards_spawns = ents.FindByClass( "info_player_terrorist" )
  local random = math.random(#Guards_spawns)
  Guards_spawns(random)
  
  end
 end
end

 

Revise this Paste

Children: 10611
Your Name: Code Language: