PedoBear

amx_gag - play-arena.ro/forum - v3.0

Aug 14th, 2016
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 14.54 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <engine>
  4. #include <regex>
  5.  
  6. #define TAG                 "PLAY-ARENA"
  7. #define GAG_DEFAULT_TIME    5
  8. #define TASK                12830
  9. #define EXCLUDE_GAG         ADMIN_IMMUNITY
  10. #define G_A_G               60
  11.  
  12. // Regex
  13. #define REGEX_IP_PATTERN "\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b"
  14. #define IsIP(%1) (regex_match_c(%1, g_IP_pattern, g_regex_return) > 0)
  15. new Regex:g_IP_pattern
  16. new g_regex_return
  17.  
  18. new DataDir[64]
  19. new LogMsg[126]
  20. new LogAdminMsg[126]
  21.  
  22. new gagIp[512][32]
  23. new gagDetails[512][256]
  24. new gagPlayer[33]=false
  25.  
  26. /*********************/
  27. new gagMultiple=false
  28.  
  29. new const bChat [][] = {
  30. // Reclama
  31.     ":27015"    ,
  32.     "www."      ,
  33.  
  34.     ".ro"       ,
  35.     ".info"     ,
  36.     ".ws"       ,
  37.     ".biz"      ,
  38.     ".com"      ,
  39.     ".org"      ,
  40.     ".net"      ,
  41.  
  42.     ". ro"      ,
  43.     ".ro"       ,
  44.     ". info"    ,
  45.     ". ws"      ,
  46.     ". biz"     ,
  47.     ". com"     ,
  48.     ". org"     ,
  49.     ". net"     ,
  50.     ".r.o"      ,
  51.     ".c.o.m"    ,
  52.     ".i.n.f.o"  ,
  53.     ".n.e.t"    ,
  54.     "jb ."  ,
  55.     "jb."   ,
  56.     "cs16"  ,
  57.     "alphacs"   ,
  58.     "jbx."  ,
  59.     "VIP GRATIS",
  60.     "C  O  N  E  C  T  - J  B  .  C  S  1  6  .  R  O",
  61.     "C  O  N  E  C  T",
  62.     "J  B  .  C  S  1  6  .  R  O",
  63.     "VIP GRATIS",
  64.     "PB.READFEAR.RO",
  65.     "C  O  N  E  C  T  - J  B  .  C  S  1  6  .  R  O -",
  66.     "C  O  N  E  C  T  - J  B  .  C  S  1  6  .  R  O -VIP GRATIS",
  67.     "C  O  N  E  C  T  - J  B  .  C  S  1  6  .  R  O -VIP SI DETINATOR GRATIS",
  68.     "jb.cs16.ro",
  69.     "C  O  N  E  C  T  -   J  B  .  C  S  1  6  .  R  O   - A D MINE FREE",
  70.     "C , O , N , E , C , T , -  , J , B , . , C , S , 1 , 6 , . , R , O ",
  71.     "C  O  N  E  C  T",
  72.     "J B . FIORIGINAL . R0 CEL MAI TARE SERVER GO GO GO VA ASTEPTAM GO !",
  73.     "J B . FIORIGINAL . R0",
  74.     "J ]B . FIORIGINAL . R 0 GO GO GO CEL MAI TARE SV VA ASTEPTAM CU DRAG!",
  75.     "INTRA PE ZOMBIE[.]FRAGBITE[.]RO BEST SERVER FOREVER",
  76.     "ZOMBIE[.]FRAGBITE[.]RO",
  77.     "FRAGBITE[.]RO",
  78.     "fragbite.ro",
  79.     "89.40.104.98",
  80.     "zm.",
  81.     "INTRA PE ZOMBIE[.]FRAGBITE[.]RO BEST SERVER ZOMBIE XP",
  82.     "HAI PE CEL MAI BUN SERVER DE ZM [89.40.104.98] INTRA SI NU ITI VA PAREA RAU",
  83.     "INTRA PE ZOMBIE[.]FRAGBITE[.]RO BEST SERVER ZOMBIE XP",
  84.     "C / O / N / E / C / T  -   J / B / . / C / S / 1 / 6 / . / R / O   - A D MINE FREE",
  85.     "ADMINE FREE",
  86.     "C / O / N / E / C / T",
  87.     "INTRA PE ZOMBIE[.]FRAGBITE[.]RO BEST SERVER ZOMBIE XP",
  88.     "J B . FIORIGINAL . R0 CEL MAI TARE SERVER GO GO GO VA ASTEPTAM GO !",
  89.     "GO GO GO CEL MAI TARE!",
  90.     "JB . FIORIGINAL . RO",
  91.     "fioriginal",
  92.     "indungi",
  93.     "jb.indungi.ro",
  94.     "J b . i n d u n g i . r o",
  95.     "cs.viparena.ro",
  96.     "viparena",
  97.     "cs viparena ro",
  98.     "DOBS",
  99.     "jb.dobs.ro",
  100.     "jb dobs ro",
  101.     "JB.,FIORIGILAL. RO",
  102.     "WWW.ESPORTSKOSOVA.COM",
  103.     "ESPORTSKOSOVA",
  104.     "CON NECT CS . UDP . RO , ESTE EVENT V.I.P FREE ! DUREAZA DOAR O ORA ASA CA GRABESTE-TE!!!",
  105.     "CON NECT",
  106.     "CS . UDP . RO",
  107.     "cs.udp.ro",
  108.     "GO TO CS.VIPARENA.RO",
  109.     "JB--ALPHA--CS--RO",
  110.     "ALPHA",
  111.     "JB-",
  112.     "AVALA",
  113.  
  114. // Other
  115.  
  116. // Prescurtari
  117.     "fmm"       ,
  118.  
  119. // Injuraturi
  120.     "pula"      ,
  121.     "pizda"     ,
  122.     "ma-ta"     ,
  123.     "muie"      ,
  124.     "fut"      
  125. }
  126.  
  127. public plugin_init()
  128. {
  129.     register_plugin("Gag", "www.play-arena.ro/forum", "PedoBear")
  130.  
  131.     register_concmd("say", "vSay")
  132.     register_concmd("say_team", "vSay")
  133.  
  134.     register_concmd("amx_gag", "cAmxGag", ADMIN_KICK, "<nume | @ALL> <durata> <motiv>")
  135.     register_concmd("amx_ungag", "cAmxUnGag", ADMIN_KICK, "<nume | @ALL>")
  136.  
  137.     get_datadir(DataDir, charsmax(DataDir))
  138.     new error[2]
  139.     g_IP_pattern = regex_compile(REGEX_IP_PATTERN, g_regex_return, error, sizeof(error) - 1)
  140.     cFile()
  141. }
  142.  
  143. cFile() {
  144.     new fDir[126], Data[64]
  145.     get_time("%d.%m.%Y", Data, 63)
  146.     format(fDir, 125, "%s/chatlog", DataDir)
  147.     // Create dir
  148.     if (!dir_exists(fDir))
  149.         mkdir(fDir)
  150.  
  151.     format(fDir, 125, "%s/chatlog/%s.log", DataDir, Data)
  152.     if (!file_exists(fDir))
  153.         write_file(fDir, "- START LOG - by PedoBear -", -1)
  154.        
  155.     format(LogAdminMsg, 125, "%s/chatlog/Admin_Special_Say.log", DataDir)
  156.     if (!file_exists(LogAdminMsg))
  157.         write_file(LogAdminMsg, "- LOG - Cuvinte Blocate - by PedoBear -", -1)
  158.     copy(LogMsg, 125, fDir)
  159. }
  160.  
  161. public vSay(id) {
  162.     new sText[256]
  163.     read_args(sText, 255)
  164.     remove_quotes(sText)
  165.     if (equali(sText, "/scoategagbot"))
  166.     {
  167.         new hGag = VerificaGagJucator(id)
  168.         RemoveIp(hGag)
  169.         gagPlayer[id]=false
  170.         remove_task(hGag+TASK)
  171.         xColor(id, "PedoBear -> Te saluta serverul :).")
  172.         return PLUGIN_HANDLED
  173.     }
  174.     if (gagPlayer[id]) {
  175.         new slot = VerificaGagJucator(id)
  176.         new dName[32], dTime[32], dDurata[10], dReason[126], transTime[2]
  177.         parse(gagDetails[slot], dName, 31, dTime, 31, dDurata, 9, dReason, 125)
  178.         fTransformSec((str_to_num(dTime) + (str_to_num(dDurata) * G_A_G) - time()), transTime)
  179.         xColor(id, "!g%s!n ti-a dat gag. Motiv:!g %s!n. Timp ramas:!g %d!n minut%s si!g %d!n secund%s", dName, dReason, transTime[0], transTime[0]==1 ? "" : "e", transTime[1], transTime[1]==1 ? "a" : "e")
  180.         return PLUGIN_HANDLED
  181.     } else {
  182.         new nSay[32], whyGag[64]
  183.         if (!strlen(sText))
  184.             return PLUGIN_CONTINUE
  185.         strtoupper(sText)
  186.         // Verify is IP Say
  187.         if (VerifySayIP(sText, nSay, 31)) {
  188.             format(whyGag, 63, "Reclama la IP [%s]", nSay)
  189.             ActGagJucator(0, id, time(), GAG_DEFAULT_TIME, whyGag)
  190.             xColor(id, "Ai primit gag deoarece ai facut reclama la IP:!g %s", nSay)
  191.             return PLUGIN_HANDLED
  192.         }
  193.         for (new i=0; i < sizeof(bChat);i++) {
  194.             strtoupper(bChat[i])
  195.             if (contain(sText, bChat[i]) !=-1) {
  196.                 if (get_user_flags(id) & ADMIN_RESERVATION) {
  197.                     xlogAdminMsg(id, i, sText)
  198.                     format(whyGag, 63, "Cuvant blocat [%s]", bChat[i])
  199.                 //  xColor(id, "Mesajul nu a fost trimis deoarece contine:!g %s!n.", bChat[i])
  200.                     return PLUGIN_HANDLED
  201.                 } else {
  202.                     xlogMsg(id, i, sText)
  203.                     format(whyGag, 63, "Cuvant blocat [%s]", bChat[i])
  204.                 //  xColor(id, "Mesajul nu a fost trimis deoarece contine:!g %s!n.", bChat[i])
  205.                     return PLUGIN_HANDLED
  206.                 }
  207.             }
  208.         }
  209.         xlogMsg(id, -1, sText)
  210.     }
  211.     return PLUGIN_CONTINUE
  212. }
  213.  
  214. public client_disconnect(id) {
  215.     gagPlayer[id]=false
  216.     new slot = VerificaGagJucator(id)
  217.     new pName[32]
  218.     get_user_name(id, pName, 31)
  219.     if (slot != 0)
  220.         xColor(0, "Jucatorul!g %s!n avea gag si s-a deconectat", pName)
  221. }
  222.  
  223. public client_putinserver(id) {
  224.     new slot = VerificaGagJucator(id)
  225.     new pName[32], dName[32], dTime[32], dDurata[10], dReason[126], transTime[2]
  226.     get_user_name(id, pName, 31)
  227.     if (slot != 0) {
  228.         parse(gagDetails[slot], dName, 31, dTime, 31, dDurata, 9, dReason, 125)
  229.         fTransformSec((str_to_num(dTime) + (str_to_num(dDurata) * G_A_G) - time()), transTime)
  230.         xColor(0, "Jucatorul!g %s!n s-a reconectat cand avea gag. Timp ramas gag:!g %d!n minut%s si!g %d!n secund%s", pName, transTime[0], transTime[0]==1 ? "" : "e", transTime[1], transTime[1]==1 ? "a" : "e")
  231.         set_speak(id, SPEAK_MUTED)
  232.         gagPlayer[id]=true
  233.     }
  234. }
  235.  
  236.  
  237. public cAmxUnGag(id, level, cid) {
  238.     if(!cmd_access (id, level, cid, 1))
  239.         return PLUGIN_HANDLED
  240.  
  241.     new Victim[32], aName[32], pName[32]
  242.     get_user_name(id, aName, 31)
  243.     read_argv(1,Victim,31)
  244.     if (equal(Victim, "@ALL")) {
  245.         new xP[32], xN
  246.         get_players(xP, xN, "c")
  247.         for (new i=0; i < xN; i++)
  248.             gagPlayer[xP[i]]=false
  249.         RemoveAllIp()
  250.         gagMultiple=false
  251.         remove_task(TASK+TASK)
  252.         console_print(id, "Ai scos gagul la toti jucatorii")
  253.         xColor(0, "!g%s!n scoate gag la toti jucatorii.", aName)
  254.     } else {
  255.         new id2 = cmd_target(id, Victim, 8)
  256.         if (!id2)
  257.             return PLUGIN_HANDLED
  258.         get_user_name(id2, pName, 31)
  259.         new hGag = VerificaGagJucator(id2)
  260.         if (hGag != 0) {
  261.             remove_task(hGag+TASK)
  262.             RemoveIp(hGag)
  263.             gagPlayer[id2]=false
  264.             xColor(0, "!g%s!n ia scos gagul lui!g %s!n.", aName, pName)
  265.         } else
  266.             console_print(id, "Jucatorul %s nu are gag.", pName)
  267.     }
  268.     return PLUGIN_HANDLED  
  269. }
  270.  
  271. public cAmxGag(id, level, cid) {
  272.     if(!cmd_access (id, level, cid, 1))
  273.         return PLUGIN_HANDLED
  274.        
  275.     new Victim[32], pName[32], transTime[2], aName[32], Temp[10], gTime[10], gReason[126]
  276.     get_user_name(id, aName, 31)
  277.     read_argv(1,Victim,31)
  278.     read_argv(2, gTime, 31)
  279.     read_argv(3, gReason, 125)
  280.     new gagTime = str_to_num(gTime)
  281.     if (!gagTime)
  282.         gagTime = GAG_DEFAULT_TIME
  283.     if (gagTime < 1) {
  284.         console_print(id, "# Poti sa-i dai gag minim 1 minut")
  285.         return PLUGIN_CONTINUE
  286.     }
  287.     if (strlen(gReason) < 1)
  288.         format(gReason, 125, "Fara Motiv")
  289.    
  290.     if (equal(Victim, "@ALL")) {
  291.         new xP[32], xN
  292.         get_players(xP, xN, "c")
  293.         format(Temp, 9, "%d", gagTime * G_A_G)
  294.         new Float:gagTask = floatstr(Temp)
  295.         for (new i=0; i < xN; i++) {
  296.             new slot = VerificaGagJucator(xP[i])
  297.             if (gagPlayer[xP[i]]) {
  298.                 remove_task(slot+TASK)
  299.                 RemoveIp(slot)
  300.                 gagPlayer[xP[i]]=false
  301.             }
  302.             if (gagMultiple) {
  303.                 console_print(id, "Jucatorii au deja gag.")
  304.                 return PLUGIN_HANDLED
  305.             }
  306.             if (get_user_flags(xP[i]) & EXCLUDE_GAG)
  307.                 continue
  308.             new gStatus = ActGagJucator(id, xP[i], time(), gagTime, gReason)
  309.             set_task(gagTask, "TaskUnGag2", gStatus+TASK)
  310.         }
  311.         gagMultiple=true
  312.         set_task(gagTask, "TaskMultiple", TASK+TASK)
  313.         console_print(id, "Ai dat gag la toti jucatorii.")
  314.         xColor(0, "!g%s!n da gag la toti jucatorii. [Durata:!g%d!n minut%s] [Motiv:!g%s!n]", aName, gagTime, gagTime==1 ? "" : "e", gReason)
  315.     } else {
  316.         new id2 = cmd_target(id, Victim, 8)
  317.         if (!id2)
  318.             return PLUGIN_HANDLED
  319.         get_user_name(id2, pName, 31)
  320.         new hGag = VerificaGagJucator(id2)
  321.         if (hGag != 0) {
  322.             new dName[32], dTime[32], dDurata[10], dReason[126]
  323.             parse(gagDetails[hGag], dName, 31, dTime, 31, dDurata, 9, dReason, 125)
  324.             fTransformSec((str_to_num(dTime) + (str_to_num(dDurata) * G_A_G) - time()), transTime)
  325.             console_print(id, "## Jucatorul [%s] are deja gag ##", pName)
  326.             console_print(id, "# Admin: %s", dName)
  327.             console_print(id, "# Durata: %d minut%s", str_to_num(dDurata), str_to_num(dDurata)==1 ? "" : "e")
  328.             console_print(id, "# Ramas: %d minut%s si %d secund%s", transTime[0], transTime[0]==1 ? "" : "e", transTime[1], transTime[1]==1 ? "a" : "e")
  329.             console_print(id, "# Motiv: %s", dReason)
  330.             console_print(id, "#########################################")
  331.         } else {
  332.             new gStatus = ActGagJucator(id, id2, time(), gagTime, gReason)
  333.             if (gStatus != 0) {
  334.                 format(Temp, 9, "%d", gagTime * G_A_G)
  335.                 new Float:gagTask = floatstr(Temp)
  336.                 set_task(gagTask, "TaskUnGag", gStatus+TASK)
  337.                 xColor(0, "!g%s!n: Ii da gag lui!g %s!n.[Durata:!g%d!n minut%s] [Motiv:!g%s!n]", aName, pName, gagTime, gagTime==1 ? "" : "e", gReason)
  338.                 console_print(id, "## Jucatorul %s a primit gag", pName)
  339.                 console_print(id, "# Durata: %d minut%s", gagTime, gagTime==1 ? "" : "e")
  340.                 console_print(id, "# Motiv: %s", gReason)
  341.                 console_print(id, "#########################################")
  342.             } else
  343.                 console_print(id, "Nu ii pot da gag lui %s", pName)
  344.         }
  345.     }
  346.     return PLUGIN_HANDLED
  347. }
  348.  
  349. /***************************** FUNCTII *****************************/
  350.  
  351. /* UnGag2 Task */
  352. public TaskUnGag2(s) {
  353.     new sIp = s-TASK
  354.     new pOn = IsIpOnline(gagIp[sIp])
  355.     if (pOn != 0) {
  356.         new pName[32]
  357.         get_user_name(pOn, pName, 31)
  358.         gagPlayer[pOn]=false
  359.     }
  360.     RemoveIp(sIp)
  361. }
  362.  
  363.  
  364. /* UnGag Task */
  365. public TaskUnGag(s) {
  366.     new sIp = s-TASK
  367.     new pOn = IsIpOnline(gagIp[sIp])
  368.     if (pOn != 0) {
  369.         new pName[32]
  370.         get_user_name(pOn, pName, 31)
  371.         gagPlayer[pOn]=false
  372.         xColor(pOn, "Jucatorul!g %s!n poate sa vorbeasca.", pName)
  373.     }
  374.     RemoveIp(sIp)
  375. }
  376.  
  377. /* Task Multiple */
  378. public TaskMultiple() {
  379.     xColor(0, "Toti jucatorii pot vorbi acum.")
  380.     gagMultiple=false
  381. }
  382.  
  383. /* Verifica daca IP-ul este conectat */
  384. IsIpOnline(ip[]) {
  385.     new xP[32], xN, uIp[32]
  386.     get_players(xP, xN, "c")
  387.     for (new i=0; i < xN; i++) {
  388.         get_user_ip(xP[i], uIp, 31, 1)
  389.         if (equal(uIp, ip))
  390.             return xP[i]   
  391.     }
  392.     return 0
  393. }
  394.  
  395. /* Gag jucator */
  396. ActGagJucator(id, id2, xTime, xDurata, xMotiv[]) {
  397.     new Ip[32], aNume[32]
  398.     if (id != 0)
  399.         get_user_name(id, aNume, 31)
  400.     else
  401.         format(aNume, 31, "HNS.CSPLAY.RO")
  402.     get_user_ip(id2, Ip, 31, 1)
  403.     for (new i=1; i < sizeof(gagIp); i++)
  404.         if (equal(gagIp[i], "")) {
  405.             copy(gagIp[i], charsmax(gagIp[]), Ip)
  406.             format(gagDetails[i], charsmax(gagDetails[]), "^"%s^" ^"%d^" ^"%d^" ^"%s^"", aNume, xTime, xDurata, xMotiv)
  407.             gagPlayer[id2]=true
  408.             set_speak(id2, SPEAK_MUTED)
  409.             return i
  410.         }
  411.     return 0
  412. }
  413.  
  414. /* Remove IP */
  415. RemoveIp(slot) {
  416.     format(gagIp[slot], charsmax(gagIp[]), "")
  417.     format(gagDetails[slot], charsmax(gagDetails[]), "")
  418. }
  419.  
  420. /* Remove All IP */
  421. RemoveAllIp() {
  422.     for (new i=1; i < sizeof(gagIp); i++)
  423.         RemoveIp(i)
  424. }
  425.  
  426.  
  427. /* Transform sec to min/sec */
  428. fTransformSec(sec, xBack[]) {
  429.     xBack[0] = (sec / 60) % 60      // Minute
  430.     xBack[1] = sec % 60             // Secunde
  431. }
  432.  
  433. /* Verifica daca jucatorul are sau nu gag */
  434. VerificaGagJucator(id) {
  435.     new Ip[32]
  436.     get_user_ip(id, Ip, 31, 1)
  437.     for (new i=1; i < sizeof(gagIp); i++)
  438.         if (equal(gagIp[i], Ip))
  439.             return i
  440.     return 0
  441. }
  442.  
  443. /* Verifica daca jucatorul a scris vreun IP in chat */
  444. VerifySayIP(sText[], nSay[], max) {
  445.     if (strlen(sText) > 10) {
  446.         new xC=50, xT1[126], xT2[125]
  447.         for (new i=0; i < xC; i++) {
  448.             // First
  449.             if (i==0)
  450.                 strbreak(sText, xT1, 31, xT2, 31)
  451.             else
  452.                 strbreak(xT2, xT1, 31, xT2, 31)
  453.                
  454.             if (IsIP(xT1)) {
  455.                 copy(nSay, max, xT1)
  456.                 return true
  457.             }
  458.         }
  459.     }
  460.     return false
  461. }
  462.  
  463. /* Log msg */
  464. stock xlogMsg(id, b, msg[]) {
  465.     if (!file_exists(LogMsg))
  466.         cFile()
  467.     new Data[64], fLog[256], xName[32]
  468.     get_user_name(id, xName, 31)
  469.     get_time("%H:%M:%S", Data, 63)
  470.     if (b != -1) {
  471.         write_file(LogMsg, "[ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ]", -1)
  472.         format(fLog, 255, "[%s] [%s] -> %s -> [%s]", Data, xName, msg, bChat[b])
  473.         write_file(LogMsg, fLog, -1)
  474.         write_file(LogMsg, "[ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ]", -1)
  475.     }
  476.     else {
  477.         format(fLog, 255, "[%s] [%s]: %s", Data, xName, msg)
  478.         write_file(LogMsg, fLog, -1)
  479.     }
  480. }
  481.  
  482. /* Log admin msg */
  483. stock xlogAdminMsg(id, b, msg[]) {
  484.     if (!file_exists(LogAdminMsg))
  485.         cFile()
  486.     new Data[64], fLog[256], xName[32]
  487.     get_user_name(id, xName, 31)
  488.     get_time("%d.%m.%Y  %H:%M:%S", Data, 63)
  489.     format(fLog, 255, "[%s] [%s] -> %s -> [%s]", Data, xName, msg, bChat[b])
  490.     write_file(LogAdminMsg, fLog, -1)
  491. }
  492.  
  493. /* */
  494. stock xColor(const id, const input[], any:...)
  495.     {
  496.        new count = 1, players[32]
  497.        static msg[320], msg2[320]
  498.        vformat(msg, 190, input, 3)
  499.        formatex(msg2, 190, "!n[!g%s!n] %s", TAG, msg)
  500.        replace_all(msg2, 190, "!g", "^4")
  501.        replace_all(msg2, 190, "!n", "^1")
  502.        replace_all(msg2, 190, "!t", "^3")
  503.        replace_all(msg2, 190, "!t2", "^0")
  504.        if (id) players[0] = id; else get_players(players, count, "ch")
  505.        {
  506.           for (new i = 0; i < count; i++)
  507.           {
  508.              if (is_user_connected(players[i]))
  509.              {
  510.                 message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  511.                 write_byte(players[i])
  512.                 write_string(msg2)
  513.                 message_end()
  514.              }
  515.           }
  516.        }
  517.     }
Add Comment
Please, Sign In to add comment