laurentiuarion

Anti jointeam 2.0

Feb 11th, 2020
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <amxmodx>
  2.  
  3. #define PLUGIN "Anti Jointeam"
  4. #define VERSION "2.0"
  5. #define AUTHOR "Ex3cuTioN"
  6.  
  7.  
  8. public plugin_init()
  9. {
  10.     register_plugin(PLUGIN, VERSION, AUTHOR)
  11.     register_event( "TeamInfo", "join_team", "a")
  12. }
  13.  
  14. public join_team()
  15. {
  16.     new id = read_data(1);
  17.     static jucator[32];
  18.  
  19.     read_data(2, jucator, 31);
  20.  
  21.     if(!is_user_connected(id))
  22.         return PLUGIN_CONTINUE ;
  23.  
  24.     switch(jucator[0])
  25.     {
  26.         case 'C':
  27.         {
  28.             register_clcmd("jointeam","cmd_block");
  29.             register_clcmd("jointeam 1","cmd_block");
  30.             register_clcmd("jointeam 2","cmd_block");
  31.         }
  32.  
  33.         case 'T':
  34.         {
  35.             register_clcmd("jointeam","cmd_block");
  36.             register_clcmd("jointeam 1","cmd_block");
  37.             register_clcmd("jointeam 2","cmd_block");
  38.         }
  39.    
  40.    
  41.         case 'S':
  42.         {
  43.             register_clcmd("jointeam","cmd_block");
  44.             register_clcmd("jointeam 1","cmd_block");
  45.             register_clcmd("jointeam 2","cmd_block");
  46.         }
  47.     }
  48.     return PLUGIN_CONTINUE;
  49. }
  50.  
  51. public cmd_block(id)
  52. {
  53.     console_print(id,"Nu ai voie sa folosesti JoinTeam !");
  54.     return PLUGIN_HANDLED;
  55. }
RAW Paste Data