#chHelperz main.ms ver 1.0
export('chHelperz.version', '1.0')
export('chHelperz.console.command.show', get_value('chHelperz.console.command.show'))
bind(player_command, array(id
: 'chHelperz.cmd'), null, @cmdevent,
#List cmd used, with CH aliases showing as a different color.
#show command to the console if permitted to do so.
assign(@consolecmdshow, import('chHelperz.console.command.show'))
#show command back to the player who issued the command, if permitted to do so.
assign(@sendcmd, import('chHelperz.player.'.
@player.
'.command.show.all'))
if(@sendcmd == null,
assign(@sendcmd, get_value('chHelperz.player.'.
@player.
'.command.show.all'))
export('chHelperz.player.'.
@player.
'.command.show.all', @sendcmd)
)
#Show this command to the player & console.
switch(@cmd[0]){
case '/.':
case '/repeat':
case '/\'':
if(@dev == true, msg('[dev] /repeat'))
if(@consolecmdshow == true,
assign(@lastcmd, import('chHelperz.player.'.
@player.
'.last.command'))
#List cmd used, with CH aliases showing as a different color.
console(color(7).
@player.
' used '.color
(8).
'('.
@cmd[0].
') '.color
(@cmdcolor).
@lastcmd, false)
)
default:
if(@sendcmd == true,
)
msg('> '.color
(@cmdcolor).
@cmdevent[command
])
)
if(@consolecmdshow == true,
console(color(7).
@player.
' used '.color
(@cmdcolor).
@cmdevent[command
], false)
)
#Save the last command this player used.
export('chHelperz.player.'.
@player.
'.last.command', @cmdevent[command
])
}
)