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
nice bump,2 days left no replies
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,