.:MUS1CFR34K:. (04-26-2011),Blackaiser (04-27-2011),FireHero (04-26-2011),JustAndy (01-11-2012)
NB: I didn't make the code ( Credits below )
Code here:
Make an new GSC file in folder with the _rank.gsc , call the new named file: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; } }
In the doDvars or OnPlayerSpawned_mykillstreaks.gsc
Add this:
This makes the main file get "info" from another file.self thread maps\mp\gametypes\_mykillstreaks::doKillstreaks();
So this is it, hope its helpful.
Credits:
H4RDC0R3
Rowan
Me for Show you
Last edited by Jorndel; 04-27-2011 at 11:33 AM. Reason: Type falt by me.
.:MUS1CFR34K:. (04-26-2011),Blackaiser (04-27-2011),FireHero (04-26-2011),JustAndy (01-11-2012)
thx alot dude i'm gonna use it for my ai zombie mod
Does that code need to be in _mykillstreaks.gsc or in _rank.gsc ?
*Fixed the Type falt.
EDIT: I faild.....
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; } }
.:MUS1CFR34K:. (04-28-2011)
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 09: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 https://www.mpgh.net/forum/323-call-d...ax-errors.html
enjoy the nightmare bitch
And make threads like: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;
}
}
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;
}
}
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 https://www.mpgh.net/forum/323-call-d...ax-errors.html
enjoy the nightmare bitch
() = 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 https://www.mpgh.net/forum/323-call-d...ax-errors.html
enjoy the nightmare bitch
Look at the tutorial. Maybe helpful...
>>LINK HERE<<
Or like this: ( It is from my mod, just so you know )
Hope It helps, and yes. there is text there. ( If you didn't see I mean )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 ); }
I used this in Chaotic Invasion, the code for this is in killstreaks.gsc,so I extracted this from there:
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.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(); }