Team red and blue problem. - 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 red and blue problem. (
/showthread.php?tid=146671)
Team red and blue problem. -
Zh3r0 - 08.05.2010
Well, i tryied to make it that way that when someone enters a TDM selects the team, and becamse the team selected.
I want that when a certain team wins, to announce only to the ones that are in the TDM, not the outsiders that didn't typed the command.(Like the ones that are in
DMzone[playerid] = 0; (STUNTZONE)) that was an example.
Here is the code i have.Well yeah, kinda messed up.
pawn Код:
if(RedKills == 5 && ADM[playerid] == 1)
{
RedKills = 0;
BlueKills = 0;
SendClientMessage(playerid,COLOR_T_RED, "The red team scored first 2 points! And won the Area 51 Team Deathmatch");
if(GetPlayerTeam(playerid) == TEAM_BLUE)
{
if(ADM[playerid] == 1)
{
DisplayTextForAll("~w~The ~r~red~w~ team won the Area 51 Team Deathmatch!.", 5,3,1);
}
}
if(GetPlayerTeam(playerid) == TEAM_RED)
{
DisplayTextForPlayer(playerid,"Your team won the tdm!~n~WINNER!!", 5,2,2);
}
}
if(BlueKills == 5 && ADM[playerid] == 1)
{
BlueKills = 0;
RedKills = 0;
SendClientMessage(playerid,COLOR_T_BLUE, "The blue team scored first 2 points! And won the Area 51 Team Deathmatch!");
if(GetPlayerTeam(playerid) == TEAM_RED)
{
if(ADM[playerid] == 1)
{
DisplayTextForAll("~w~The ~b~blue~w~ team won the Area 51 Team Deathmatch!.", 5,3,1);
}
}
if(GetPlayerTeam(playerid) == TEAM_BLUE)
{
DisplayTextForPlayer(playerid,"Your team won the tdm!~n~WINNER!!", 5,2,2);
}
}
It's placed under OnPlayerDeath.
Help is really appreciated.
BTW, i tought that if i use a loop or something.