Lua API/System/AddCCommand
Материал из CryWiki Russia
(Различия между версиями)
Alex626 (Обсуждение | вклад) |
Alex626 (Обсуждение | вклад) |
||
Строка 2: | Строка 2: | ||
{{Lua_API | {{Lua_API | ||
- | | | + | |описание=Adds a console command |
|arg1=Console command name | |arg1=Console command name | ||
|arg2=Lua function | |arg2=Lua function | ||
|arg3=Extra info for help | |arg3=Extra info for help | ||
- | | | + | |пример=<source lang="lua"> |
function myFunc() | function myFunc() | ||
Log("Called myFunc"); | Log("Called myFunc"); | ||
end | end | ||
System.AddCCommand("myConsoleCommand","myFunc()","This command calls my function");</source> | System.AddCCommand("myConsoleCommand","myFunc()","This command calls my function");</source> | ||
- | | | + | |примечания=More info on the [[Creating_Console_Commands]] tutorial page. |
}} | }} |
Версия 07:40, 8 мая 2011
System.AddCCommand(string, string, string)
Описание
Adds a console command
Аргументы
- Console command name
- Lua function
- Extra info for help
Пример
Lua (пример)
function myFunc() Log("Called myFunc"); end System.AddCCommand("myConsoleCommand","myFunc()","This command calls my function");
Примечания
More info on the Creating_Console_Commands tutorial page.