I advice you to look into the Gungame, i know that gungame works with levelling up when the xp for getting a kill is gained, i don't know more
hello guys!
i need a Kill Counter to add to a function....../yea
Please can you tell me what to use?
I advice you to look into the Gungame, i know that gungame works with levelling up when the xp for getting a kill is gained, i don't know more
Well, i already look at that, and did not find anything!!!
Its in my gungame, which ill release later ...
anyways
just do something like
otherwise you could look into the damage.gsc and addCode:self waittill("killed_enemy"); self.killcounter+= 1
in the "Callback_PlayerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration )" functionCode:attacker.killcounter += 1;
also, there is a predefined variable called "kills" for every player ( e.g use self.kills)
Last edited by ch40s; 10-09-2010 at 12:34 PM.
just do
And yeah the kill counter isCode:self iPrintLn("You have got '" + self.kills +"' kills!");
Code:self waittill("killed_enemy");
[YOUTUBE]Ja7-WnJcMcs[/YOUTUBE]
Well, now i want to do this:
so now?Code:self waittill("killed_enemy"); kl = self.kills; kl += 1; if(kl > 10){ self giveWeapon("ak47_mp", 0); }
will tihs give me an AK-47 if i get more then 10 kills.?
Well yea, that would give AK47, but why not just use self.pers["kills"]?
use this instead of a message, it doesnt disappear and u can pick positions / change color
Code:Yourinfo() { self endon("death"); Message3 = NewClientHudElem( self ); Message3.alignX = "left"; // Position X Message3.alignY = "bottom"; // Position Y Message3.horzAlign = "center"; // Position Horizontal Message3.vertAlign = "bottom"; // Position Vertical Message3.foreground = true; // always on top Message3.fontScale = 1; //size of text Message3.font = "hudbig"; // Dont change Message3.alpha = 1; // idk must be something shitty Message3.glow = 1; // glow probally Message3.glowColor = ( 0 , 0, 0 ); Message3.glowAlpha = 1; self thread deleteondeath1(Message3); Message3.color = ( 0.0, 0.0, 0.0 ); for(;;) { Message3 settext("txt here " ); wait 0.05; } } deleteondeath1(Message3) { self waittill("death"); Message3 destroy(); }
Last edited by rkaf; 10-09-2010 at 01:19 PM.
well thanks for all!
/marked as solved