This plugin is not working properly...
Example:
Trr 4 round win and CT 3 round win
But the answer is the plugin(say /status):
[CT WINS]: 1 | [TER WINS]: 2 (or 1)
where is the problem from???
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <colorchat>
#define PLUGIN "MixSwap"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"
new szTextMsg
new iTerWin;
new iCtWin;
new CsTeams:iOldTeam;
new CsTeams:iNewTeam;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /status", "ShowScore");
szTextMsg = get_user_msgid("TextMsg");
register_message(szTextMsg, "msgTextMsg");
}
public msgTextMsg()
{
static szMsg[22];
get_msg_arg_string(2, szMsg, charsmax(szMsg));
if(equal(szMsg, "#Terrorists_Win"))
{
iTerWin++;
if(iTerWin == 9)
{
server_cmd("amx_swap");
iTerWin = iCtWin;
CheckTeams();
}
else if(iTerWin == 15)
{
server_cmd("amx_warm");
}
}
else if(equal(szMsg, "#CTs_Win"))
{
iCtWin++;
if(iCtWin == 9)
{
server_cmd("amx_swap");
iCtWin = iTerWin;
CheckTeams();
}
else if(iCtWin == 15)
{
server_cmd("amx_warm");
}
}
return PLUGIN_CONTINUE;
}
public ShowScore(id)
{
ColorChat(id, GREEN, "[CT WINS]: %i | [TER WINS]: %i", iCtWin, iTerWin);
}
CheckTeams()
{
new iPlayers[32], iNum, id
get_players(iPlayers, iNum)
for(new i; i < iNum;i++)
{
id = iPlayers[i]
if(1 <= get_user_team(id) <= 2)
{
cs_set_user_team(id, (get_user_team(id) == 1) ? CS_TEAM_CT : CS_TEAM_T)
}
}
}
Can you do it for me??
When hit (say /live or amx_live), the plugin will then display the results
And when hit (say /warm or amx_warm), the plugin will no longer show results
Example:
(say /live or amx_live) start the mix mod (say /status)
[CT WINS]: 0 | [TER WINS]: 0
(say /warm or amx_warm) And when the player hits (say /status) It gets the answer in the form
PHP Code:
client_print (id, print_chat, "Server Not Mix");