Without any code to build upon or look at, it's difficult to aid you much! The process itself is very simple however, simply check their team id prior to spawning them and set their spawn data appropriately.
|
public turaskeiciasi(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { TogglePlayerControllable(i,1); ResetPlayerWeapons(i); ResetPlayerMoney(i); GivePlayerMoney(i,100); SetPlayerArmour(i,0); SetPlayerHealth(i,100); GivePlayerWeapon(i,22,300); PlayerPlaySound(i,1098,0,0,0); SetPlayerInterior(i,3); SetPlayerPos(i,2495.8982,-1707.8923,1014.7422); SetPlayerColor(i,COLOR_BLUE); SetPlayerInterior(i,6); SetPlayerPos(i,2343.0278,-1064.3197,1049.0234); SetPlayerColor(i,0xFF000090); SetTimer("turasbaigsis", 55000, false); redscore = 0; bluescore = 0; if(turas == 1) { turas = 2; } if(turas == 2) { turas = 1; } } } return 1; }
if(IsPlayerConnected(i)) { TogglePlayerControllable(i,1); ResetPlayerWeapons(i); ResetPlayerMoney(i); GivePlayerMoney(i,100); SetPlayerArmour(i,0); SetPlayerHealth(i,100); GivePlayerWeapon(i,22,300); PlayerPlaySound(i,1098,0,0,0); SetPlayerInterior(i,3); SetPlayerPos(i,2495.8982,-1707.8923,1014.7422); SetPlayerColor(i,COLOR_BLUE); SetPlayerInterior(i,6); SetPlayerPos(i,2343.0278,-1064.3197,1049.0234); SetPlayerColor(i,0xFF000090); SetTimer("turasbaigsis", 55000, false); redscore = 0; bluescore = 0; if(turas == 1) { turas = 2; } if(turas == 2) { turas = 1; } } } return 1; }
Код:
if(IsPlayerConnected(i)) { TogglePlayerControllable(i,1); ResetPlayerWeapons(i); ResetPlayerMoney(i); GivePlayerMoney(i,100); SetPlayerArmour(i,0); SetPlayerHealth(i,100); GivePlayerWeapon(i,22,300); PlayerPlaySound(i,1098,0,0,0); SetPlayerInterior(i,3); SetPlayerPos(i,2495.8982,-1707.8923,1014.7422); SetPlayerColor(i,COLOR_BLUE); SetPlayerInterior(i,6); SetPlayerPos(i,2343.0278,-1064.3197,1049.0234); SetPlayerColor(i,0xFF000090); SetTimer("turasbaigsis", 55000, false); redscore = 0; bluescore = 0; if(turas == 1) { turas = 2; } if(turas == 2) { turas = 1; } } } return 1; } |
Well, this is what happens when someone connects to your server.
I would suggest you to make a dialog, so people can choose their team. Once they chose their team, you can set their spawn place. (And it wont get bugged). That's how I did it man. |
You can already choose a team. I already made them, now I just want to know how to set different positions for BLUE team and RED team after the time runs out (I already made the timer and everything is ok except the position change). But is there a command that respawns a player?
|