Template:OOP: Difference between revisions
Jump to navigation
Jump to search
m (make the "Help" bigger) |
m (test) |
||
Line 3: | Line 3: | ||
{{OOP|This function has been dropped in favour of [[setPlayerHudComponentVisible]] |[[player]].getRandom|random|isPlayerHudComponentVisible}} | {{OOP|This function has been dropped in favour of [[setPlayerHudComponentVisible]] |[[player]].getRandom|random|isPlayerHudComponentVisible}} | ||
<syntaxhighlight lang="lua">{{OOP|This function has been dropped in favour of [[setPlayerHudComponentVisible]] |[[player]].getRandom|random|isPlayerHudComponentVisible}}</syntaxhighlight> | <syntaxhighlight lang="lua" [text]>{{OOP|This function has been dropped in favour of [[setPlayerHudComponentVisible]] |[[player]].getRandom|random|isPlayerHudComponentVisible}}</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 19:21, 11 January 2016
OOP Syntax Help! I don't understand this!
- Note: This function has been dropped in favour of setPlayerHudComponentVisible
- Method: player.getRandom(...)
- Variable: .random
- Counterpart: isPlayerHudComponentVisible
{{OOP|This function has been dropped in favour of [[setPlayerHudComponentVisible]] |[[player]].getRandom|random|isPlayerHudComponentVisible}}
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.