public Restart(playerid,classid) //this is a timer wich is set after a round has endet
{
{
switch (CurrentMode) //defines wich map is wich case
{
case 0: //map1
{
{
switch (gTeam[playerid])
{
case 1: //new spawnpoints of team1
{
new Spawn = random(sizeof(ModeTwoSpawnsPolice));//ForestCombat Spawnpoints
SetPlayerPos(playerid,ModeTwoSpawnsPolice[Spawn][0],ModeTwoSpawnsPolice[Spawn][1],ModeTwoSpawnsPolice[Spawn][2]);
SetPlayerFacingAngle(playerid,ModeTwoSpawnsPolice[Spawn][4]);
Streamer_UpdateEx(playerid, ModeTwoSpawnsPolice[Spawn][0],ModeTwoSpawnsPolice[Spawn][1],ModeTwoSpawnsPolice[Spawn][2]);
}
case 2: //new spawnpoints of team2
{
new Spawn = random(sizeof(ModeTwoSpawnsBurner));
SetPlayerPos(playerid,ModeTwoSpawnsBurner[Spawn][0],ModeTwoSpawnsBurner[Spawn][1],ModeTwoSpawnsBurner[Spawn][2]);
SetPlayerFacingAngle(playerid,ModeTwoSpawnsBurner[Spawn][4]);
Streamer_UpdateEx(playerid, ModeTwoSpawnsBurner[Spawn][0],ModeTwoSpawnsBurner[Spawn][1],ModeTwoSpawnsBurner[Spawn][2]);
}
}
}
for(new i; i < MAX_PLAYERS; i++)
//map1/////////////////////////////////////////////////////////////////////////////////
new Float:ModeTwoSpawnsPolice[6][5] = //team1 spawnpoints linked to the first code i posted
{
{609.7040,-586.5684,17.2266,256.8267},
{610.3588,-590.8182,17.2266,263.0453},
{616.1186,-591.2390,17.2330,268.1367},
{619.4320,-586.6706,17.2330,261.1437},
{614.9709,-610.6100,17.2266,355.6629},
{610.4255,-607.5670,17.2266,330.0057}
};
new Float:ModeTwoSpawnsBurner[6][5] = //team2 spawnpoints linked to the first code i posted
{
{804.0115,-612.1152,16.3432,47.2465},
{812.3744,-612.2579,16.3359,40.3489},
{824.7153,-612.1229,16.3359,23.1518},
{834.3637,-602.8866,16.3359,45.8388},
{811.1272,-608.6595,16.3359,52.8724},
{781.4649,-620.4591,16.3359,355.2838}
};
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
//ur codes here.
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
Restart(i, classid)
}
thanks
![]() Stupid question: 1.Do i have to write that If is Player connected thing? Wouldnt it also work without this code? 2.And do i have to destroy textdraws in OnGameModeExit? regards. |