Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2012
3,698
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.29 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3.  
  4.  
  5. #define VERMELHO 0xFF0000AA
  6. #define CHECKING_INT 1000
  7. #define MAXPING 300
  8.  
  9. static
  10. iPlayerChatTime[MAX_PLAYERS];
  11. new msg[281];
  12. new
  13. vehicleTime[MAX_PLAYERS],
  14. lastVehicle[MAX_PLAYERS]
  15. ;
  16. forward CheckMoney();
  17. new AntiNomeBot[][] =
  18. {
  19. "con.","com1","com2","com3","com4","com5","com6","com7","com8","com9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7",
  20. "lpt8","lpt9","nul","clock$","aux","prn","con","Carl","Rocky","Pepe","Arnoldo","SgtPepper","Pepsi""Pepno","Azucar",
  21. "Vino_Toro","Zoquete","Pacman","Batman","AquilesBrinco","Manfrey","Sopapeala","Papirola","Sony","[ViP]Labrik","Justin_Bieber",
  22. "[MT]Lavis","Gil_Henrique","Server_Lixo","Justin_Biba","Justin_Viadinho","Advanced_Lixo"
  23. };
  24.  
  25. public OnFilterScriptInit()
  26. {
  27. print("\n- Ligando FS -");
  28. return 1;
  29. }
  30.  
  31. public OnFilterScriptExit()
  32. {
  33. print("\n- Desligando FS -");
  34. return 1;
  35. }
  36. main()
  37. {
  38. print("\n----------------------------------");
  39. print("----------------------------------\n");
  40. }
  41.  
  42. public OnPlayerConnect(playerid)
  43. {
  44. new nomedocara3[MAX_PLAYER_NAME];
  45. GetPlayerName(playerid, nomedocara3, sizeof(nomedocara3));
  46. for(new n; n < sizeof(AntiNomeBot); ++n)
  47. {
  48. if(!strcmp(nomedocara3, AntiNomeBot[n], true))
  49. {
  50. Kick(playerid, "NOOOB , Nome Impropio.");
  51. return 1;
  52. }
  53. }
  54. return 1;
  55. }
  56. public OnPlayerText(playerid, text[])
  57. {
  58. if(IsPlayerFlooding(playerid) && !IsPlayerAdmin(playerid))
  59. {
  60. return 0;
  61. }
  62. iPlayerChatTime[playerid] = GetTickCount();
  63. return 0;
  64. }
  65. public OnPlayerUpdate(playerid)
  66. {
  67. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
  68.  
  69. {
  70. new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
  71. format(msg, sizeof(msg), "[Atençao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Hacker Jetpack]", pname, playerid);
  72. SendClientMessageToAll(0xFF0000AA, msg);
  73. Kick(playerid);
  74. }
  75. else if(GetPlayerWeapon(playerid) == 35)
  76. {
  77. new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
  78. format(msg, sizeof(msg), "[Atençao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
  79. SendClientMessageToAll(0xFF0000AA, msg);
  80. Kick(playerid);
  81. }
  82. else if(GetPlayerWeapon(playerid) == 36)
  83. {
  84. new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
  85. format(msg, sizeof(msg), "[Atençao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
  86. SendClientMessageToAll(0xFF0000AA, msg);
  87. Kick(playerid);
  88. }
  89. else if(GetPlayerWeapon(playerid) == 37)
  90. {
  91. new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
  92. format(msg, sizeof(msg), "[Atençao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
  93. SendClientMessageToAll(0xFF0000AA, msg);
  94. Kick(playerid);
  95.  
  96. }
  97. else if(GetPlayerWeapon(playerid) == 38)
  98. {
  99. new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
  100. format(msg, sizeof(msg), "[Atençao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
  101. SendClientMessageToAll(0xFF0000AA, msg);
  102. Kick(playerid);
  103.  
  104. }
  105. else if(GetPlayerWeapon(playerid) == 39)
  106. {
  107. new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
  108. format(msg, sizeof(msg), "[Atençao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
  109. SendClientMessageToAll(0xFF0000AA, msg);
  110. Kick(playerid);
  111. }
  112. else if(GetPlayerWeapon(playerid) == 40)
  113. {
  114. new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
  115. format(msg, sizeof(msg), "[Atençao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
  116. SendClientMessageToAll(0xFF0000AA, msg);
  117. Kick(playerid);
  118. }
  119. new vehicleID = GetPlayerVehicleID(playerid);
  120. if(lastVehicle[playerid] != vehicleID)
  121. {
  122. lastVehicle[playerid] = vehicleID;
  123. if(GetVehicleModel(vehicleID))
  124. {
  125. CallRemoteFunction("OnPlayerChangeVehicle","ii", playerid, vehicleID);
  126. }
  127. }
  128. return 1;
  129. }
  130. public OnPlayerDeath(playerid, killerid, reason)
  131. {
  132. return 1;
  133. }
  134. public OnRconLoginAttempt(ip[], password[], success)
  135. {
  136. new pip[16];
  137. for(new i=0; i<MAX_PLAYERS; i++)
  138. {
  139. GetPlayerIp(i, pip, sizeof(pip));
  140. if(!strcmp(ip, pip, true))
  141. {
  142. Kick(i, "/RCON LOGIN");
  143. }
  144. }
  145. return 1;
  146. }
  147. stock GivePlayerCash(playerid, quantia)
  148. {
  149. GivePlayerMoney(playerid, quantia);
  150. SetPVarInt(playerid, "Dinheiro", GetPlayerMoney(playerid));
  151. }
  152. public CheckMoney()
  153. {
  154. new strmsg[128], pName[MAX_PLAYER_NAME];
  155. for(new i = 0; i < MAX_PLAYERS; i++)
  156. {
  157. if(GetPlayerMoney(i) > GetPVarInt(i, "Dinheiro"))
  158. {
  159. GetPlayerName(i, pName, sizeof(pName));
  160. format(strmsg, sizeof(strmsg), "[WS Money Hacker]: O Player %s foi Kickado por fazer money hacker !", pName);
  161. SendClientMessageToAll(0xE3E3E3FF, strmsg);
  162. Kick(i);
  163. }
  164. }
  165. }
  166. forward OnPlayerChangeVehicle(playerid, vehicleid);
  167. public OnPlayerChangeVehicle(playerid, vehicleid)
  168. {
  169. #pragma unused vehicleid
  170. if((GetTickCount() - vehicleTime[playerid]) < 250)
  171. {
  172. Kick(playerid);
  173. }
  174.  
  175. vehicleTime[playerid] = GetTickCount();
  176. }
  177. stock checaDivulguer(playerid, texto[]) {
  178. new ccount[3];
  179. for(new i; i < strlen(texto); ++i) switch(texto[i]) {
  180. case '0' .. '9': ccount[0]++; case '.': ccount[1]++; case ':': ccount[2]++;
  181. }
  182. new string[128];
  183. if(ccount[0] > 8 && ccount[1] >= 3 && ccount[2] >= 1) {
  184. format(string,sizeof(string),"[ antiDivulgadores ] %s foi Kickado por divulgar.", rNome(playerid));
  185. Kick(playerid, texto);
  186. SendClientMessageToAll(string, -1);
  187. }
  188. return 1;
  189. }
  190.  
  191. stock rNome(playerid) {
  192. new nome[24]; GetPlayerName(playerid, nome, 24); return nome;
  193. }
  194. forward CheckPing(playerid);
  195. public CheckPing(playerid)
  196. {
  197. if(GetPlayerPing(playerid) > MAXPING)
  198. {
  199. SendClientMessage(playerid,-1,"Você foi kickado do Servidor, pois seu ping ultrapassou o limite de 300");
  200. Kick(playerid);
  201. }
  202. return true;
  203. }
  204. stock IsPlayerFlooding(playerid)
  205. {
  206. if(GetTickCount() - iPlayerChatTime[playerid] < 2000)
  207. return 1;
  208. return 0;
  209. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement