diff --git a/infolan.sp b/infolan.sp index 9d0383b..40688a6 100644 --- a/infolan.sp +++ b/infolan.sp @@ -11,8 +11,6 @@ char teamCT[5][150]; char teamT[5][150]; char clientId[128]; -char nomTeamDeux[150]; -char nomTeamUn[150]; int allId[20]; int nbAllId = 0; @@ -26,7 +24,7 @@ public Plugin myinfo = description = "Bot communiquant avec le bot discord \ https://github.com/Lunki51/cs-picker afin d’automatiser \ l’InfoLan 2021", - version = "1.5.5", + version = "1.5.6", url = "https://git.gnous.eu/Rick/infolanBot" }; @@ -130,15 +128,9 @@ public Action SetTeam(int args) int team = (!strcmp(arg, "ct", false) ? 1 : 2); GetCmdArg(2, arg, sizeof(arg)); if (team == 1) - { ServerCommand("mp_teamname_1 %s", arg) - nomTeamUn = arg; - } else - { ServerCommand("mp_teamname_2 %s", arg) - nomTeamDeux = arg; - } if (args == 7) { @@ -219,6 +211,10 @@ public void SocketUpdateScore(Handle socket, any arg) { char requestStr[1024]; char json[64]; + char nomTeamDeux[150]; + char nomTeamUn[150]; + GetTeamName(CS_TEAM_CT, nomTeamUn, sizeof(nomTeamUn)); + GetTeamName(CS_TEAM_T, nomTeamDeux, sizeof(nomTeamDeux)); FormatEx(json, sizeof(json), "{\"port\": %d, \"%s\": %d, \"%s\": %d}", port, nomTeamUn, CS_GetTeamScore(CS_TEAM_CT), nomTeamDeux, CS_GetTeamScore(CS_TEAM_T));