Difference between revisions of "Template:Native"

From GTAMods Wiki
Jump to navigation Jump to search
m
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<table cellspacing="4" cellpadding="2" style="border: 1px solid #cedff2; text-align: left; line-height: 1.5em; margin: .5em 0 .5em 1em">{{#if: {{{noheader|}}}||<caption>'''{{PAGENAMEE}}'''</caption>}}<tr><th colspan="3" align="center">Number of parameters: {{{np}}}</th></tr>{{#ifexpr: {{{{{{np}}}|0}}}>0 | <tr><th>#</th><th>Type</th><th>Description</th></tr>}}{{#if: {{{p1d|}}}|<tr><td>Parameter 1</td>{{#if: {{{p1t|}}}|<td>{{{p1t}}}</td>|<td></td>}}{{#if: {{{p1d|}}}|<td>{{{p1d|}}}</td>|<td></td>}}</tr>}}{{#if: {{{p2d|}}}|<tr><td>Parameter 2</td>{{#if: {{{p2t|}}}|<td>{{{p2t}}}</td>|<td></td>}}{{#if: {{{p2d|}}}|<td>{{{p2d|}}}</td>|<td></td>}}</tr>}}{{#if: {{{p3d|}}}|<tr><td>Parameter 3</td>{{#if: {{{p3t|}}}|<td>{{{p3t}}}</td>|<td></td>}}{{#if: {{{p3d|}}}|<td>{{{p3d|}}}</td>|<td></td>}}</tr>}}{{#if: {{{p4d|}}}|<tr><td>Parameter 4</td>{{#if: {{{p4t|}}}|<td>{{{p4t}}}</td>|<td></td>}}{{#if: {{{p4d|}}}|<td>{{{p4d|}}}</td>|<td></td>}}</tr>}}<tr><th colspan="3" align="center">Result:</th></tr><tr><th>Is present?</th><th>Type</th><th>Description</th></tr><tr>{{#ifexpr: {{{r|0}}}=1 | <td>Yes</td> | <td colspan="3">None</td>}}{{#if: {{{rt|}}}|<td>{{{rt}}}</td>|<td></td>}}{{#if: {{{rd|}}}|<td>{{{rd}}}</td>|<td></td>}}</tr></table>
+
<table cellspacing="2" cellpadding="4" style="border: 1px solid #cedff2; text-align: left; line-height: 1.5em; margin: .5em 0 .5em 1em"><!--
  
 +
//-- Header
 +
-->{{#ifexpr: {{{noheader|0}}}=1|<!-- Do not display header -->|<!--
 +
----><caption><!--
 +
------>{{#if: {{{name|}}} | '''{{{name}}} | '''{{PAGENAMEE}}''' }}<!--
 +
----></caption><!--
 +
-->}}<!--
 +
 +
--><tr><!--
 +
----><th colspan="3" align="center">Number of parameters: {{{np|0}}}</th><!--
 +
--></tr><!--
 +
 +
-->{{#ifexpr: {{{np|0}}}>0|<!--
 +
----><tr><!--
 +
------><th>Parameter #</th><!--
 +
------><th>Type</th><!--
 +
------><th>Description</th><!--
 +
----></tr><!--
 +
-->}}<!--
 +
 +
-->{{#if: {{{p1t|}}} | <tr><td>1.</td><td>{{{p1t|}}}</td><td>{{{p1d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p2t|}}} | <tr><td>2.</td><td>{{{p2t|}}}</td><td>{{{p2d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p3t|}}} | <tr><td>3.</td><td>{{{p3t|}}}</td><td>{{{p3d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p4t|}}} | <tr><td>4.</td><td>{{{p4t|}}}</td><td>{{{p4d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p5t|}}} | <tr><td>5.</td><td>{{{p5t|}}}</td><td>{{{p5d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p6t|}}} | <tr><td>6.</td><td>{{{p6t|}}}</td><td>{{{p6d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p7t|}}} | <tr><td>7.</td><td>{{{p7t|}}}</td><td>{{{p7d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p8t|}}} | <tr><td>8.</td><td>{{{p8t|}}}</td><td>{{{p8d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p9t|}}} | <tr><td>9.</td><td>{{{p9t|}}}</td><td>{{{p9d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p10t|}}} | <tr><td>10.</td><td>{{{p10t|}}}</td><td>{{{p10d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p11t|}}} | <tr><td>11.</td><td>{{{p11t|}}}</td><td>{{{p11d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p12t|}}} | <tr><td>12.</td><td>{{{p12t|}}}</td><td>{{{p12d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p13t|}}} | <tr><td>13.</td><td>{{{p13t|}}}</td><td>{{{p13d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p14t|}}} | <tr><td>14.</td><td>{{{p14t|}}}</td><td>{{{p14d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p15t|}}} | <tr><td>15.</td><td>{{{p15t|}}}</td><td>{{{p15d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p16t|}}} | <tr><td>16.</td><td>{{{p16t|}}}</td><td>{{{p16d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p17t|}}} | <tr><td>17.</td><td>{{{p17t|}}}</td><td>{{{p17d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p18t|}}} | <tr><td>18.</td><td>{{{p18t|}}}</td><td>{{{p18d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p19t|}}} | <tr><td>19.</td><td>{{{p19t|}}}</td><td>{{{p19d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p20t|}}} | <tr><td>20.</td><td>{{{p20t|}}}</td><td>{{{p20d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p21t|}}} | <tr><td>21.</td><td>{{{p21t|}}}</td><td>{{{p21d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p22t|}}} | <tr><td>22.</td><td>{{{p22t|}}}</td><td>{{{p22d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p23t|}}} | <tr><td>23.</td><td>{{{p23t|}}}</td><td>{{{p23d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p24t|}}} | <tr><td>24.</td><td>{{{p24t|}}}</td><td>{{{p24d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p25t|}}} | <tr><td>25.</td><td>{{{p25t|}}}</td><td>{{{p25d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p26t|}}} | <tr><td>26.</td><td>{{{p26t|}}}</td><td>{{{p26d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p27t|}}} | <tr><td>27.</td><td>{{{p27t|}}}</td><td>{{{p27d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p28t|}}} | <tr><td>28.</td><td>{{{p28t|}}}</td><td>{{{p28d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p29t|}}} | <tr><td>29.</td><td>{{{p29t|}}}</td><td>{{{p29d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p30t|}}} | <tr><td>30.</td><td>{{{p30t|}}}</td><td>{{{p30d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p31t|}}} | <tr><td>31.</td><td>{{{p31t|}}}</td><td>{{{p31d|}}}</td></tr> }}<!--
 +
-->{{#if: {{{p32t|}}} | <tr><td>32.</td><td>{{{p32t|}}}</td><td>{{{p32d|}}}</td></tr> }}<!--
 +
 +
--><tr><!--
 +
----><th colspan="3" align="center">Return value:</th><!--
 +
--></tr><!--
 +
 +
--><tr><!--
 +
----><th colspan="2">Type</th><!--
 +
----><th>Description</th><!--
 +
--></tr><!--
 +
 +
--><tr><!--
 +
----><td colspan="2">{{#ifexpr: {{{r|0}}}=1 | {{{rt|Unknown}}} | ''None''}}</td><!--
 +
----><td>{{{rd|}}}<!--
 +
--></tr></table><!--
 +
 +
-->{{#ifexpr: {{{game|4}}}=5 | [[Category:Native functions (GTA V)]] | [[Category:Native functions (GTA IV)]]}}
 +
<noinclude><pre>
 +
{{Native
 +
|name    = <name of native (optional: defaults to page title)>
 +
|game    = <use 5 for GTA V's native; 4 for IV's (default)>
 +
|noheader = <use 1 if you dont want a table header; otherwise 0>
 +
|np      = <number of parameters (max: 32)>
 +
|p<1-32>t = <parameter type (integer, float, pointer, handle, boolean)>
 +
|p<1-32>d = <parameter description>
 +
|r        = <1 if function returns something, otherwise 0>
 +
|rt      = <result value type>
 +
|rd      = <result value description>
 +
}}
 +
</pre>[[Category:Native functions (GTA V)]][[Category:Native functions (GTA IV)]]</noinclude>
 
[[Category:Native functions]]
 
[[Category:Native functions]]

Latest revision as of 20:43, 6 June 2015

Native
Number of parameters: 0
Return value:
TypeDescription
None
{{Native
|name     = <name of native (optional: defaults to page title)>
|game     = <use 5 for GTA V's native; 4 for IV's (default)>
|noheader = <use 1 if you dont want a table header; otherwise 0>
|np       = <number of parameters (max: 32)>
|p<1-32>t = <parameter type (integer, float, pointer, handle, boolean)>
|p<1-32>d = <parameter description>
|r        = <1 if function returns something, otherwise 0>
|rt       = <result value type> 
|rd       = <result value description>
}}