Facebook
From DarkWolf, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 205
  1. #include <sourcemod>
  2. #include <sdkhooks>
  3. #include <colors>
  4.  
  5. public Plugin myinfo =
  6. {
  7.         name = "Reklamy na chat",
  8.         author = "DarkWolf",
  9.         description = "Reklamy na chat",
  10.         version = "1.0",
  11.         url = "https://steamcommunity.com/id/darkwolfart"
  12. };
  13.  
  14. #define MAX_PLAYERS 24 // maksymalna ilosc graczy na serwerze
  15. #define prefix "\x04INFO\x01"
  16.  
  17. int ReklamaInfoo[MAX_PLAYERS+1];
  18.  
  19. public void OnClientPutInServer(int client)
  20. {
  21.         ReklamaInfoo[client] = 0;
  22.         CreateTimer(5.0, ReklamaInfo, client, TIMER_FLAG_NO_MAPCHANGE);
  23. }
  24.  
  25. public Action ReklamaInfo(Handle timer, int client)
  26. {
  27.     if(!IsValidClient(client)) return;
  28.  
  29.     switch(ReklamaInfoo[client])
  30.     {
  31.         case 0:
  32.         {
  33.                 PrintToChat(client, " \x02=============================================== ", prefix);
  34.                         PrintToChat(client, " \x07Witaj na serwerze");
  35.                         PrintToChat(client, " Aktualnie jestes na serwerze \x04Only AWP");
  36.                         PrintToChat(client, " Zapisz sobie nasze IP: \x04145.239.21.248:27045");
  37.                         PrintToChat(client, " Zapraszamy także na nasze forum: \x04HardStrike.eu");
  38.                         PrintToChat(client, " \x07Życzymy miłej gry!");
  39.                         PrintToChat(client, " \x02=============================================== ", prefix);
  40.         }
  41.         case 1: PrintToChat(client, "[%s] Właścicielami serwera są: \x04ShOOO'xu; \x01& \x04WącKi ツ", prefix);
  42.                 case 2: PrintToChat(client, "[%s] Dodaj nasz serwer do ulubionych IP: \x04145.239.21.248:27045", prefix);
  43.                 case 3: PrintToChat(client, "[%s] Po grze zapraszamy na forum \x04HardStrike.eu", prefix);
  44.                 case 4: PrintToChat(client, "[%s] Jeżeli znalazłeś błąd zgłoś to na \x04forum!", prefix);
  45.                 case 5: PrintToChat(client, "[%s] Masz jakąś propozycje? Napisz ją na \x04forum!", prefix);
  46.                 case 6: PrintToChat(client, "[%s] Rekrutacja na administratora serwera jest \x04OTWARTA\x01!", prefix);
  47.                 case 7: PrintToChat(client, "[%s] Dołącz do naszej społeczności na steam, wpisz \x04!grupa", prefix);
  48.                 case 8: PrintToChat(client, "[%s] Na serwerze dostepny jest \x04VIP \x01możesz go kupić kontaktując się z administracją", prefix);
  49.                 case 9: PrintToChat(client, "[%s] Napisz \x04!funkcje \x01aby dowiedzieć się co posiada \x04VIP \x01,oraz gdzie można go kupić.", prefix);
  50.                 case 10: PrintToChat(client, "[%s] Regulamin serwera dostępny pod \x04!regulamin\x01", prefix);
  51.                 case 11: PrintToChat(client, "[%s] Jeżeli potrzebujesz pomocy odwiedz nasze forum: \x04HardStrike.eu", prefix);
  52.                 case 12: PrintToChat(client, "[%s] Kontakt z \x02wlascicielami\x01 pod \x04!shooox \x01i \x04!wacki", prefix);
  53.                 case 13: PrintToChat(client, "[%s] Aby ustawic sobie \x04range \x01użyj \x04!mm", prefix);
  54.                 case 14: PrintToChat(client, "[%s] Aby ustawic sobie \x04żeton \x01użyj \x04!coin", prefix);
  55.                 case 15: PrintToChat(client, "[%s] Na serwerze dostępne są \x04noże \x01pod \x04!knife", prefix);
  56.                 case 16: PrintToChat(client, "[%s] Na serwerze dostępne są \x04skiny \x01pod \x04!ws", prefix);
  57.                 case 17: PrintToChat(client, "[%s] Na serwerze dostępne są \x04rekawiczki \x01pod \x04!gloves", prefix);
  58.                 case 18: PrintToChat(client, "[%s] Na serwerze można \x04Betować\x01. Aby dowiedziec się więcej użyj \x04!betowanie", prefix);
  59.                 case 19: PrintToChat(client, "[%s] Aby sprawdzic wszystkie dostępne polecenia na serwerze użyj \x04!komendy", prefix);
  60.                 case 20: PrintToChat(client, "[%s] Zapraszamy na naszego sieciowego TS'a, IP: \x04ts3.hardstrike.eu", prefix);
  61.     }
  62.     ReklamaInfoo[client]++;
  63.     if(ReklamaInfoo[client] > 20) ReklamaInfoo[client] = 1;
  64.  
  65.     CreateTimer(16.0, ReklamaInfo, client, TIMER_FLAG_NO_MAPCHANGE);
  66. }
  67. public bool IsValidClient(int client)
  68. {
  69.         if(client >= 1 && client <= MaxClients && IsClientInGame(client))
  70.                 return true;
  71.  
  72.         return false;
  73. }