Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PrintToChat(client, "Activated superAdmin for %f seconds", time);
- TF2_AddCondition(client, TFCond_CanteenCrit, time);
- TF2_AddCondition(client, TFCond_SpeedBuffAlly, time);
- TF2_AddCondition(client, TFCond_CanteenUber, time);
- if (getMedicHealTarget(client) != -1)
- {
- new Float:rand = GetURandomFloat();
- new Float:KritzTime = time / 2 + rand;
- new Float:SpeedTime = time / 2 + rand;
- new Float:UberTime = time / 2 + rand;
- new String:Bonus[16];
- new Ubercharge = TF_GetUberLevel(client);
- TF_SetUberLevel(client, 0.0);
- if (rand < 0.33) //Kritz bonus
- {
- KritzTime = (time / 2 + rand * 3) + Ubercharge / (10 + rand);
- if (KritzTime > time)
- KritzTime = time;
- Bonus = "Kritz";
- }
- else if (rand < 0.66) //Speed bonus
- {
- SpeedTime = (time / 2 + rand * 3) + Ubercharge / (10 + rand);
- if (SpeedTime > time)
- SpeedTime = time;
- Bonus = "Speed";
- }
- else //Uber Bonus
- {
- UberTime = (time / 2 + rand * 3) + Ubercharge / (10 + rand);
- if (UberTime > time)
- UberTime = time;
- Bonus = "Ubercharge";
- }
- GetClientName(getMedicHealTarget(client), healTargetName, sizeof(healTargetName));
- TF2_AddCondition(getMedicHealTarget(client), TFCond_CanteenCrit, KritzTime);
- TF2_AddCondition(getMedicHealTarget(client), TFCond_SpeedBuffAlly, SpeedTime);
- TF2_AddCondition(getMedicHealTarget(client), TFCond_CanteenUber, UberTime);
- PrintToChatAll("%s's superAdmin was shared through %s's medigun beam into %s!", clientName, clientName, healTargetName);
- 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);
- PrintHintTextToAll("%s has become a superAdmin for %f seconds\n%s has gotten a share of the buff", clientName, time, healTargetName);
- }
- else
- {
- PrintHintTextToAll("%s has become a superAdmin for %f seconds!", clientName, time);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement