Garry's Mod

Garry's Mod

评价数不足
Client Console
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 
文件大小
发表于
更新日期
9.666 KB
2 月 27 日 下午 5:28
3 月 13 日 上午 4:55
7 项改动说明 ( 查看 )

订阅以下载
Client Console

描述
Almost full-fledged server console, on the client side.

Useful during server development or testing. Executes commands on behalf of the server using game.ConsoleCommand(). Needed to enter commands not available on the client side, such as bot. Access to the console is granted to superadmins. All client consoles are synchronized, allowing you to see who entered which commands. There are internally blocked commands in game.ConsoleCommand() for security, such as quit. If you need FULL functionality, use the server console directly, as this is a lightweight option for server management without the need to connect to the server console. Additionally, Lua error output is implemented.

Custom Commands:
clcs - a console command (if you are a superadmin) will open the client console.
clcs ... - when arguments are provided, sends a request to the server without opening the console (clcs bot, clcs kick bot01, etc.).
clear - an internal command (the original is blocked for game.ConsoleCommand()) clears your client console.

Just a reminder: you can bind commands in the regular console, including clcs or with arguments!

github[github.com]
8 条留言
lordkeker31 3 月 13 日 上午 10:46 
вот пример
concommand.Add("serverside_function", function(ply, cmd, args, argStr)
print("что-то там для логов на сервере")
end)
seray  [作者] 3 月 13 日 上午 9:52 
не совсем понимаю для чего, лучше создать обсуждение и там продолжить
lordkeker31 3 月 13 日 上午 7:46 
сделай такой код
clcs_old_print = clcs_old_print or print --что бы у тебя всегда была оригинальная версия print
-- даже при перезагрузке файла будет ориг так как 'or' возвращает первый существующий аргумент.
--local не работает с 'or'
function print(...)
--код для отправки в clcs
clcs_old_print(...)
end

то же самое с Msg, MsgC, MsgAll, MsgN

может что то сломать так что сделай отдельную консольную команду для оборачивания функций
seray  [作者] 3 月 13 日 上午 5:17 
Скорее всего версия 1.4 финальная. Я не вижу что ещё полезного можно добавить. Дальше будут мелкие правки кода, если найду что улучшить. Всё-же если вам есть что предложить, можете написать здесь :demoticon:
lordkeker31 2 月 28 日 下午 11:34 
Лучше не доверять клиентам вообще
seray  [作者] 2 月 28 日 上午 11:48 
@lordkeker31 хорошее замечание. изменил обработку имени, теперь на сервере. не знал что на клиенте можно редактировать код
lordkeker31 2 月 28 日 上午 10:04 
насчёт отправителя в SendToServer, это получается на клиентской стороне я могу указать любое имя если поменять код? Почему нельзя было использовать Player:Nick() на сервре?
И да, SendToServer, SendToClient, SendError явно не уникальные названия для net сообщений, надо исправить.
lordkeker31 2 月 28 日 上午 9:58 
удобно