Compare commits
2 Commits
0daabfdb8f
...
1e017b925d
Author | SHA1 | Date | |
---|---|---|---|
1e017b925d | |||
dac6f3916f |
@ -47,10 +47,12 @@ foreach (Player in AllPlayers) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare Text[] Map_LoginsToRespawn;
|
declare Text[] Map_LoginsToRespawn;
|
||||||
|
declare Text Map_TeamsConfig;
|
||||||
***
|
***
|
||||||
|
|
||||||
***Match_StartMap***
|
***Match_StartMap***
|
||||||
***
|
***
|
||||||
|
Map_TeamsConfig = S_TeamsConfig;
|
||||||
if (S_TeamsConfig != "") {
|
if (S_TeamsConfig != "") {
|
||||||
declare Integer[Text] TeamsConfig ;
|
declare Integer[Text] TeamsConfig ;
|
||||||
TeamsConfig.fromjson(S_TeamsConfig);
|
TeamsConfig.fromjson(S_TeamsConfig);
|
||||||
@ -67,6 +69,8 @@ if (S_TeamsConfig != "") {
|
|||||||
UI.SendChat("$ff3You play for the team $fff"^ ClanId);
|
UI.SendChat("$ff3You play for the team $fff"^ ClanId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Race::SetRespawnBehaviour(Race::C_RespawnBehaviour_NeverGiveUp);
|
||||||
***
|
***
|
||||||
|
|
||||||
***Match_PlayLoop***
|
***Match_PlayLoop***
|
||||||
@ -115,6 +119,33 @@ foreach (LoginToRespawn in Map_LoginsToRespawn) {
|
|||||||
RespawnPlayer(Player);
|
RespawnPlayer(Player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Map_TeamsConfig != S_TeamsConfig) {
|
||||||
|
Map_TeamsConfig = S_TeamsConfig;
|
||||||
|
|
||||||
|
if (S_TeamsConfig != "") {
|
||||||
|
declare Integer[Text] TeamsConfig ;
|
||||||
|
TeamsConfig.fromjson(S_TeamsConfig);
|
||||||
|
|
||||||
|
foreach (Player in AllPlayers) {
|
||||||
|
declare Integer ClanId = TeamsConfig.get(Player.User.WebServicesUserId, 0);
|
||||||
|
Player.Score.LadderClan = ClanId;
|
||||||
|
|
||||||
|
if (Player.SpawnStatus == CSmPlayer::ESpawnStatus::NotSpawned) {
|
||||||
|
log("Attributing Player "^ Player.User.Name ^" to the clan " ^ ClanId);
|
||||||
|
SetPlayerClan(Player, ClanId);
|
||||||
|
} else {
|
||||||
|
log("Can't apply Player "^ Player.User.Name ^" to the clan " ^ ClanId ^ " because they is playing");
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateClanStates(Player.Score.LadderClan);
|
||||||
|
|
||||||
|
declare CUIConfig UI <=> UIManager.GetUI(Player);
|
||||||
|
if (UI == Null) continue;
|
||||||
|
UI.SendChat("$ff3You play for the team $fff"^ ClanId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
***
|
***
|
||||||
|
|
||||||
Void ApplyModeToPlayer(CSmPlayer _Player, Boolean _Lock) {
|
Void ApplyModeToPlayer(CSmPlayer _Player, Boolean _Lock) {
|
||||||
|
Loading…
Reference in New Issue
Block a user