Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: kennedyarz on Apr 25, 2016, 02:53 PM

Title: Score function on my server is a nuisance
Post by: kennedyarz on Apr 25, 2016, 02:53 PM
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.
Title: Re: Score function on my server is a nuisance
Post by: Milos on Apr 25, 2016, 03:27 PM
function onPlayerKill( killer, player, reason, bodypart )
{
killer.Score ++;
}
Title: Re: Score function on my server is a nuisance
Post by: Mötley on Apr 25, 2016, 04:29 PM
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
Title: Re: Score function on my server is a nuisance
Post by: kennedyarz on Apr 25, 2016, 11:54 PM
no, funtion no is. :(
Title: Re: Score function on my server is a nuisance
Post by: Milos on Apr 26, 2016, 12:11 AM
You were referring to the Scoreboard or any stats system of your script?