Guest User

Untitled

a guest
Aug 19th, 2010
116
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //--------------------------------------------ANTI SPAWN KILL BY ANGELO------------------------------//
  2. #include <a_samp>
  3.  
  4. #define COLOR_LIGHTRED 0xF60000AA
  5. #define COLOR_RED 0xAA3333AA
  6. #define COLOR_BLACK2 0x000000AA
  7.  
  8. #define RPG 35 //
  9. #define ROCKET_LAUNCHER 36 //
  10. #define MINIGUN 38 //
  11.  
  12. new bool:protetto[MAX_PLAYERS]=false;
  13. new timer=500;
  14.  
  15. public OnGameModeInit(){
  16. SetTimer("anticheat",timer,1);
  17. return 1;}
  18.  
  19. public OnPlayerSpawn(playerid){
  20. protetto[playerid] = true;
  21. SetTimer("Togli" , 5000 , false);
  22. return 1;}
  23.  
  24. public OnPlayerDeath(playerid , killerid , reason)
  25. {
  26. if(protetto[playerid] == true)
  27. {
  28. GetPlayerName(playerid,name,sizeof(name));
  29. format(string,sizeof(string),"Il Server Ha Kickato %s Per Spawn Kill!!",name);
  30. SendClientMessageToAll(COLOR_RED,string);print(string);
  31. Kick(killerid);
  32. }
  33. return 1;
  34. }
  35.  
  36. forward Togli(playerid);
  37. public Togli(playerid)
  38. {
  39. protetto[playerid] = false;
  40. }
  41.  
  42. forward anticheat(playerid);
  43. public anticheat(playerid){
  44. for(new i=0;i<MAX_PLAYERS;i++){
  45. arma = GetPlayerWeapon(i);
  46. if(arma==ROCKET_LAUNCHER && !IsPlayerAdmin(i) && !IsPlayerNPC(i)){
  47. GetPlayerName(i,name,sizeof(name));
  48. format(string,sizeof(string),"Il Server Ha Kickato %s Per Uso Di RocketLauchet",name);
  49. SendClientMessageToAll(COLOR_LIGHTRED,string);
  50. print(string);
  51. GameTextForPlayer(i,"~r~Rimuovi I Tuoi Hack!!!",2000,4);Kick(i);}
  52.  
  53. arma = GetPlayerWeapon(i);
  54. if(arma==RPG && !IsPlayerAdmin(i) && !IsPlayerNPC(i)){
  55.  
  56. GetPlayerName(i,name,sizeof(name));
  57. format(string,sizeof(string),"Il Server Ha Kickato %s Per Uso Di RPG",name);
  58. SendClientMessageToAll(COLOR_LIGHTRED,string);
  59. print(string);
  60. GameTextForPlayer(i,"~r~Rimuovi I Tuoi Hack!!!",2000,4);Kick(i);}
  61.  
  62. arma = GetPlayerWeapon(i);
  63. if(arma==MINIGUN && !IsPlayerAdmin(i)&& !IsPlayerNPC(i)){
  64. GetPlayerName(i,name,sizeof(name));
  65. format(string,sizeof(string),"Il Server Ha Kickato %s Per Uso Di Minigun",name);
  66. SendClientMessageToAll(COLOR_LIGHTRED,string);
  67. print(string);
  68. GameTextForPlayer(i,"~r~Rimuovi I Tuoi Hack!!!",2000,4);Kick(i);}
  69.  
  70. }
  71. return 1;
  72. }
RAW Paste Data