The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
timer fuck up
Posted by: Duno | January 10, 2011 @ 7:53pm
Lua Code
[
Download
]
local DRoundTimerLength = 720 --how long the round will be in seconds local forttimenum = 10 local phase1 = 60 local phase2 = 120 local phase3 = 180 local phase4 = 240 local plys = player.GetAll( ) function GM:Think() if team.NumPlayers( 1 ) > 0 then RoundType = "players" else RoundType = "NoPlayers" end end function GM:Initialize() --player.GetAll():PrintMessage( HUD_PRINTTALK, "Build a fort." ) timer.Create("phase1", 10, 1, PhaseI) end function PhaseI() --player.GetAll():PrintMessage( HUD_PRINTTALK, "Phase one, 5 manhacks. Two realesed every second." ) timer.Create("phase2", 60, 1, PhaseII) ManhackSpawn( 2.5, .50 ) end function PhaseII() --player.GetAll():PrintMessage( HUD_PRINTTALK, "Phase two, 15 manhacks. Two realesed every second." ) timer.Create("phase3", 120, 1, PhaseIII) ManhackSpawn( 7.5, .50 ) end function PhaseIII() --player.GetAll():PrintMessage( HUD_PRINTTALK, "Phase two, 30 manhacks. Four realesed every second." ) timer.Create("phase4", 180, 1, PhaseIV) ManhackSpawn( 7.5, .50 ) end function PhaseIV() --player.GetAll():PrintMessage( HUD_PRINTTALK, "Phase two, 40 manhacks. Four realesed every second." ) ManhackSpawn( 10, .25 ) end function ManhackSpawn( count, interval) timer.Create("Manhackcount", interval, count, ManhackSpawn2) end function ManhackSpawn2() local SpawnPos = {} SpawnPos[1]= ents.FindByName("mha1")[1]:GetPos() SpawnPos[2]= ents.FindByName("mha2")[1]:GetPos() SpawnPos[3]= ents.FindByName("mha3")[1]:GetPos() SpawnPos[4]= ents.FindByName("mha4")[1]:GetPos() local tableRand = table.Random( SpawnPos ) local manhackent = ents.Create( "npc_manhack" ) manhackent:SetPos( tableRand ) manhackent:SetAngles( ents.FindByClass("info_player_start")[1]:GetAngles() ) manhackent:Spawn() end function DRoundType() Msg( RoundType ) end
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.35 / 8
74 Votes
http://codebin.yi.org/1054
page generated in 0.01 seconds