Guest User

Untitled

a guest
Jan 13th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.19 KB | None | 0 0
  1. -- This addon is made by Black Tea a.k.a rebel1324 in FP.
  2.  
  3. MAX_ROUNDS = 3
  4.  
  5. local CurRound = 0;
  6.  
  7. function ROUND_REACHED()
  8.     -- Add some event when Current Round Reach the Max Rounds.
  9.     -- If you have map vote thing, add it.
  10.     -- If you need to change specific map, just add here.
  11.     ROUND_MESSEGE( "Max Round reached. Calling Round End Event." )
  12. end
  13.  
  14. function ROUND_MULTIPLAYER()
  15.     if (#player.GetAll() == 2) then
  16.         ROUND_MESSEGE( "Starting New Round in few seconds." )
  17.          
  18.         timer.Simple(8, function()
  19.             ROUND_RESTART();
  20.         end);
  21.     end;
  22. end
  23. --hook.Add("PlayerInitialSpawn", "ROUND_MP", ROUND_MULTIPLAYER)
  24.  
  25. function ROUND_END()
  26.     ROUND_MESSEGE( "New round starting. Prepare." )
  27.     timer.Simple(5,ROUND_RESTART)
  28.    
  29. end
  30.  
  31. function ROUND_RESTART()
  32.     -- Add some event when new round start.
  33.      
  34.     for k, v in ipairs(player.GetAll()) do
  35.        v:Spawn()
  36.     end;
  37.      
  38.     if (MAX_ROUNDS == CurRound) then
  39.         ROUND_REACHED()
  40.     end;
  41.      
  42.     CurRound  = CurRound + 1;
  43. end
  44.  
  45. function ROUND_MESSEGE( say )
  46.     for k, v in ipairs(player.GetAll()) do
  47.        v:PrintMessage(HUD_PRINTTALK, tostring(say));
  48.     end;
  49. end
Add Comment
Please, Sign In to add comment