Template:OOP

From Multi Theft Auto: Wiki
Revision as of 18:15, 28 December 2014 by Qaisjp (talk | contribs) (add OOP "rules")
Jump to navigation Jump to search

OOP Syntax

Note: This function has been dropped in favour of setPlayerHudComponentVisible
Method: player.getRandom(...)
Variable: .random
Pair: isPlayerHudComponentVisible

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

  • If it's a constructor, such as createPed, in the function 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.