SA-MP Forums Archive
Different Gametexts for Different Team - 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: Different Gametexts for Different Team (/showthread.php?tid=106624)



Different Gametexts for Different Team - Tigerbeast11 - 04.11.2009

How can i make diff gametexts for diff teams?

Say, One team wins and the other team loses, how can i make diff gametexts for each game?

Note: I have the teams defined =P


Re: Different Gametexts for Different Team - Nero_3D - 04.11.2009

pawn Код:
switch(gTeam[playerid])
{
    case TEAM_BLUE: GameTextForPlayer(playerid, "~b~Welcome to team blue~n~the good side of live!", 5000, 1);
    case TEAM_RED: GameTextForPlayer(playerid, "~r~Welcome to team red~n~~n~~n~We have cookies!!!", 5000, 6);
}
Is that example enough ?


Re: Different Gametexts for Different Team - MadeMan - 04.11.2009

pawn Код:
GameTextForTeam(team, string[], time, style)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(gTeam[i] == team)
            {
                GameTextForPlayer(i, string, time, style);
            }
        }
    }
}



Re: Different Gametexts for Different Team - aspire5630 - 04.11.2009

Quote:
Originally Posted by MadeMan
pawn Код:
GameTextForTeam(team, string[], time, style)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(gTeam[i] == team)
            {
                GameTextForPlayer(i, string, time, style);
            }
        }
    }
}

Surley thats getting a little bit complicated, how do you want it
Random different styles

or for example if TEAM1 wins it says something different then it would when TEAM2 wins?