Advertisement
Guest User

Untitled

a guest
Aug 24th, 2010
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. questo script lo si esegue loggati RCON
  2.  
  3. //in cima
  4. #define rconp 1234
  5. #define rcon_1 5678
  6. #define rcon_2 9101
  7. #define rcon_3 1112
  8. #define rcon_4 1213
  9. #define rcon_5 1314
  10. #define rcon_6 1516
  11. #define rcon_7 1718
  12. #define rcon_8 1920
  13.  
  14. if(strcmp(cmd, "/pannello", true) == 0)
  15. {
  16. if(IsPlayerAdmin(playerid))
  17. {
  18. ShowPlayerDialog(playerid, rconp, 2, "Pannello RCON", "Riavvia Server\nHostName\nNome GameMode\nResetta Bans\nBanna IP\nSbanna IP\nCarica FS\nTogli FS\nRicarica FS\nCambia Pass RCON","Accetta", "Indietro");
  19. }
  20. return 1;
  21. }
  22.  
  23.  
  24.  
  25. // in OnDialogResponse
  26.  
  27. if(dialogid == rconp)
  28. {
  29. if(response == 1)
  30. {
  31. switch(listitem)
  32. {
  33. case 0: SendRconCommand("gmx");
  34. case 1: ShowPlayerDialog(playerid, rcon_1, DIALOG_STYLE_IMPUT, "Inserisci il Nome del server", "Accetta", "Rifiuta");
  35. case 2: ShowPlayerDialog(playerid, rcon_2, DIALOG_STYLE_IMPUT, "Inserisci il nome della Game Mode", "Accetta","Rifiuta");
  36. case 3: SendRconCommand("reloadbans");
  37. case 4: ShowPlayerDialog(playerid, rcon_3, DIALOG_STYLE_INPUT, "Inserisci l'IP da bannare", "Accetta", "Rifiuta");
  38. case 5: ShowPlayerDialog(playerid, rcon_4, DIALOG_STYLE_INPUT, "IInserisci l'IP da bannare", "Accetta", "Rifiuta");
  39. case 6: ShowPlayerDialog(playerid, rcon_5, DIALOG_STYLE_INPUT,"Carica FS","Inserisci il nome", "Ok", "Esci");
  40. case 7: ShowPlayerDialog(playerid, rcon_6, DIALOG_STYLE_INPUT,"Togli FS","Inserisci il nome", "Ok", "Esci");
  41. case 8: ShowPlayerDialog(playerid, rcon_7, DIALOG_STYLE_INPUT,"Ricarica FS","Inserisci il nome", "Ok", "Esci");
  42. case 9: ShowPlayerDialog(playerid, rcon_8, DIALOG_STYLE_INPUT,"Cambia Password RCON","Inserisci la Password RCON nuova", "Ok", "Esci");
  43. }
  44. }
  45. }
  46.  
  47. //sotto a quest'ultimo dialogo
  48.  
  49. if(dialogid == rcon_1)
  50. {
  51. if(response == 1)
  52. {
  53. new file[128];
  54. format(file, sizeof(file), "hostname %s", inputtext);
  55. SendRconCommand(file);
  56. }
  57. }
  58. //--------------------------------------------------------------------------
  59. if(dialogid == rcon_2)
  60. {
  61. if(response == 1)
  62. {
  63. new file[128];
  64. format(file, sizeof(file), "gamemodetext %s", inputtext);
  65. SendRconCommand(file);
  66. }
  67. }
  68. //--------------------------------------------------------------------------
  69. if(dialogid == rcon_3)
  70. {
  71. if(response == 1)
  72. {
  73. new file[128];
  74. format(file, sizeof(file), "banip %s", inputtext);
  75. SendRconCommand(file);
  76. }
  77. }
  78. //--------------------------------------------------------------------------
  79. if(dialogid == rcon_4)
  80. {
  81. if(response == 1)
  82. {
  83. new file[128];
  84. format(file, sizeof(file), "unbanip %s", inputtext);
  85. SendRconCommand(file);
  86. }
  87. }
  88. //--------------------------------------------------------------------------
  89. if(dialogid == rcon_5)
  90. {
  91. if(response == 1)
  92. {
  93. new file[128];
  94. format(file, sizeof(file), "loadfs %s", inputtext);
  95. SendRconCommand(file);
  96. }
  97. }
  98. //--------------------------------------------------------------------------
  99. if(dialogid == rcon_6)
  100. {
  101. if(response == 1)
  102. {
  103. new file[128];
  104. format(file, sizeof(file), "unloadfs %s", inputtext);
  105. SendRconCommand(file);
  106. }
  107. }
  108. //--------------------------------------------------------------------------
  109. if(dialogid == rcon_7)
  110. {
  111. if(response == 1)
  112. {
  113. new file[128];
  114. format(file, sizeof(file), "reloadfs %s", inputtext);
  115. SendRconCommand(file);
  116. }
  117. }
  118. //--------------------------------------------------------------------------
  119. if(dialogid == rcon_8)
  120. {
  121. if(response == 1)
  122. {
  123. new file[128];
  124. format(file, sizeof(file), "rcon_password %s", inputtext);
  125. SendRconCommand(file);
  126. print(file);
  127. }
  128. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement