How i can make - 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: How i can make (
/showthread.php?tid=88111)
How i can make -
Geekzor - 24.07.2009
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
Re: How i can make -
Weirdosport - 24.07.2009
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 =/
Re: How i can make -
Geekzor - 24.07.2009
ty