Shared Property Template: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "{{Shared}} This is an example description for a shared property template. == Syntax == <syntaxhighlight lang="javascript"> mp.examples.prop = str; </syntaxhighlight> === A...")
 
mNo edit summary
 
Line 5: Line 5:
== Syntax ==
== Syntax ==


<syntaxhighlight lang="javascript">
<pre>
mp.examples.prop = str;
mp.examples.prop = str;
</syntaxhighlight>
</pre>


=== Attribute Types ===
=== Attribute Types ===
Line 17: Line 17:
This is a basic explanation about what does the example below do.
This is a basic explanation about what does the example below do.


<syntaxhighlight lang="javascript">
<pre>
//Getter Type
//Getter Type
let val = mp.examples.prop;
let val = mp.examples.prop;
Line 23: Line 23:
//Setter Type
//Setter Type
mp.examples.prop = "Example String";
mp.examples.prop = "Example String";
</syntaxhighlight>
</pre>


== See Also ==
== See Also ==


* [[Example::Stuff|Example Stuff]]
* [[Example::Stuff|Example Stuff]]

Latest revision as of 18:22, 26 October 2018

Shared

This is an example description for a shared property template.

Syntax

mp.examples.prop = str;

Attribute Types

  • Getter: Explanation of getter type, output should be in string type.
  • Setter: Explanation of setter type, input should be in string type.

Examples

This is a basic explanation about what does the example below do.

//Getter Type
let val = mp.examples.prop;

//Setter Type
mp.examples.prop = "Example String";

See Also