Advertisement
Filiq_

Untitled

Dec 3rd, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <fakemeta>
  6.  
  7. #define PLUGIN "Blocare Multipla"
  8. #define VERSION "1.0"
  9. #define AUTHOR "KENNY."
  10.  
  11. #define kennyprefix "[BLOCK]"
  12. #define timp 10.0
  13.  
  14. new NameUnLock[33]
  15.  
  16. public plugin_init() {
  17. register_plugin(PLUGIN, VERSION, AUTHOR)
  18. register_clcmd ( "radio1", "cmdBlock" ) // 'z'
  19. register_clcmd ( "radio2", "cmdBlock" ) // 'x'
  20. register_clcmd ( "radio3", "cmdBlock" ) // 'c'
  21. server_cmd("sv_voiceenable 0") // 'k'
  22. register_message( get_user_msgid( "TextMsg" ), "TextMsgHandler" )
  23. register_forward(FM_ClientUserInfoChanged, "KENNY_NICKSPAM")
  24. }
  25.  
  26. public cmdBlock ( ) return PLUGIN_HANDLED
  27.  
  28. public TextMsgHandler( msgid, dest, receiver ) {
  29. static const szFireInTheHole[] = "#Fire_in_the_hole"
  30. static szMsg[18]
  31.  
  32. if(get_msg_arg_int(1) != 5)
  33. return PLUGIN_CONTINUE
  34.  
  35. get_msg_arg_string(5, szMsg, charsmax(szMsg))
  36. if(!strcmp(szMsg, szFireInTheHole))
  37. return PLUGIN_HANDLED
  38.  
  39. return PLUGIN_CONTINUE
  40. }
  41.  
  42. public KENNY_NICKSPAM(id) {
  43. new LastName[32],
  44. NewName[32]
  45.  
  46. pev(id,pev_netname,LastName,charsmax(LastName))
  47.  
  48. if(LastName[0]) {
  49. get_user_info(id,"name", NewName, charsmax(NewName))
  50. if(!equal(LastName,NewName)) {
  51. if (NameUnLock[id] == 1) {
  52. ColorChat(id,"^4%s^1 Iti poti schimba numele din nou in^4 10 secunde.",kennyprefix)
  53. set_user_info(id,"name",LastName)
  54. return FMRES_HANDLED
  55. }
  56. NameUnLock[id] = 1
  57. set_task(10.0, "ResetNick", id + 552)
  58. }
  59. }
  60.  
  61. return FMRES_SUPERCEDE
  62. }
  63.  
  64. public ResetNick(id) {
  65. id - 552
  66. if(!is_user_connected(id)) return
  67. NameUnLock[id] = 0
  68. }
  69.  
  70. stock ColorChat(const id, const input[], any:...) {
  71. new count = 1, players[32];
  72. static msg[191];
  73. vformat(msg, 190, input, 3);
  74.  
  75. replace_all(msg, 190, "!g", "^4");
  76. replace_all(msg, 190, "!y", "^1");
  77. replace_all(msg, 190, "!t", "^3");
  78.  
  79. if(id) players[0] = id;
  80. else get_players(players, count, "ch"); {
  81. for(new i = 0; i < count; i++) {
  82. if(is_user_connected(players[i])) {
  83. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
  84. write_byte(players[i]);
  85. write_string(msg);
  86. message_end();
  87. }
  88. }
  89. }
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement