Template:RU/OOP: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Tag: Manual revert
Line 1: Line 1:
<includeonly><u>'''Синтаксис ООП'''</u> <small>[[OOP Introduction|Помогите! Я не понимаю, что это!]]</small>
<includeonly><u>'''OOP Syntax'''</u> <small>[[OOP Introduction|Help! I don't understand this!]]</small>
{{#if: {{{1|}}} |: '''Примечание''': ''{{{1}}}''|}}{{#if: {{{2|}}} |: '''Метод''': ''{{{2}}}(...)''|}}{{#if: {{{3|}}} |: '''Переменная''': ''.{{{3}}}''|}}{{#if: {{{4|}}} |: '''Парная функция''': ''[[RU/{{{4}}}|{{{4}}}]]''|}}</includeonly><noinclude>{{RU/Template documentation|Шаблон для ООП (объектно-ориентированное программирование)|
{{#if: {{{1|}}} |: '''Note''': ''{{{1}}}''|}}{{#if: {{{2|}}} |: '''Method''': ''{{{2}}}(...)''|}}{{#if: {{{3|}}} |: '''Variable''': ''.{{{3}}}''|}}{{#if: {{{4|}}} |: '''Counterpart''': ''[[{{{4}}}]]''|}}</includeonly><noinclude>{{Template documentation|Template for OOP (object orientated programming)|
{{OOP|Установите на nil, чтобы выполнить [[RU/removePedFromVehicle|removePedFromVehicle]]|[[RU/Element/Ped|ped]]:warpIntoVehicle|vehicle|getPedOccupiedVehicle}}
{{OOP|Set the variable to nil to execute [[removePedFromVehicle]]|[[ped]]:warpIntoVehicle|vehicle|getPedOccupiedVehicle}}
<syntaxhighlight lang="lua">{{RU/OOP|Установите на nil, чтобы выполнить [[RU/removePedFromVehicle|removePedFromVehicle]]|[[RU/Element/Ped|ped]]:warpIntoVehicle|vehicle|getPedOccupiedVehicle}}</syntaxhighlight>
<syntaxhighlight lang="lua">{{OOP|Set the variable to nil to execute [[removePedFromVehicle]]|[[ped]]:warpIntoVehicle|vehicle|getPedOccupiedVehicle}}</syntaxhighlight>


Вот несколько "правил" при использовании этого шаблона:
Hey guys, here are a few "rules" in using the OOP template:
* Если это конструктор, как, например, [[RU/createPed|createPed]], используйте "[[RU/Element/Ped|Ped]]", а не "createPed" или "Ped.create"
* If it's a constructor, such as [[createPed]], use "[[Ped]]" not "createPed" or "Ped.create"
* Если это функция статического класса или конструктор, пишите с заглавной буквы. (Player, а не player).
* If it's a static class function or a constructor, use a capital letter for the first character. (Player not player).
* Также, если это функция объекта, как, например, "player:setName", используйте нижний регистр.
* Likewise, if it's an object function such as "player:setName", use lowercase.
* Используйте точки для статических функций и двоеточия (:) для функций объектов.
* Use full stops (or if you're american, "periods.") for static functions and colons (:) for object functions.
}}
}}
</noinclude>
</noinclude>

Revision as of 18:43, 6 June 2022

Applications-office.pngTemplate Documentation

Template for OOP (object orientated programming)

Usage


OOP Syntax Help! I don't understand this!

Note: Set the variable to nil to execute removePedFromVehicle
Method: ped:warpIntoVehicle(...)
Variable: .vehicle
Counterpart: getPedOccupiedVehicle


{{OOP|Set the variable to nil to execute [[removePedFromVehicle]]|[[ped]]:warpIntoVehicle|vehicle|getPedOccupiedVehicle}}

Hey guys, here are a few "rules" in using the OOP template:

  • If it's a constructor, such as createPed, use "Ped" not "createPed" or "Ped.create"
  • If it's a static class function or a constructor, use a capital letter for the first character. (Player not player).
  • Likewise, if it's an object function such as "player:setName", use lowercase.
  • Use full stops (or if you're american, "periods.") for static functions and colons (:) for object functions.