Guest User

Untitled

a guest
Jun 25th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. -- base_shutdown.lua
  2.  
  3. -----------------------------------------------------------------------------
  4. -- includes
  5. -----------------------------------------------------------------------------
  6. IncludeScript("base");
  7. IncludeScript("base_ctf");
  8. IncludeScript("base_teamplay");
  9.  
  10. -----------------------------------------------------------------------------
  11. -- global overrides
  12. -----------------------------------------------------------------------------
  13. POINTS_PER_CAPTURE = 10;
  14.  
  15. -----------------------------------------------------------------------------
  16. -- startup
  17. -----------------------------------------------------------------------------
  18. function startup()
  19.  
  20. SetGameDescription( "Capture the Flag" )
  21.  
  22. -- set up team limits on each team
  23. SetPlayerLimit(Team.kBlue, 0)
  24. SetPlayerLimit(Team.kRed, 0)
  25. SetPlayerLimit(Team.kYellow, -1)
  26. SetPlayerLimit(Team.kGreen, -1)
  27.  
  28. -- CTF maps generally don't have civilians,
  29. -- so override in map LUA file if you want 'em
  30. local team = GetTeam(Team.kBlue)
  31. team:SetClassLimit(Player.kCivilian, -1)
  32.  
  33. team = GetTeam(Team.kRed)
  34. team:SetClassLimit(Player.kCivilian, -1)
  35.  
  36. end
  37.  
  38. -----------------------------------------------------------------------------
  39. -- Hurts
  40. -----------------------------------------------------------------------------
  41.  
  42.  
  43. ------------------------------------------------------My lua below
  44. --IncludeScript("base_shutdown");
  45.  
  46.  
  47. -----------------------------------------------------------------------------
  48. -- Resupply and Bags
  49. -----------------------------------------------------------------------------
  50.  
  51. aardvarkresup = trigger_ff_script:new({ team = Team.kUnassigned })
  52. function aardvarkresup:ontouch( touch_entity )
  53. if IsPlayer( touch_entity ) then
  54. local player = CastToPlayer( touch_entity )
  55. if player:GetTeamId() == self.team then
  56. player:AddHealth( 400 )
  57. player:AddArmor( 400 )
  58. player:AddAmmo( Ammo.kNails, 400 )
  59. player:AddAmmo( Ammo.kShells, 400 )
  60. player:AddAmmo( Ammo.kRockets, 400 )
  61. player:AddAmmo( Ammo.kCells, 400 )
  62. end
  63. end
  64. end
  65.  
  66.  
  67.  
  68. blue_supply = aardvarkresup:new({ team = Team.kBlue })
  69. red_supply = aardvarkresup:new({ team = Team.kRed })
Add Comment
Please, Sign In to add comment