diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-30 14:42:09 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-30 14:42:09 -0400 |
| commit | 2736f498f30220b858fc6fac23e7ddc4a597df6d (patch) | |
| tree | 374ceadedb654b00e09dac321620a8320830f734 /gamemode/events/supply_crate.lua | |
| download | redead-2736f498f30220b858fc6fac23e7ddc4a597df6d.tar.gz redead-2736f498f30220b858fc6fac23e7ddc4a597df6d.tar.bz2 redead-2736f498f30220b858fc6fac23e7ddc4a597df6d.zip | |
Inital commit
Diffstat (limited to 'gamemode/events/supply_crate.lua')
| -rw-r--r-- | gamemode/events/supply_crate.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gamemode/events/supply_crate.lua b/gamemode/events/supply_crate.lua new file mode 100644 index 0000000..35ca974 --- /dev/null +++ b/gamemode/events/supply_crate.lua @@ -0,0 +1,40 @@ + +local EVENT = {} + +EVENT.Chance = 0.95 +EVENT.Type = EVENT_BONUS + +function EVENT:Start() + + local spawns = ents.FindByClass( "info_lootspawn" ) + local loot = table.Random( spawns ) + + if not IsValid( loot ) then MsgN( "ERROR: Unable to locate loot spawns. Map not configured?" ) return end + + local ent = ents.Create( "sent_bonuscrate" ) + ent:SetPos( loot:GetPos() + Vector(0,0,10) ) + ent:Spawn() + + for k,v in pairs( team.GetPlayers( TEAM_ARMY ) ) do + + v:Notice( "Keep an eye out for a civilian weapon cache", GAMEMODE.Colors.White, 5 ) + + end + +end + +function EVENT:Think() + +end + +function EVENT:EndThink() + + return true // true ends this immediately + +end + +function EVENT:End() + +end + +event.Register( EVENT ) |
