Results 1 to 15 of 15
  1. #1
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,538
    My Mood
    Angelic

    Make Custom KillStreaks

    NB: I didn't make the code ( Credits below )

    Code here:

    Code:
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    doKillstreaks()  
    {
    	self endon ("death");
     
    	self.startscore = self.pers["kills"];
    	
        while(1) {
            if(self.killcount != self.pers["kills"] - self.startscore) {
                self.killcount = self.pers["kills"] - self.startscore;
                switch(self.killcount) 
    			{
    			case 1: 
    				self notify("newstreak");
    //You add the action here...
    				break;
    			case 2: 
    				self notify("newstreak");
    //You add the action here...
    				break;
                }
    		}
            wait 0.05;
    	}
    }
    Make an new GSC file in folder with the _rank.gsc , call the new named file:
    _mykillstreaks.gsc
    In the doDvars or OnPlayerSpawned
    Add this:
    self thread maps\mp\gametypes\_mykillstreaks::doKillstreaks();
    This makes the main file get "info" from another file.

    So this is it, hope its helpful.

    Credits:
    H4RDC0R3
    Rowan
    Me for Show you
    Last edited by Jorndel; 04-27-2011 at 12:33 PM. Reason: Type falt by me.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  2. The Following 4 Users Say Thank You to Jorndel For This Useful Post:

    .:MUS1CFR34K:. (04-26-2011),Blackaiser (04-27-2011),FireHero (04-26-2011),JustAndy (01-11-2012)

  3. #2
    .:MUS1CFR34K:.'s Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    room 666
    Posts
    215
    Reputation
    12
    Thanks
    34
    My Mood
    Sneaky
    thx alot dude i'm gonna use it for my ai zombie mod

  4. #3
    lolkop123's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    Does that code need to be in _mykillstreaks.gsc or in _rank.gsc ?

  5. #4
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    155
    Custom not "Costume" :3

  6. #5
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,538
    My Mood
    Angelic
    Quote Originally Posted by lolkop123 View Post
    Does that code need to be in _mykillstreaks.gsc or in _rank.gsc ?
    Well, Its the best. But if you want to but it in. Sure, just add it as an normal thread and not the other things....

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  7. #6
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,538
    My Mood
    Angelic
    *Fixed the Type falt.
    EDIT: I faild.....

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  8. #7
    .:MUS1CFR34K:.'s Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    room 666
    Posts
    215
    Reputation
    12
    Thanks
    34
    My Mood
    Sneaky
    a question how can i adjust it so when i kill 5 ppl i get my 1st killstreak and when i kill 7 i get second this is just an example hope you understand what i mean

  9. #8
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,538
    My Mood
    Angelic
    Quote Originally Posted by .:MUS1CFR34K:. View Post
    a question how can i adjust it so when i kill 5 ppl i get my 1st killstreak and when i kill 7 i get second this is just an example hope you understand what i mean
    Code:
    doKillstreaks()  
    {
    	self endon ("death");
     
    	self.startscore = self.pers["kills"];
    	
        while(1) {
            if(self.killcount != self.pers["kills"] - self.startscore) {
                self.killcount = self.pers["kills"] - self.startscore;
                switch(self.killcount) 
    			{
    			case 1: // The case means what the killstreak have to be, in this case, it is 1
    				self notify("newstreak");
    //You add the action here...
    				break;
    			case 2: 
    				self notify("newstreak");
    //You add the action here...
    				break;
    			case 7: // Need 7 KS..
    				self notify("newstreak");
    //You add the action here...
    				break;
                }
    		}
            wait 0.05;
    	}
    }

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  10. The Following User Says Thank You to Jorndel For This Useful Post:

    .:MUS1CFR34K:. (04-28-2011)

  11. #9
    .:MUS1CFR34K:.'s Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    room 666
    Posts
    215
    Reputation
    12
    Thanks
    34
    My Mood
    Sneaky
    ok i got the killstreak done its ranger unlimited ammo super speed and 500 health

    killstreak works but wont end until i die any suggestions?
    Last edited by .:MUS1CFR34K:.; 04-28-2011 at 10:24 AM.
    () = not yet
    () = impossible
    () almost done
    () done and done

    100 posts ()
    200 posts ()
    99999999999 posts ()
    make a mod ()
    make a hack ()
    make a program ()
    get a life ()
    get 127 kills 17 deaths on rust ()
    get 240 kills 13 deaths on rust ()
    make a skin ()

    waiting for someone to help me fix my shit http://www.mpgh.net/forum/323-call-d...ax-errors.html

    enjoy the nightmare bitch

  12. #10
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,538
    My Mood
    Angelic

    You can do like this:

    doKillstreaks()
    {
    self endon ("death");

    self.startscore = self.pers["kills"];

    while(1) {
    if(self.killcount != self.pers["kills"] - self.startscore) {
    self.killcount = self.pers["kills"] - self.startscore;
    switch(self.killcount)
    {
    case 1:
    self notify("newstreak");
    self thread KS1();
    break;
    case 2:
    self notify("newstreak");
    self thread KS2();
    break;
    }
    }
    wait 0.05;
    }
    }
    And make threads like:

    KS1()
    {
    self thread maps\mp\gametypes\_hud_message::hintMessage("^7 1 killstreak press 6 for rage");
    self giveweapon("ak47_mp", 1, false);
    }

    ( And it will be no need to press to get, give auto when you got 1 killstreak. )

    Or as you asked:
    doKillstreaks()
    {
    self endon ("death");

    self.startscore = self.pers["kills"];

    while(1) {
    if(self.killcount != self.pers["kills"] - self.startscore) {
    self.killcount = self.pers["kills"] - self.startscore;
    switch(self.killcount)
    {
    case 1:
    self notify("newstreak");
    self thread maps\mp\gametypes\_hud_message::hintMessage("^7 1 killstreak press 6 for rage");
    break;
    case 2:
    self notify("newstreak");
    self thread maps\mp\gametypes\_hud_message::hintMessage("^7 2 killstreak press 6 for rage");
    break;
    }
    }
    wait 0.05;
    }
    }

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  13. #11
    .:MUS1CFR34K:.'s Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    room 666
    Posts
    215
    Reputation
    12
    Thanks
    34
    My Mood
    Sneaky
    Quote Originally Posted by jorndel View Post
    And make threads like:




    ( And it will be no need to press to get, give auto when you got 1 killstreak. )

    Or as you asked:
    i got that figured out by my own but now i got a new problem my killstreak works but wont end untill i die
    btw i made it like this at the end
    wait 30;
    self notify (text thing blablablba <=== just an example
    break

    my guess is that i need to add another wait after text stuff am i correct?
    () = not yet
    () = impossible
    () almost done
    () done and done

    100 posts ()
    200 posts ()
    99999999999 posts ()
    make a mod ()
    make a hack ()
    make a program ()
    get a life ()
    get 127 kills 17 deaths on rust ()
    get 240 kills 13 deaths on rust ()
    make a skin ()

    waiting for someone to help me fix my shit http://www.mpgh.net/forum/323-call-d...ax-errors.html

    enjoy the nightmare bitch

  14. #12
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,538
    My Mood
    Angelic
    Quote Originally Posted by .:MUS1CFR34K:. View Post
    i got that figured out by my own but now i got a new problem my killstreak works but wont end untill i die
    btw i made it like this at the end
    wait 30;
    self notify (text thing blablablba <=== just an example
    break

    my guess is that i need to add another wait after text stuff am i correct?
    What you mean?

    You mane:

    That your text keep spaming?
    Or ?

    Cuse it will Break: = Pause the thread / function ( Like here, it will pause until the player get the next killstreak, or die )

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  15. #13
    .:MUS1CFR34K:.'s Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    room 666
    Posts
    215
    Reputation
    12
    Thanks
    34
    My Mood
    Sneaky
    Quote Originally Posted by jorndel View Post
    What you mean?

    You mane:

    That your text keep spaming?
    Or ?

    Cuse it will Break: = Pause the thread / function ( Like here, it will pause until the player get the next killstreak, or die )
    ok here is what i've done i made it so its only 1 killstreak at 0kills
    i did that just for testing
    my problem is that killstreak doesnt end untill i die
    so you say i gotta make more killstreaks?
    btw i have the break code at the end
    () = not yet
    () = impossible
    () almost done
    () done and done

    100 posts ()
    200 posts ()
    99999999999 posts ()
    make a mod ()
    make a hack ()
    make a program ()
    get a life ()
    get 127 kills 17 deaths on rust ()
    get 240 kills 13 deaths on rust ()
    make a skin ()

    waiting for someone to help me fix my shit http://www.mpgh.net/forum/323-call-d...ax-errors.html

    enjoy the nightmare bitch

  16. #14
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,538
    My Mood
    Angelic
    Quote Originally Posted by .:MUS1CFR34K:. View Post
    ok here is what i've done i made it so its only 1 killstreak at 0kills
    i did that just for testing
    my problem is that killstreak doesnt end untill i die
    so you say i gotta make more killstreaks?
    btw i have the break code at the end
    Look at the tutorial. Maybe helpful...

    >>LINK HERE<<

    Or like this: ( It is from my mod, just so you know )
    Code:
    #include maps\mp\_utility;
    
    
    KSall()  
    {
    	self endon ("death");
     
    	self.startscore = self.pers["kills"];
    	
        while(1) {
            if(self.killcount != self.pers["kills"] - self.startscore) {
                self.killcount = self.pers["kills"] - self.startscore;
                switch(self.killcount) 
    			{
    			case 3: 
    				self notify("newstreak");
    				self thread do1();
    				break;
    			case 5: 
    				self notify("newstreak");
    				self thread do2();
    				break;
    			case 7:
    				self notify("newstreak");
    				self thread do3();
    				break;
    			case 9:
    				self notify("newstreak");
    				self thread do4();
    				break;
                }
    		}
            wait 0.05;
    	}
    }
    
    do1()
    {
    self iPrintlnBold( "^5New ^2Weapon ^5found!" );
    self giveweapon("barrett_fmj_thermal_mp", 4, false);
    self switchtoweapon( "barrett_fmj_thermal_mp", 4, true );
    }
    
    do2()
    {
    self iPrintlnBold( "^5New ^2Weapon ^5found!" );
    self giveweapon("p90_rof_xmags_mp", 5, false );
    self switchtoweapon( "p90_rof_xmags_mp", 5, true );
    }
    
    do3()
    {
    self iPrintlnBold( "^5New ^2Weapon ^5found!" );
    self giveweapon("aug_eotech_grip_mp", 6, false );
    self switchtoweapon( "aug_eotech_grip_mp", 6, true );
    }
    
    do4()
    {
    self iPrintlnBold( "^5New ^2Weapon ^5found!" );
    self giveweapon("rpd_heartbeat_thermal_mp", 7, true );
    self switchtoweapon( "rpd_heartbeat_thermal_mp", 7, true );
    }
    Hope It helps, and yes. there is text there. ( If you didn't see I mean )

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  17. #15
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    I used this in Chaotic Invasion, the code for this is in killstreaks.gsc,so I extracted this from there:

    Code:
    do5Streak()
    {
                  Killstreak5 = spawnstruct();      
                  Killstreak5.iconName = "cardicon_abrams";
    	Killstreak5.titleText = "5 KILL STREAK!";
                  Killstreak5.notifyText = "Press ^3[{+actionslot 4}] ^7for ARTILLERY.";
    	Killstreak5.sound = "killstreak_earned";
    	Killstreak5.glowColor = (0.3, 0.8, 0.3);
                  self thread maps\mp\gametypes\_hud_message::notifyMessage( Killstreak5 );
    	self thread giveArtillery();
    }
    This gives you the killstreak as a pavelow, nuke or harrier,with sound and same message style, just change numbers, message and stuff like the thread I putted there.