MasamuneDate

Infantry Boots

Apr 11th, 2018
119
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <fakemeta>
  4. #include <codmod>
  5.  
  6. new bool:ma_perk[33];
  7.  
  8. native cod_register_perk(const nazwa[], const opis[], min_wartosc=0, max_wartosc=0)
  9.  
  10. public plugin_init()
  11. {
  12.     register_plugin("codperk_infantry_boots", "1.0", "fresh")  
  13.     cod_register_perk("Infantry Boots","Immune to mine and rocket")
  14. }
  15.  
  16. public cod_perk_enabled(id, wartosc)
  17. {
  18.     ma_perk[id] = true;
  19. }
  20.  
  21. public cod_perk_disabled(id)
  22. {
  23.     ma_perk[id] = false;
  24. }
  25.  
  26. public DotykMiny(ent, id)
  27. {
  28.     if(!is_valid_ent(ent))
  29.         return;
  30.        
  31.     new attacker = entity_get_edict(ent, EV_ENT_owner);
  32.     if (get_user_team(attacker) != get_user_team(id))
  33.     {
  34.         new Float:fOrigin[3];
  35.         entity_get_vector( ent, EV_VEC_origin, fOrigin);
  36.    
  37.         new iOrigin[3];
  38.         for(new i=0;i<3;i++)
  39.             iOrigin[i] = floatround(fOrigin[i]);
  40.        
  41.         message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
  42.         write_byte(TE_EXPLOSION);
  43.         write_coord(iOrigin[0]);
  44.         write_coord(iOrigin[1]);
  45.         write_coord(iOrigin[2]);
  46.         write_short(sprite_blast);
  47.         write_byte(32);
  48.         write_byte(20);
  49.         write_byte(0);
  50.         message_end();
  51.        
  52.         new entlist[33];
  53.         new numfound = find_sphere_class(ent,"player", 90.0 ,entlist, 32);
  54.        
  55.         for (new i=0; i < numfound; i++)
  56.         {      
  57.             new pid = entlist[i];
  58.            
  59.             if (!is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid) || cod_get_user_perk(id) == cod_get_perkid("Infantry Boots"))
  60.                 continue;
  61.                
  62.             cod_inflict_damage(attacker, pid, 70.0, 0.8, ent, (1<<24));
  63.         }
  64.         remove_entity(ent);
  65.     }
  66. }
  67.  
  68. public DotykRakiety(ent)
  69. {
  70.     if (!is_valid_ent(ent))
  71.         return;
  72.  
  73.     new attacker = entity_get_edict(ent, EV_ENT_owner);
  74.  
  75.  
  76.     new Float:fOrigin[3];
  77.     entity_get_vector(ent, EV_VEC_origin, fOrigin);
  78.  
  79.     new iOrigin[3];
  80.     for(new i=0;i<3;i++)
  81.         iOrigin[i] = floatround(fOrigin[i]);
  82.  
  83.     message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
  84.     write_byte(TE_EXPLOSION);
  85.     write_coord(iOrigin[0]);
  86.     write_coord(iOrigin[1]);
  87.     write_coord(iOrigin[2]);
  88.     write_short(sprite_blast);
  89.     write_byte(32);
  90.     write_byte(20);
  91.     write_byte(0);
  92.     message_end();
  93.  
  94.     new entlist[33];
  95.     new numfound = find_sphere_class(ent, "player", 190.0, entlist, 32);
  96.  
  97.     for (new i=0; i < numfound; i++)
  98.     {
  99.         new pid = entlist[i];
  100.  
  101.         if (!is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid))
  102.             continue;
  103.         cod_inflict_damage(attacker, pid, 55.0, 0.9, ent, (1<<24));
  104.     }
  105.     remove_entity(ent);
  106. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×