Template:Weapon functions: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Sorted functions alphabetically)
(Rework)
 
(19 intermediate revisions by 9 users not shown)
Line 1: Line 1:
*[[getSlotFromWeapon]]
<includeonly>
*[[getWeaponIDFromName]]
<ul>
*[[getWeaponNameFromID]]
{{#if: {{{1|}}}
*[[giveWeapon]]
| {{#ifeq: {{lc:{{{1}}}}} | server
*[[giveWeaponAmmo]]
|
*[[setWeaponAmmo]]
    <!-- SERVER functions -->
*[[takeAllWeapons]]
    <li>[[giveWeapon]]</li>
*[[takeWeapon]]
    <li>[[takeAllWeapons]]</li>
*[[takeWeaponAmmo]]
    <li>[[takeWeapon]]</li>
  }}
</br>
<li style="list-style: none; margin-left: -1.6em;">'''Shared'''</li>
}}
 
<!-- SHARED functions-->
<li>[[getWeaponProperty]]</li>
<li>[[getPickupWeapon]]</li>
<li>[[getOriginalWeaponProperty]]</li>
<li>[[getSlotFromWeapon]]</li>
<li>[[getWeaponIDFromName]]</li>
<li>[[getWeaponNameFromID]]</li>
<li>[[setWeaponAmmo]]</li>
<li>[[setWeaponProperty]]</li>
</ul>
</includeonly>
 
<noinclude>
{{Functions list info}}
[[Category:Functions templates]]</noinclude>

Latest revision as of 18:24, 6 September 2024


The template contains a list of functions. It accepts 1 parameter, which specifies whether the functions should be displayed for server or client. Regardless of the parameter, a list of shared functions will also be displayed

Example: {{Camera functions|client}} will display a list of client-side functions, and below it a list of shared functions, similarly for the server.