Quote:
Originally Posted by OciXCrom
If you want it in chat, you obviously need "say".
|
I tried,
PHP Code:
register_concmd("say /change", "CMD_ModeChange", ADMIN_VOTE, "<Смена режима Mode 2x2, Открыть/Закрыть карту>");
PHP Code:
}
g_pServerVar[m_iBlocked] = blocked_s:block_admin_change;
g_pServerVar[m_fNext] = _:(get_gametime() + (VOTE_TIMEWAIT * 60.0));
g_pServerVar[m_iStatus] ^= map_close;
if (get_pcvar_num(pcvar_mode_admin_only) != 0)
{
g_pServerVar[m_iClosedIndex] = (g_pServerVar[m_iStatus] == map_open) ? id : 0;
}
new iPlayers[32], iNum, p;
get_players(iPlayers, iNum, "ch");
for (new a = 0; a < iNum; ++a)
{
p = iPlayers[a];
if (get_user_flags(p) & ADMIN_VOTE)
{
client_print_color(p, DontChange + id, "%L %L", p, "MODE_PREFIX", p, "MODE_ADMIN_CHANGED_ADMINS", szName, p, (g_pServerVar[m_iStatus] == map_close) ? "MODE_ADMIN_CLOSED" : "MODE_ADMIN_OPENED");
console_print(id, "%s Changed The Mode", szName);
}
}
return PLUGIN_HANDLED;
}
I used this command from server console, i.e: say /change.
Neither, it sends:
console_print(id, "%s Changed The Mode", szName);
Nor, any function took place, i.e: mode didn't change.
I made these 2 changes, console_print & concmd but it didn't helped, can you please figure out where the problem could be?