Facebook
From daniel santos, 3 Years ago, written in C++.
Embed
Download Paste or View Raw
Hits: 154
  1.  
  2. // variaveis
  3. new AntiBH[MAX_PLAYERS];
  4.  
  5. new AntiTomboFlood[MAX_PLAYERS];
  6.  
  7. //ClearPlayerArrays
  8.  
  9. AntiTomboFlood[playerid] = 0;
  10.  
  11.  
  12.  
  13.  
  14. //crie um settime ou coloque em um existente
  15. if(AntiBH[playerid] >= 0) AntiBH[playerid]--;
  16. if(AntiTomboFlood[playerid] > 0) AntiTomboFlood[playerid] --;
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.         if(newkeys & 32 && GetPlayerState(playerid) == 1)
  43.         {
  44.             if(newkeys & 128) return 1;
  45.             AntiBH[playerid] ++;
  46.             if(AntiBH[playerid] >= 5 && !AntiTomboFlood[playerid])
  47.                 {
  48.                 AntiTomboFlood[playerid] = 10;
  49.    ApplyAnimationEx(playerid,"PARACHUTE","FALL_skyDive_DIE",4.1,0,0,1,0,2000);
  50.                         ApplyAnimationEx(playerid,"PARACHUTE","FALL_skyDive_DIE",4.1,0,0,1,0,2000);
  51.                         ApplyAnimationEx(playerid,"PARACHUTE","FALL_skyDive_DIE",4.1,0,0,1,0,2000);
  52.                         AntiBH[playerid] = 0; format(string,sizeof(string),"* %s levou um tombo.",Nome(playerid));
  53.                         ProxDetector(15.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  54.             //SendClientMessage(playerid, COLOR_WHITE, "* VocĂȘ caiu e acabou se ralando na queda.");
  55.                         //GameTextForPlayer(playerid, "~r~-2 health", 2000, 1); new Float:health;
  56.                         //GetPlayerHealth(playerid, health); SetPlayerHealthEx(playerid, health-2);
  57.                 }
  58.                 return 1;
  59.         }