team score - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: team score (
/showthread.php?tid=209905)
team score -
Hailine - 11.01.2011
hello iam working on team death match server
what iam trying todo is
on team reach determined score the game ends
also when a member of a team kill one of the opposite team team get 1 score so when the team get 100 kills from all players it end the games and the team with the 100 kills or score wins
please help me....
iam trying to base on this 2 codes:
Код:
LoLTeam++;
KillTimer(ExplosionTimer);
GameTextForAll("~b~ LOL team won this round", 3000, 6);
SetTimer("ResetRound", 3000, false);
AW: team score -
Kmitska - 11.01.2011
Hey, thats almost the whole script you need lol
I guess it will help you a bit
new Team1[MAX_PLAYERS];
new Team2[MAX_PLAYERS];
new score1,score2;
public OnPlayerDeath(playerid, killerid, reason)
{
if(Team1[killerid] != Team1[playerid]) // if it is not a teamkill
{
score1 ++;
if(score1 == 100)
{
//write here that the team 1 has won etc.
return 0;
}
}
if(Team2[killerid] != Team2[playerid]) // if it is not a teamkill
{
score2 ++;
if(score2 == 100)
{
//write here that the team 2 has won etc.
return 0;
}
}
return 1;
}
Re: AW: team score -
Hailine - 11.01.2011
Quote:
Originally Posted by Kmitska
Hey, thats almost the whole script you need lol
I guess it will help you a bit
new Team1[MAX_PLAYERS];
new Team2[MAX_PLAYERS];
new score1,score2;
public OnPlayerDeath(playerid, killerid, reason)
{
if(Team1[killerid] != Team1[playerid]) // if it is not a teamkill
{
score1 ++;
if(score1 == 100)
{
//write here that the team 1 has won etc.
return 0;
}
}
if(Team2[killerid] != Team2[playerid]) // if it is not a teamkill
{
score2 ++;
if(score2 == 100)
{
//write here that the team 2 has won etc.
return 0;
}
}
return 1;
}
|
thanks! i will test it...
Re: AW: team score -
Hailine - 12.01.2011
Quote:
Originally Posted by Hailine
thanks! i will test it...
|
thank you worked perfect!