Advertisement
RyanCordell

StrParam messery

Sep 2nd, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function int HandleCassattDamage(int respawning)
  2. {
  3.     if (CheckInventory("CassattClass") == 1)
  4.     {
  5.         for(int def = -10; def < 31; def++)
  6.         {
  7.             if (GetCvar("samsara_cassattdamage") != def)
  8.             {
  9.                 str powdef = "PowerDamageBuff";
  10.                 int powdef_obj = strparam(s:powdef,i:def);
  11.                 TakeInventory(powdef_obj,1);
  12.             }
  13.             if (GetCvar("samsara_cassattdamage") == def)
  14.             {
  15.                 str powdef = "PowerDamageBuff";
  16.                 int powdef_obj = strparam(s:powdef,i:def);
  17.                 GiveInventory(powdef_obj,1);
  18.             }
  19.         }
  20.     }
  21.     return 1;
  22. }
  23.  
  24. function int HandleCassattDefense(int respawning)
  25. {
  26.     if (CheckInventory("CassattClass") == 1)
  27.     {
  28.         for(int def = -10; def < 21; def++)
  29.         {
  30.             if (GetCvar("samsara_cassattdefense") != def)
  31.             {
  32.                 str powdef = "PowerDefenseBuff";
  33.                 int powdef_obj = strparam(s:powdef,i:def);
  34.                 TakeInventory(powdef_obj,1);
  35.             }
  36.             if (GetCvar("samsara_cassattdefense") == def)
  37.             {
  38.                 str powdef = "PowerDefenseBuff";
  39.                 int powdef_obj = strparam(s:powdef,i:def);
  40.                 GiveInventory(powdef_obj,1);
  41.             }
  42.         }
  43.     }
  44.     return 1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement