Vice City: Multiplayer

Server Development => Scripting and Server Management => Script and Content Requests => Topic started by: luchgox on Apr 14, 2017, 01:48 AM

Title: Score bar
Post by: luchgox on Apr 14, 2017, 01:48 AM
hi,can any one help by giving me the function of score bar like..if a player types: /score....then server would say current score two teams (like cubans and haitains)..I dont know what im  saying in english...sorry for bad english
Title: Re: Score bar
Post by: luchgox on Apr 16, 2017, 09:17 AM
nice bump,2 days left no replies
Title: Re: Score bar
Post by: Mötley on Jun 17, 2017, 11:34 AM
Well I am not sure what you are referring to by bar other than GUI..

But I do not have time to read client scripting hear, I looked for some call function from the server to the client to update values but did not see anything..

So I will take that as a typo due to your English honestly..



But this is untested code I just placed together

class Team_Killing_Stats
{
Team_1 = 0;
Team_2 = 0;
}

Team_Stats <- Team_Killing_Stats();


function onPlayerKill(killer, victim, weapon, bodyPart)
{
if (killer.Team == 1)
{
// Increase the killing team
Team_Stats.Team_1 += 1;

// Decrease the dieing team
Team_Stats.Team_2 -= 1;

}

if (killer.Team == 2)
{
// Increase the killing team
Team_Stats.Team_2 += 1;

// Decrease the dieing team
Team_Stats.Team_1 -= 1;

}
Message("[TEAM-STATS] Team 1 " + Team_Stats.Team_1)
Message("[TEAM-STATS] Team 2 " + Team_Stats.Team_2)

return 1;
}


In this code there are two teams,