Template:RU/OOP: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
{{#if: {{{1|}}} |: '''Примечание''': ''{{{1}}}''|}}{{#if: {{{2|}}} |: '''Метод''': ''{{{2}}}(...)''|}}{{#if: {{{3|}}} |: '''Переменная''': ''.{{{3}}}''|}}{{#if: {{{4|}}} |: '''Парная функция''': ''[[RU/{{{4}}}|{{{4}}}]]''|}}</includeonly><noinclude>{{Template documentation|Template for OOP (object orientated programming)| | {{#if: {{{1|}}} |: '''Примечание''': ''{{{1}}}''|}}{{#if: {{{2|}}} |: '''Метод''': ''{{{2}}}(...)''|}}{{#if: {{{3|}}} |: '''Переменная''': ''.{{{3}}}''|}}{{#if: {{{4|}}} |: '''Парная функция''': ''[[RU/{{{4}}}|{{{4}}}]]''|}}</includeonly><noinclude>{{Template documentation|Template for OOP (object orientated programming)| | ||
{{OOP|Установите на nil, чтобы выполнить [[RU/removePedFromVehicle|removePedFromVehicle]]|[[RU/Element/Ped|ped]]:warpIntoVehicle|vehicle|getPedOccupiedVehicle}} | {{OOP|Установите на nil, чтобы выполнить [[RU/removePedFromVehicle|removePedFromVehicle]]|[[RU/Element/Ped|ped]]:warpIntoVehicle|vehicle|getPedOccupiedVehicle}} | ||
<syntaxhighlight lang="lua">{{OOP| | <syntaxhighlight lang="lua">{{OOP|Установите на nil, чтобы выполнить [[RU/removePedFromVehicle|removePedFromVehicle]]|[[RU/Element/Ped|ped]]:warpIntoVehicle|vehicle|getPedOccupiedVehicle}}</syntaxhighlight> | ||
Hey guys, here are a few "rules" in using the OOP template: | Hey guys, here are a few "rules" in using the OOP template: |
Revision as of 18:10, 6 June 2022
Template Documentation
Template for OOP (object orientated programming)
Usage
OOP Syntax Help! I don't understand this!
- Note: Установите на nil, чтобы выполнить removePedFromVehicle
- Method: ped:warpIntoVehicle(...)
- Variable: .vehicle
- Counterpart: getPedOccupiedVehicle
{{OOP|Установите на nil, чтобы выполнить [[RU/removePedFromVehicle|removePedFromVehicle]]|[[RU/Element/Ped|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.