Score function on my server is a nuisance

Started by kennedyarz, Apr 25, 2016, 02:53 PM

Previous topic - Next topic

kennedyarz

happens to me that whenever a player killer this does not count the number of dead that I have, if not that, joins 1 in the Score the player who I murder.


español: me pasa que cada vez que asesino a un jugador este no cuenta  el numero de muertos que llevo, si no que, se le suma 1 en el Score al jugador que yo asesine.

Milos

function onPlayerKill( killer, player, reason, bodypart )
{
killer.Score ++;
}

Mötley

#2
function onPlayerKill( killer, player, reason, bodypart )
{
 killer.Score += 1;
 killer.Health += 25;
 killer.Cash += 25;
 killer.WantedLevel += 1;
 
 //now we play with the player that died
 player.Score = 0;
 player.WantedLevel -= 1;
}

you could also possibly do

player.Score = player.Cash;
killer.Score = killer.Cash;

This would set the players cash to be the score rather than the Score itself. But you would need to add updates for this in many other places. This is only handy for role play servers, Scores are for Death Matches.

also you could add a call back function say if killer.Score = 50; killer.Cash += 10000

kennedyarz


Milos

You were referring to the Scoreboard or any stats system of your script?