19.12.2010, 14:55
hi,
After a round has ended the spawnpoints of the player chage (map chages).
I pasted my code.
The problem is that only one player is teleported.
But every single player in the server should be teleported to the new maps position.
I hope u can help me once again
regards.
After a round has ended the spawnpoints of the player chage (map chages).
I pasted my code.
The problem is that only one player is teleported.
But every single player in the server should be teleported to the new maps position.
pawn Код:
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]);
}
}
}
regards.