Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.41 KB | None | 0 0
  1. public CheckAccountUserName(extraid)
  2. {
  3. cache_get_data(rows, fields, handle);
  4. if(rows == 0)
  5. {
  6. new charCounts[5];
  7.  
  8. GetPlayerName(extraid, szPlayerName, MAX_PLAYER_NAME);
  9. for(new n; n < MAX_PLAYER_NAME; n++)
  10. {
  11. switch(szPlayerName[n])
  12. {
  13. case '[', ']', '.', '$', '(', ')', '@', '=': charCounts[1]++;
  14. case '_': charCounts[0]++;
  15. case '0' .. '9': charCounts[2]++;
  16. case 'a' .. 'z': charCounts[3]++;
  17. case 'A' .. 'Z': charCounts[4]++;
  18. }
  19. if(charCounts[0] == 0 || charCounts[0] >= 3)
  20. {
  21. SendClientMessage(extraid, COLOR_WHITE, "");
  22. SendClientMessage(extraid, COLOR_WHITE, "");
  23. SendClientMessage(extraid, COLOR_WHITE, "");
  24. SendClientMessage(extraid, COLOR_WHITE, "");
  25. SendClientMessage(extraid, COLOR_WHITE, "");
  26. SendClientMessage(extraid, COLOR_WHITE, "");
  27. SendClientMessage(extraid, COLOR_WHITE, "");
  28. SendClientMessage(extraid, COLOR_WHITE, "");
  29. SendClientMessage(extraid, COLOR_WHITE, "");
  30. SendClientMessage(extraid, COLOR_WHITE, "");
  31. SendClientMessage(extraid, COLOR_WHITE, "");
  32. SendClientMessage(extraid, COLOR_WHITE, "");
  33. SendClientMessage(extraid, COLOR_WHITE, "");
  34. SendClientMessage(extraid, COLOR_WHITE, "");
  35. SendClientMessage(extraid, COLOR_WHITE, "");
  36. SendClientMessage(extraid, COLOR_WHITE, "");
  37. SendClientMessage(extraid, COLOR_WHITE, "");
  38. SendClientMessage(extraid, COLOR_WHITE, "");
  39. SendClientMessage(extraid, COLOR_WHITE, "");
  40. SendClientMessage(extraid, COLOR_WHITE, "");
  41. SendClientMessage(extraid, COLOR_GENANNOUNCE, ""ALBASTRU"Server:{FFFFFF} Bine ai venit pe "SERVER_NAME".");
  42. ShowPlayerDialog(extraid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Inregistrare", ""ALB"Bine ai venit pe "ALBASTRU""SERVER_NAME""ALB"!\n\nNu detii un cont.\nTe rog sa inregistrezi contul tau tastand o parola mai jos.", "Register", "Cancel");
  43. }
  44. else if(charCounts[1] >= 1)
  45. {
  46. SendClientMessage(extraid, COLOR_WHITE, "");
  47. SendClientMessage(extraid, COLOR_WHITE, "");
  48. SendClientMessage(extraid, COLOR_WHITE, "");
  49. SendClientMessage(extraid, COLOR_WHITE, "");
  50. SendClientMessage(extraid, COLOR_WHITE, "");
  51. SendClientMessage(extraid, COLOR_WHITE, "");
  52. SendClientMessage(extraid, COLOR_WHITE, "");
  53. SendClientMessage(extraid, COLOR_WHITE, "");
  54. SendClientMessage(extraid, COLOR_WHITE, "");
  55. SendClientMessage(extraid, COLOR_WHITE, "");
  56. SendClientMessage(extraid, COLOR_WHITE, "");
  57. SendClientMessage(extraid, COLOR_WHITE, "");
  58. SendClientMessage(extraid, COLOR_WHITE, "");
  59. SendClientMessage(extraid, COLOR_WHITE, "");
  60. SendClientMessage(extraid, COLOR_WHITE, "");
  61. SendClientMessage(extraid, COLOR_WHITE, "");
  62. SendClientMessage(extraid, COLOR_WHITE, "");
  63. SendClientMessage(extraid, COLOR_WHITE, "");
  64. SendClientMessage(extraid, COLOR_WHITE, "");
  65. SendClientMessage(extraid, COLOR_WHITE, "");
  66. SendClientMessage(extraid, COLOR_GENANNOUNCE, ""ALBASTRU"Server:{FFFFFF} Bine ai venit pe "SERVER_NAME".");
  67. ShowPlayerDialog(extraid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Inregistrare", ""ALB"Bine ai venit pe "ALBASTRU""SERVER_NAME""ALB"!\n\nNu detii un cont.\nTe rog sa inregistrezi contul tau tastand o parola mai jos.", "Register", "Cancel");
  68. }
  69. else if(charCounts[2] >= 1)
  70. {
  71. SendClientMessage(extraid, COLOR_WHITE, "");
  72. SendClientMessage(extraid, COLOR_WHITE, "");
  73. SendClientMessage(extraid, COLOR_WHITE, "");
  74. SendClientMessage(extraid, COLOR_WHITE, "");
  75. SendClientMessage(extraid, COLOR_WHITE, "");
  76. SendClientMessage(extraid, COLOR_WHITE, "");
  77. SendClientMessage(extraid, COLOR_WHITE, "");
  78. SendClientMessage(extraid, COLOR_WHITE, "");
  79. SendClientMessage(extraid, COLOR_WHITE, "");
  80. SendClientMessage(extraid, COLOR_WHITE, "");
  81. SendClientMessage(extraid, COLOR_WHITE, "");
  82. SendClientMessage(extraid, COLOR_WHITE, "");
  83. SendClientMessage(extraid, COLOR_WHITE, "");
  84. SendClientMessage(extraid, COLOR_WHITE, "");
  85. SendClientMessage(extraid, COLOR_WHITE, "");
  86. SendClientMessage(extraid, COLOR_WHITE, "");
  87. SendClientMessage(extraid, COLOR_WHITE, "");
  88. SendClientMessage(extraid, COLOR_WHITE, "");
  89. SendClientMessage(extraid, COLOR_WHITE, "");
  90. SendClientMessage(extraid, COLOR_WHITE, "");
  91. SendClientMessage(extraid, COLOR_GENANNOUNCE, ""ALBASTRU"Server:{FFFFFF} Bine ai venit pe "SERVER_NAME".");
  92. ShowPlayerDialog(extraid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Inregistrare", ""ALB"Bine ai venit pe "ALBASTRU""SERVER_NAME""ALB"!\n\nNu detii un cont.\nTe rog sa inregistrezi contul tau tastand o parola mai jos.", "Register", "Cancel");
  93. }
  94. else if(charCounts[3] == strlen(szPlayerName) - 1)
  95. {
  96. SendClientMessage(extraid, COLOR_WHITE, "");
  97. SendClientMessage(extraid, COLOR_WHITE, "");
  98. SendClientMessage(extraid, COLOR_WHITE, "");
  99. SendClientMessage(extraid, COLOR_WHITE, "");
  100. SendClientMessage(extraid, COLOR_WHITE, "");
  101. SendClientMessage(extraid, COLOR_WHITE, "");
  102. SendClientMessage(extraid, COLOR_WHITE, "");
  103. SendClientMessage(extraid, COLOR_WHITE, "");
  104. SendClientMessage(extraid, COLOR_WHITE, "");
  105. SendClientMessage(extraid, COLOR_WHITE, "");
  106. SendClientMessage(extraid, COLOR_WHITE, "");
  107. SendClientMessage(extraid, COLOR_WHITE, "");
  108. SendClientMessage(extraid, COLOR_WHITE, "");
  109. SendClientMessage(extraid, COLOR_WHITE, "");
  110. SendClientMessage(extraid, COLOR_WHITE, "");
  111. SendClientMessage(extraid, COLOR_WHITE, "");
  112. SendClientMessage(extraid, COLOR_WHITE, "");
  113. SendClientMessage(extraid, COLOR_WHITE, "");
  114. SendClientMessage(extraid, COLOR_WHITE, "");
  115. SendClientMessage(extraid, COLOR_WHITE, "");
  116. SendClientMessage(extraid, COLOR_GENANNOUNCE, ""ALBASTRU"Server:{FFFFFF} Bine ai venit pe "SERVER_NAME".");
  117. ShowPlayerDialog(extraid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Inregistrare", ""ALB"Bine ai venit pe "ALBASTRU""SERVER_NAME""ALB"!\n\nNu detii un cont.\nTe rog sa inregistrezi contul tau tastand o parola mai jos.", "Register", "Cancel");
  118. }
  119. else if(charCounts[4] == strlen(szPlayerName) - 1)
  120. {
  121. SendClientMessage(extraid, COLOR_WHITE, "");
  122. SendClientMessage(extraid, COLOR_WHITE, "");
  123. SendClientMessage(extraid, COLOR_WHITE, "");
  124. SendClientMessage(extraid, COLOR_WHITE, "");
  125. SendClientMessage(extraid, COLOR_WHITE, "");
  126. SendClientMessage(extraid, COLOR_WHITE, "");
  127. SendClientMessage(extraid, COLOR_WHITE, "");
  128. SendClientMessage(extraid, COLOR_WHITE, "");
  129. SendClientMessage(extraid, COLOR_WHITE, "");
  130. SendClientMessage(extraid, COLOR_WHITE, "");
  131. SendClientMessage(extraid, COLOR_WHITE, "");
  132. SendClientMessage(extraid, COLOR_WHITE, "");
  133. SendClientMessage(extraid, COLOR_WHITE, "");
  134. SendClientMessage(extraid, COLOR_WHITE, "");
  135. SendClientMessage(extraid, COLOR_WHITE, "");
  136. SendClientMessage(extraid, COLOR_WHITE, "");
  137. SendClientMessage(extraid, COLOR_WHITE, "");
  138. SendClientMessage(extraid, COLOR_WHITE, "");
  139. SendClientMessage(extraid, COLOR_WHITE, "");
  140. SendClientMessage(extraid, COLOR_WHITE, "");
  141. SendClientMessage(extraid, COLOR_GENANNOUNCE, ""ALBASTRU"Server:{FFFFFF} Bine ai venit pe "SERVER_NAME".");
  142. ShowPlayerDialog(extraid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Inregistrare", ""ALB"Bine ai venit pe "ALBASTRU""SERVER_NAME""ALB"!\n\nNu detii un cont.\nTe rog sa inregistrezi contul tau tastand o parola mai jos.", "Register", "Cancel");
  143. }
  144. else
  145. {
  146. SendClientMessage(extraid, COLOR_WHITE, "");
  147. SendClientMessage(extraid, COLOR_WHITE, "");
  148. SendClientMessage(extraid, COLOR_WHITE, "");
  149. SendClientMessage(extraid, COLOR_WHITE, "");
  150. SendClientMessage(extraid, COLOR_WHITE, "");
  151. SendClientMessage(extraid, COLOR_WHITE, "");
  152. SendClientMessage(extraid, COLOR_WHITE, "");
  153. SendClientMessage(extraid, COLOR_WHITE, "");
  154. SendClientMessage(extraid, COLOR_WHITE, "");
  155. SendClientMessage(extraid, COLOR_WHITE, "");
  156. SendClientMessage(extraid, COLOR_WHITE, "");
  157. SendClientMessage(extraid, COLOR_WHITE, "");
  158. SendClientMessage(extraid, COLOR_WHITE, "");
  159. SendClientMessage(extraid, COLOR_WHITE, "");
  160. SendClientMessage(extraid, COLOR_WHITE, "");
  161. SendClientMessage(extraid, COLOR_WHITE, "");
  162. SendClientMessage(extraid, COLOR_WHITE, "");
  163. SendClientMessage(extraid, COLOR_WHITE, "");
  164. SendClientMessage(extraid, COLOR_WHITE, "");
  165. SendClientMessage(extraid, COLOR_WHITE, "");
  166. SendClientMessage(extraid, COLOR_GENANNOUNCE, ""ALBASTRU"Server:{FFFFFF} Bine ai venit pe "SERVER_NAME".");
  167. ShowPlayerDialog(extraid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Inregistrare", ""ALB"Bine ai venit pe "ALBASTRU""SERVER_NAME""ALB"!\n\nNu detii un cont.\nTe rog sa inregistrezi contul tau tastand o parola mai jos.", "Register", "Cancel");
  168. }
  169. }
  170. }
  171. else
  172. {
  173. if(tempbanat[extraid] == 0)
  174. {
  175. InterpolateCameraPos(extraid, 1689.3907,-1732.2874,20.3228,1062.3051,-1732.3589,24.6772, 10000, CAMERA_MOVE);
  176. InterpolateCameraLookAt(extraid,1062.3051,-1732.3589,24.6772,1062.3051,-1732.3589,24.6772, 10000, CAMERA_MOVE);
  177.  
  178. SendClientMessage(extraid, COLOR_GENANNOUNCE, ""ALBASTRU"Server:{FFFFFF} Bine ai venit pe "SERVER_NAME".");
  179. ShowPlayerDialog(extraid, 55, DIALOG_STYLE_PASSWORD, "Logare", ""ALB"Bine ai venit pe "ALBASTRU""SERVER_NAME""ALB" !\n\nVa rugam sa scrieti parola mai jos pentru a va conecta pe server.", "Login", "Cancel");
  180.  
  181. SetPlayerWeather(extraid, 0);
  182. }
  183. }
  184. return 1;
  185. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement