Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var killcount = 0;
- var waitingTimeout = 0;
- var runTime = Global.Curtime();
- var shouldDraw = 1;
- var waitingClear = 0;
- var drawTime = Global.Curtime();
- var headshot = 0;
- var headshotTime = Global.Curtime();
- var waitingHeadshot = 0;
- setup();
- function onKill() {
- if(!Entity.IsLocalPlayer(Entity.GetEntityFromUserID(Event.GetInt("attacker"))))
- return;
- runTime = Global.Curtime();
- waitingTimeout = 1;
- killcount++;
- if(Event.GetInt("headshot") == 1) {
- Sound.Play("C:\\Program Files (x86)\\Steam\\steamapps\\common\\Counter-Strike Global Offensive\\ot\\scripts\\headshot.wav");
- headshot = 1;
- headshotTime = Global.Curtime();
- waitingHeadshot = 1;
- }
- }
- function draw() {
- screenSize = Render.GetScreenSize();
- if(shouldDraw != 1)
- return;
- if(killcount < 1 || headshot != 1)
- return;
- waitingClear = 1;
- if(killcount == 2) {
- pic = Render.AddTexture("ot/scripts/badge_multi2.tga");
- Render.TexturedRect(screenSize[0]*.5,screenSize[1]*.75,100, 100, pic );
- drawTime = Global.Curtime();
- } else
- if(killcount == 3) {
- pic = Render.AddTexture("ot/scripts/badge_multi3.tga");
- Render.TexturedRect(screenSize[0]*.5,screenSize[1]*.75,100, 100, pic );
- drawTime = Global.Curtime();
- } else
- if(killcount == 4) {
- pic = Render.AddTexture("ot/scripts/badge_multi4.tga");
- Render.TexturedRect(screenSize[0]*.5,screenSize[1]*.75,100, 100, pic );
- drawTime = Global.Curtime();
- } else
- if(killcount >= 5) {
- pic = Render.AddTexture("ot/scripts/badge_multi6.tga");
- Render.TexturedRect(screenSize[0]*.5,screenSize[1]*.75,100, 100, pic );
- drawTime = Global.Curtime();
- }
- if(headshot == 1) {
- pic = Render.AddTexture("ot/scripts/badge_headshot_gold.tga");
- Render.TexturedRect(screenSize[0]*.5,screenSize[1]*.75,100, 100, pic );
- drawTime = Global.Curtime();
- }
- }
- function setup() {
- UI.AddCheckbox("[KS] Enable Killstreaks");
- UI.AddSliderInt("[KS] Killstreaks Timeout", 0,15);
- }
- function check()
- {
- if (waitingTimeout == 1)
- {
- if (Global.Curtime() - runTime > UI.GetValue("Script items", "[KS] Killstreaks Timeout"))
- {
- runTime = Global.Curtime();
- waitingTimeout = 0;
- killcount = 0;
- headshot = 0;
- }
- }
- if(waitingClear == 1)
- {
- if(Global.Curtime() - drawTime > UI.GetValue("Script items", "[KS] Killstreaks Timeout")) {
- drawTime = Global.Curtime();
- shouldDraw = 1;
- waitingClear = 0;
- headshot = 0;
- }
- }
- if(waitingHeadshot == 1) {
- if(Global.Curtime() - headshotTime > (UI.GetValue("Script items", "[KS] Killstreaks Timeout"))) {
- headshot = 0;
- headshotTime = 0;
- waitingHeadshot = 0;
- headshotTime = Global.Curtime();
- }
- }
- }
- Global.RegisterCallback("player_death", "onKill");
- Global.RegisterCallback("Draw", "check");
- Global.RegisterCallback("Draw", "draw");
- /*function drawTexture()
- {
- forumBG = Render.AddTexture("ot/scripts/badge_multi2.tga");
- Render.TexturedRect( 300, 300, 100, 100, forumBG );
- }
- Cheat.RegisterCallback("Draw", "drawTexture");*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement