hlmod.hu
https://hlmod.hu/

hirdetés tiltó!
https://hlmod.hu/viewtopic.php?f=9&t=27071
Oldal: 1 / 1

Szerző:  adriansr14 [2017.01.15. 09:42 ]
Hozzászólás témája:  hirdetés tiltó!

Valaki ebbe bele írna egy hirdetés tiltót?
azaz ip cimet ne lehessen bele írni és weblapot sem de a weblap nem számit annyira. csak az ip cim tiltó!!

  1. public sayhook(id)
  2. {
  3. new message[192], Name[32], none[2][32], chat[192];
  4. read_args(message, 191);
  5. remove_quotes(message);
  6.  
  7. formatex(none[0], 31, ""), formatex(none[1], 31, " ");
  8.  
  9. if (message[0] == '@' || message[0] == '/' || message[0] == '#' || message[0] == '!' || equal (message, ""))
  10. return PLUGIN_HANDLED;
  11.  
  12. if(!equali(message, none[0]) && !equali(message, none[1]))
  13. {
  14. get_user_name(id, Name, 31);
  15. if(is_user_alive(id))
  16. {
  17. if(Regisztralt[id] == 0)
  18. formatex(chat, 191, "^x04[Nem Regisztrált]^x03%s^x01: %s", Name, message);
  19. else if(get_user_flags(id) & TULAJ && Belepve[id] == true)
  20. formatex(chat, 191, "^x04[Tulajdonos][%s]^3%s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  21. else if(get_user_flags(id) & ADMIN && Belepve[id] == true)
  22. formatex(chat, 191, "^x04[Admin][%s]^x03%s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  23. else if(get_user_flags(id) & VIP && Belepve[id] == true)
  24. formatex(chat, 191, "^x04[VIP][%s]^x03%s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  25. else if(Belepve[id] == true)
  26. formatex(chat, 191, "^x04[FREE VIP][%s]^x03%s^x01: %s", Rangok[Rang[id]][Szint], Name, message);
  27. else if(Regisztralt[id] == 1)
  28. formatex(chat, 191, "^x04[Kijelentkezve]^x03 %s^x01: %s", Name, message);
  29. }
  30. else {
  31. get_user_team(id, color, 9);
  32. if(Regisztralt[id] == 0)
  33. formatex(chat, 191, "^x01*Halott*^x04[Nem Regisztrált]^x03 %s^x01: %s", Name, message);
  34. else if(get_user_flags(id) & TULAJ && Belepve[id] == true)
  35. formatex(chat, 191, "^x01*Halott*^x04[Tulajdonos][%s]^3 %s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  36. else if(get_user_flags(id) & ADMIN && Belepve[id] == true)
  37. formatex(chat, 191, "^x01*Halott*^x04[Admin][%s]^x03 %s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  38. else if(get_user_flags(id) & VIP && Belepve[id] == true)
  39. formatex(chat, 191, "^x01*Halott*^x04[VIP][%s]^x03 %s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  40. else if(Belepve[id] == true)
  41. formatex(chat, 191, "^x01*Halott*^x04[FREE VIP][%s]^x03 %s^x01: %s", Rangok[Rang[id]][Szint], Name, message);
  42. else if(Regisztralt[id] == 1)
  43. formatex(chat, 191, "^x01*Halott*^x04[Kijelentkezve]^x03 %s^x01: %s", Name, message);
  44. }
  45.  
  46. switch(cs_get_user_team(id))
  47.     {
  48.     case 1: ColorChat(0, RED, chat);
  49.     case 2: ColorChat(0, BLUE, chat);
  50.     }
  51. if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
  52. ColorChat(0, GREY, chat);
  53. return PLUGIN_HANDLED;
  54. }
  55. return PLUGIN_CONTINUE;
  56. }

Szerző:  PikHácsúú# [2017.01.17. 17:39 ]
Hozzászólás témája:  Re: hirdetés tiltó!

  1. new message[192]
  2. new pont;
  3. new kettospont;
  4. new szam;


  1. public sayhook(id)
  2. {
  3.     new message[192], Name[32], none[2][32], chat[192];
  4.     read_args(message, 191);
  5.     remove_quotes(message);
  6.     new hossz = strlen(message);
  7.    
  8.     new i=0;
  9.     pont=0;
  10.     kettospont=0;
  11.     szam=0;
  12.    
  13.     formatex(none[0], 31, ""), formatex(none[1], 31, " ");
  14.    
  15.     if (message[0] == '@' || message[0] == '/' || message[0] == '#' || message[0] == '!' || equal (message, ""))
  16.         return PLUGIN_HANDLED;
  17.    
  18.     if(!equali(message, none[0]) && !equali(message, none[1]))
  19.     {
  20.         get_user_name(id, Name, 31);
  21.         if(is_user_alive(id))
  22.         {
  23.             if(Regisztralt[id] == 0)
  24.                 formatex(chat, 191, "^x04[Nem Regisztrált]^x03%s^x01: %s", Name, message);
  25.             else if(get_user_flags(id) & TULAJ && Belepve[id] == true)
  26.                 formatex(chat, 191, "^x04[Tulajdonos][%s]^3%s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  27.             else if(get_user_flags(id) & ADMIN && Belepve[id] == true)
  28.                 formatex(chat, 191, "^x04[Admin][%s]^x03%s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  29.             else if(get_user_flags(id) & VIP && Belepve[id] == true)
  30.                 formatex(chat, 191, "^x04[VIP][%s]^x03%s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  31.             else if(Belepve[id] == true)
  32.                 formatex(chat, 191, "^x04[FREE VIP][%s]^x03%s^x01: %s", Rangok[Rang[id]][Szint], Name, message);
  33.             else if(Regisztralt[id] == 1)
  34.                 formatex(chat, 191, "^x04[Kijelentkezve]^x03 %s^x01: %s", Name, message);
  35.         }
  36.         else {
  37.             get_user_team(id, color, 9);
  38.             if(Regisztralt[id] == 0)
  39.                 formatex(chat, 191, "^x01*Halott*^x04[Nem Regisztrált]^x03 %s^x01: %s", Name, message);
  40.             else if(get_user_flags(id) & TULAJ && Belepve[id] == true)
  41.                 formatex(chat, 191, "^x01*Halott*^x04[Tulajdonos][%s]^3 %s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  42.             else if(get_user_flags(id) & ADMIN && Belepve[id] == true)
  43.                 formatex(chat, 191, "^x01*Halott*^x04[Admin][%s]^x03 %s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  44.             else if(get_user_flags(id) & VIP && Belepve[id] == true)
  45.                 formatex(chat, 191, "^x01*Halott*^x04[VIP][%s]^x03 %s^x04: %s", Rangok[Rang[id]][Szint], Name, message);
  46.             else if(Belepve[id] == true)
  47.                 formatex(chat, 191, "^x01*Halott*^x04[FREE VIP][%s]^x03 %s^x01: %s", Rangok[Rang[id]][Szint], Name, message);
  48.             else if(Regisztralt[id] == 1)
  49.                 formatex(chat, 191, "^x01*Halott*^x04[Kijelentkezve]^x03 %s^x01: %s", Name, message);
  50.         }
  51.        
  52.         switch(cs_get_user_team(id))
  53.         {
  54.             case 1: ColorChat(0, RED, chat);
  55.                 case 2: ColorChat(0, BLUE, chat);
  56.             }
  57.         if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
  58.             ColorChat(0, GREY, chat);
  59.         return PLUGIN_HANDLED;
  60.     }
  61.     while(i < hossz)
  62.     {
  63.         if(message[i] == '.')
  64.             pont++;
  65.         if(message[i] == ':')
  66.             kettospont++;
  67.         if(message[i] == '1' || message[i] == '2' || message[i] == '3' || message[i] == '4' || message[i] == '5' || message[i] == '6' || message[i] == '7' || message[i] == '8' || message[i] == '9' || message[i] == '0')
  68.             szam++;
  69.         ++i;
  70.     }
  71.    
  72.     if(pont >= 3 && kettospont >= 1 && szam >= 8)
  73.     {
  74.         client_print(id, print_chat, "Ne hirdess!")
  75.         return PLUGIN_HANDLED;
  76.     }
  77.     return PLUGIN_CONTINUE;
  78. }


Teszteld!

Szerző:  adriansr14 [2017.01.17. 18:28 ]
Hozzászólás témája:  Re: hirdetés tiltó!

Szia, errort kaptam.

  1. Welcome to the AMX Mod X 1.8.1-300 Compiler.
  2. Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team
  3.  
  4. Warning: Loose indentation on line 2222
  5. Warning: Loose indentation on line 2234
  6. Warning: Loose indentation on line 2246
  7. Error: Invalid function or declaration on line 3540
  8. Error: Invalid function or declaration on line 3542
  9. Error: Invalid function or declaration on line 3543
  10. Error: Invalid function or declaration on line 3545
  11. Error: Symbol already defined: "ColorChat" on line 3546
  12. Error: Invalid function or declaration on line 3547
  13. Error: Invalid function or declaration on line 3549
  14. Warning: Symbol is never used: "message" on line 3580
  15.  
  16. 7 Errors.

Szerző:  PikHácsúú# [2017.01.18. 15:51 ]
Hozzászólás témája:  Re: hirdetés tiltó!

Ha oda tudod adni az egész forráskódot tudom javítani, de így csak bonyolítás.

Szerző:  adriansr14 [2017.01.18. 16:07 ]
Hozzászólás témája:  Re: hirdetés tiltó!

PikHácsúú# írta:
Ha oda tudod adni az egész forráskódot tudom javítani, de így csak bonyolítás.


Betaktam így ahogy meg írtad és ezt japtam errornak.

Szerző:  elit [2017.01.18. 16:14 ]
Hozzászólás témája:  Re: hirdetés tiltó!

adriansr14 írta:
Szia, errort kaptam.

  1. Welcome to the AMX Mod X 1.8.1-300 Compiler.
  2. Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team
  3.  
  4. Warning: Loose indentation on line 2222
  5. Warning: Loose indentation on line 2234
  6. Warning: Loose indentation on line 2246
  7. Error: Invalid function or declaration on line 3540
  8. Error: Invalid function or declaration on line 3542
  9. Error: Invalid function or declaration on line 3543
  10. Error: Invalid function or declaration on line 3545
  11. Error: Symbol already defined: "ColorChat" on line 3546
  12. Error: Invalid function or declaration on line 3547
  13. Error: Invalid function or declaration on line 3549
  14. Warning: Symbol is never used: "message" on line 3580
  15.  
  16. 7 Errors.


az elejére ezeket beraktad? amit irt
  1. new message[192]
  2. new pont;
  3. new kettospont;
  4. new szam;

Szerző:  PikHácsúú# [2017.01.18. 16:28 ]
Hozzászólás témája:  Re: hirdetés tiltó!

adriansr14 írta:
PikHácsúú# írta:
Ha oda tudod adni az egész forráskódot tudom javítani, de így csak bonyolítás.


Betaktam így ahogy meg írtad és ezt japtam errornak.


De teljes forráskód. Ebből hiányzik csomó minden. Tudnám pótolni de nincs ahoz kedvem, mert egyszerűbb lenne, ha te CTRL+C, majd CTRL+V...

Szerző:  adriansr14 [2017.01.19. 16:14 ]
Hozzászólás témája:  Re: hirdetés tiltó!

PikHácsúú# írta:
adriansr14 írta:
PikHácsúú# írta:
Ha oda tudod adni az egész forráskódot tudom javítani, de így csak bonyolítás.


Betaktam így ahogy meg írtad és ezt japtam errornak.


De teljes forráskód. Ebből hiányzik csomó minden. Tudnám pótolni de nincs ahoz kedvem, mert egyszerűbb lenne, ha te CTRL+C, majd CTRL+V...


Kijavítottam.. 2x volt benne 1 dolog..
na és ugyan úgy lehet bele írni ip címet.

Szerző:  PikHácsúú# [2017.01.20. 17:36 ]
Hozzászólás témája:  Re: hirdetés tiltó!

Akkor rosszúl javítottad. A hirdetéstiltó benne, egy működő HLMOD.HU-s plugin.

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/