Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. //Antihack
  2. #include <a_samp>
  3. #include<zcmd>
  4. #define COLOR_YELLOW "{FFFF00}"
  5. new Text:banmessage;
  6. new dm[MAX_PLAYERS];
  7.  
  8. public OnFilterScriptInit()
  9. {
  10. printf("Anti Minigun By [A]Gamer_007 is loading now");
  11. printf("Anti Minigun By [A]Gamer_007 loaded");
  12. printf("NO WEAPON HACKS IN YOUR SERVER.ENJOY");
  13.  
  14.  
  15. banmessage = TextDrawCreate(190,200,"~r~Nice Hacks but Here they are not allowed.~n~~y~You are banned from this server.");
  16. TextDrawFont(banmessage, 2);
  17. TextDrawLetterSize(banmessage, 0.6, 1.0);
  18. TextDrawSetShadow(banmessage, 0);
  19. TextDrawSetOutline(banmessage, 1);
  20. return 1;
  21. }
  22.  
  23. stock PlayerName(playerid)
  24. {
  25. new name[MAX_PLAYER_NAME];
  26. GetPlayerName(playerid, name, sizeof(name));
  27. return name;
  28. }
  29. CMD:dm1(playerid,parms[])
  30. {
  31. dm[playerid] = 1;//set a palyer dm value to 1
  32. return 1;
  33. }
  34. public OnPlayerUpdate(playerid)
  35. {
  36. if(dm[playerid] == 1){
  37. return 1;
  38. }
  39. else
  40. {
  41. new string[128];
  42. new Weapon = GetPlayerWeapon(playerid);
  43. new Ammo = GetPlayerAmmo(playerid);
  44. GetPlayerWeaponData(playerid, 7, Weapon,Ammo);
  45. if(Weapon == 38 && !IsPlayerAdmin(playerid)) {
  46. format(string,128,"{FF0000}%s[%d] Has Been Banned From Server.[Reason: Minigun Hack]",PlayerName(playerid),playerid);
  47. GameTextForPlayer(playerid,"~n~~n~~n~~n~~r~Nice Hacks but Here they are not allowed.~n~~y~You are banned from this server.",3000,3);
  48. SendClientMessageToAll(0xFF0000AA,string);
  49. TextDrawHideForPlayer(playerid, banmessage);
  50. TogglePlayerControllable(playerid,0);
  51. Ban(playerid);
  52. }
  53.  
  54. GetPlayerWeaponData(playerid, 7, Weapon,Ammo);
  55. if(Weapon == 36 && !IsPlayerAdmin(playerid)) {
  56. format(string,128,"{FF0000}%s[%d] Has Been Banned From Server.[Reason: Heat Saker Hack]",PlayerName(playerid),playerid);
  57. SendClientMessageToAll(0xFF0000AA,string);
  58. GameTextForPlayer(playerid,"~n~~n~~n~~n~~r~Nice Hacks but Here they are not allowed.~n~~y~You are banned from this server.",3000,3);
  59. TextDrawHideForPlayer(playerid, banmessage);
  60. TogglePlayerControllable(playerid,0);
  61. Ban(playerid);
  62. }
  63.  
  64.  
  65. if(Weapon == 35 && !IsPlayerAdmin(playerid)) {
  66. format(string,128,"{FF0000}%s[%d] Has Been Banned From Server.[Reason: Rocket Launcher Hack]",PlayerName(playerid),playerid);
  67. SendClientMessageToAll(0xFF0000AA,string);
  68. TextDrawHideForPlayer(playerid, banmessage);
  69. GameTextForPlayer(playerid,"~n~~n~~n~~n~~r~Nice Hacks but Here they are not allowed.~n~~y~You are banned from this server.",3000,3);
  70. TogglePlayerControllable(playerid,0);
  71. Ban(playerid);
  72. }
  73. }
  74. return 1;
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement