Advertisement
garfield

[COD]: Change new map width Timer

Apr 23rd, 2012
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.91 KB | None | 0 0
  1.  
  2. #define QuantosMapasTem   5 // mude
  3. new CurrentMap = QuantosMapasTem;
  4.  
  5.  
  6.  
  7. forward TrocarMapa(); public TrocarMapa()
  8. {
  9.     switch(CurrentMap)
  10.     {
  11.         case 0:
  12.         {
  13.             // Funções do mapa aqui
  14.            
  15.             SendRconCommand("mapname Mapa 01");
  16.         }
  17.         case 1:
  18.         {
  19.             // Funções do mapa aqui
  20.             SendRconCommand("mapname Mapa 02");
  21.         }
  22.         case 2:
  23.         {
  24.             // Funções do mapa aqui
  25.             SendRconCommand("mapname Mapa 03");
  26.         }
  27.         case 3:
  28.         {
  29.             // Funções do mapa aqui
  30.             SendRconCommand("mapname Mapa 04");
  31.         }
  32.         case 4:
  33.         {
  34.             // Funções do mapa aqui
  35.             SendRconCommand("mapname Mapa 05");
  36.         }
  37.     }
  38.     return CurrentMap = random(QuantosMapasTem);
  39. }
  40.  
  41.  
  42. // Caso queira chamar um Timer...
  43.  
  44. public OnGameModeInit()
  45. {
  46.     SetTimer("TrocarMapa", 6000 * 10, true); // mudar a cada 10 minutos.
  47.     return true;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement