SA-MP Forums Archive
map/rounds change - 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: map/rounds change (/showthread.php?tid=275898)



map/rounds change - bboytimix - 11.08.2011

hello guys i need help with map changing
if all players in team[playerid]=2 if [all] player only will be other map
the mode will respawn all


Re: map/rounds change - Unknown_Killer - 11.08.2011

hmmm you have 2 choice

1) is to set timer to check if all players of team[playerid]=2 dead then SendRconCommand("gmx");

2) make a stock with variable when each player join team 2 set like team2++;

check this example

pawn Код:
new team2;

stock CheckForalldead(playerid)
{
if(team2 == 0)
{
SendRconCommand("gmx");
}
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
if(team[playerid] == 2)
{
team2--;
CheckForalldead(playerid);
}
return 1;
}
Not tested