- Хроники
- Chaotic Throne: High Five
- Исходники
- Присутствуют
- Сборка
- L2jSunrise
Hello folks, how can I make this check "link/command off". If the command are enabled, to display button, if the command it's disabled by admin, to display "Command Off"
L2Npc
OnlineVCmd
L2Npc
JavaScript:
html.replace("%disableOnlineCommand%", Config.ENABLE_COMMAND_ONLINE ? "<font color=ff0000>Command Off</font>" : "<a action=\"bypass voice .online\">Online < /a>");
OnlineVCmd
JavaScript:
@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
if (Config.ENABLE_COMMAND_ONLINE)
{
activeChar.sendMessage("Command is disabled by admin");
}
if (command.startsWith("online"))
{
showPlayers(activeChar, target);
}
return true;
}