Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. PrintToChat(client, "Activated superAdmin for %f seconds", time);
  2. TF2_AddCondition(client, TFCond_CanteenCrit, time);
  3. TF2_AddCondition(client, TFCond_SpeedBuffAlly, time);
  4. TF2_AddCondition(client, TFCond_CanteenUber, time);
  5. if (getMedicHealTarget(client) != -1)
  6. {
  7. new Float:rand = GetURandomFloat();
  8. new Float:KritzTime = time / 2 + rand;
  9. new Float:SpeedTime = time / 2 + rand;
  10. new Float:UberTime = time / 2 + rand;
  11. new String:Bonus[16];
  12.  
  13. new Ubercharge = TF_GetUberLevel(client);
  14. TF_SetUberLevel(client, 0.0);
  15.  
  16. if (rand < 0.33) //Kritz bonus
  17. {
  18. KritzTime = (time / 2 + rand * 3) + Ubercharge / (10 + rand);
  19. if (KritzTime > time)
  20. KritzTime = time;
  21. Bonus = "Kritz";
  22. }
  23. else if (rand < 0.66) //Speed bonus
  24. {
  25. SpeedTime = (time / 2 + rand * 3) + Ubercharge / (10 + rand);
  26. if (SpeedTime > time)
  27. SpeedTime = time;
  28. Bonus = "Speed";
  29. }
  30. else //Uber Bonus
  31. {
  32. UberTime = (time / 2 + rand * 3) + Ubercharge / (10 + rand);
  33. if (UberTime > time)
  34. UberTime = time;
  35. Bonus = "Ubercharge";
  36. }
  37.  
  38.  
  39. GetClientName(getMedicHealTarget(client), healTargetName, sizeof(healTargetName));
  40. TF2_AddCondition(getMedicHealTarget(client), TFCond_CanteenCrit, KritzTime);
  41. TF2_AddCondition(getMedicHealTarget(client), TFCond_SpeedBuffAlly, SpeedTime);
  42. TF2_AddCondition(getMedicHealTarget(client), TFCond_CanteenUber, UberTime);
  43. PrintToChatAll("%s's superAdmin was shared through %s's medigun beam into %s!", clientName, clientName, healTargetName);
  44. PrintToChatAll("%s's new superAdmin buffs: Kritz: %f Seconds; Speed: %f Seconds; Ubercharge: %f Seconds;\n - With extra bonus time added to %s", healTargetName, KritzTime, SpeedTime, UberTime, Bonus);
  45. PrintHintTextToAll("%s has become a superAdmin for %f seconds\n%s has gotten a share of the buff", clientName, time, healTargetName);
  46. }
  47. else
  48. {
  49. PrintHintTextToAll("%s has become a superAdmin for %f seconds!", clientName, time);
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement