Hi guys! I am making a custom mod for my clan, and i have encountered problems with this piece of code, that is supposed to give you killstreaks. Basically, when i add it into the gsc, and running using self thread, aiw gives me syntax errors when trying to test run it in private match. Can You guys try to tell me where the mistake sits? The code isI promise to realease the mod if i get it to work.Code:#include maps\mp\_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 2: self notify("newstreak"); currentWeapon = self getCurrentWeapon(); if ( currentWeapon == "mp_deserteagle" ) { self setWeaponAmmoClip( currentWeapon, 3 ); } currentoffhand = self GetCurrentOffhand(); if ( currentoffhand == "mp_deserteagle" ) { self setWeaponAmmoClip( currentoffhand, 3 ); } break; } } wait 0.05; } }
pakadz (10-16-2011)
Bump. Come on guys, you can do it D:
Erm, have you threaded the killstreak file as it were showen in the tutorial?
aslo, you should just add then code:
and thread it in the doDvars()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 2: self notify("newstreak"); currentWeapon = self getCurrentWeapon(); if ( currentWeapon == "mp_deserteagle" ) { self setWeaponAmmoClip( currentWeapon, 3 ); } currentoffhand = self GetCurrentOffhand(); if ( currentoffhand == "mp_deserteagle" ) { self setWeaponAmmoClip( currentoffhand, 3 ); } break; } } wait 0.05; } }
and you should be fine
@Moto
Jorndel is not on this site so...
But you can mention me instead. (Because I am Jorndels brother )
And then I can ask him if he it's needed
Last edited by Xray Hunter; 10-17-2011 at 03:17 AM.
Since he gets a syntax error he is...
*looked at it*
Code:doKillstreaks() { self endon ("death"); self.startscore = self.pers["kills"]; while(1) { if(self.killcount != self.pers["kills"] --[COLOR=#696969] self.startscore) { self.killcount = self.pers["kills"] --self.startscore; switch(self.killcount) { case 2: self notify("newstreak"); currentWeapon = self getCurrentWeapon(); if ( currentWeapon == "mp_deserteagle" ) { self setWeaponAmmoClip( currentWeapon, 3 ); } currentoffhand = self GetCurrentOffhand(); if ( currentoffhand == "mp_deserteagle" ) { self setWeaponAmmoClip( currentoffhand, 3 ); } break; } } wait 0.05; } }
You need 2 "-"'s. You can' write a single that way. A singe "-" means "subtract".
Last edited by Nachos; 10-18-2011 at 02:13 PM.
The lines in my Steam are i's
pakadz (10-18-2011)
Thanks, dude you are my new hero. Solved