How i can make
#1

i ahve problems with making a game text for all ... ok i will explain

Код:
public OnPlayerEnterCheckpoint(playerid)
{
 	new playervehicleid = GetPlayerVehicleID(playerid);

 	if(gObjectiveReached) return;

	if(playervehicleid == OBJECTIVE_VEHICLE_TERORIST && gTeam[playerid] == TEAM_TERORIST)
	{  // TERORIST OBJECTIVE REACHED.
	  GameTextForAll("~r~TERORIST ~w~team ~r~wins!",3000,5);
	  gObjectiveReached = 1;
	  SetPlayerScore(playerid,GetPlayerScore(playerid)+5);
	  SetTimer("ExitTheGameMode", 4000, 0); // Set up a timer to exit this mode.
	  return;
	}
	else if(playervehicleid == OBJECTIVE_VEHICLE_SOLIDER && gTeam[playerid] == TEAM_SOLIDER)
	{  // SOLIDER OBJECTIVE REACHED.
	  GameTextForAll("~b~SOLIDER ~w~team ~b~wins!",3000,5);
	  gObjectiveReached = 1;
	  SetPlayerScore(playerid,GetPlayerScore(playerid)+5);
	  SetTimer("ExitTheGameMode", 4000, 0); // Set up a timer to exit this mode.
	  return;
	}
}
atm i have if team wins write to both teams ''SOLIDER team wins'' if terorists win it write ''TERORIST team wins''

but i want if SOLIDER team win it write to SOLIDER TEAM ''Mission Complete +$15500'' so if solider team win it write this on their screen and just solider team get 15500$... and if solider team win it write this to solider screen ''Mission Complete +$15500''
and this to terorist teams screen ''Mission Failed'' ... i hope u can understand me and if u can help me to do that

if u need to see any other code just tell and i will poste

ty for any help

Kljukec
Reply
#2

Just made this, try it:

pawn Код:
stock GameTextForTeam(team, text[], duration, style)
{
    for(new i; i< MAX_PLAYERS; i++)
    {
        if(gTeam[i] == team)
        {
            GameTextForPlayer(i, text, duration, style);
        }
    }
}
Example:

pawn Код:
GameTextForTeam(TEAM_TERORIST, "You won!", 3000, 5);
EDIT: I don't know if my indentation is showing up for you, but I'm on ****** chrome atm and it's flattening everything =/
Reply
#3

ty
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)