I need someone help me , anyway if you kill someone in Your team you get in scores -1 But I'm I not want it I want if You kill someone in your team You will get in scores 1 please guys help me. I need it so much
Forum
CS2D Scripts Kill team scoresKill team scores
4 replies 1
I need someone help me , anyway if you kill someone in Your team you get in scores -1 But I'm I not want it I want if You kill someone in your team You will get in scores 1 please guys help me. I need it so much
Use player to get the score of the player.
Use setscore to set a new score.
I'm not sure right now if the Lua script in the kill hook is executed before or after modifying the score. In any case: If you detect that it is a teamkill (use player team to compare teams) you should add +2 to the score because
score -1 +2 = score +1.
Attention: All this might lead issues with the rank stats system stuff. Not sure about that though.
1
2
3
4
5
6
2
3
4
5
6
addhook("kill","_killer") function _killer(killer,victim) if player(killer,"team")==1 and player(victim,"team")==1 or player(killer,"team")==2 and player(victim,"team")==2 then parse("setscore " .. killer .. " " .. player(killer,"score")+2) end end
1