Lua API/System/AddCCommand

Материал из CryWiki Russia

(Различия между версиями)
Перейти к: навигация, поиск
Строка 2: Строка 2:
{{Lua_API
{{Lua_API
-
|description=Adds a console command
+
|описание=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
-
|example=<source lang="lua">
+
|пример=<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>
-
|notes=More info on the [[Creating_Console_Commands]] tutorial page.
+
|примечания=More info on the [[Creating_Console_Commands]] tutorial page.
}}
}}

Версия 07:40, 8 мая 2011

System.AddCCommand(string, string, string)

Описание

Adds a console command

Аргументы

  1. Console command name
  2. Lua function
  3. 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.