All pastes #451318 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-21 12:25 UTC
rendered paste body
GM.Name 	= ""
GM.Author 	= ""
GM.Email 	= ""
GM.Website 	= ""


//team.SetUp(TEAM_ATTACKERS, "The Attackers", Color(0, 255, 0))
//team.SetUp(TEAM_DEFENDERS, "Defenders", Color(0, 160, 255))
teamspawn = "Build"

 function FirstSpawn( ply )
  if CLIENT then
 // if ply == LocalPlayer() then
	  ply.side = teamspawn
	  if teamspawn == "Defend" then
		teamspawn = "Attack"
	  else
		teamspawn = "Defend"
	  end
	  ply.money = 6000
	  ply:PrintMessage(HUD_PRINTCENTER,"Welcome to the server. Assigned to "..ply.side.."ers.");
  
// end
end
end
  
 hook.Add( "PlayerInitialSpawn", "playerInitialSpawn", FirstSpawn ); 


/*if CLIENT then
	Player = LocalPlayer()
	Player.side = "Defend"
	Player.money = 6000
end*/


function myhud() 
	if CLIENT then
		Player = LocalPlayer()
		draw.SimpleText(Player:Health() .. "%", "ScoreboardText", 50, 50, Color(19, 204, 204, 255), 0, 0)
		if !Player.money == nil then
			draw.SimpleText(Player.money .." $", "ScoreboardText", 50, 100, Color(255, 120, 120, 255), 0, 0)
	//	else
	//		Msg("Money is nil. Bitch to SSJokker about it.")
		end
		if !Player.side == nil then
			draw.SimpleText(Player.side .."er", "ScoreboardText", 50, 70, Color(10, 255, 255, 255), 0, 0) 
	//	else	Msg("No team selected. Bitch to SSJokker once more about it.")
		end
	end
   concommand.Add("DrawHud", myhud)
end
   hook.Add("HUDPaint", "myhud", myhud) 
   
 function hidehud(name)
  for k, v in pairs{"CHudHealth", "CHudBattery", "CHudAmmo", "CHudSecondaryAmmo"} do
  if name == v then return false
  end
  return true
 end

end
 hook.Add("HUDShouldDraw", "hidehud", hidehud) 



//SHARED.LUA ABOVE


DeriveGamemode( "sandbox" )
include( 'shared.lua' )

LocalPlayer().side = "Defend"
LocalPlayer().money = "6000"
// CL_INIT ABOVE