RU/takeAllWeapons: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Enterprise (talk | contribs)
New page: {{Server function}} This function removes every weapons from a specified player, rendering him unarmed. ''Note: weapons are removed when a player dies by default. This means that it is on...
 
Enterprise (talk | contribs)
No edit summary
Line 1: Line 1:
{{Server function}}
{{Server function}}
{{Translate}}
This function removes every weapons from a specified player, rendering him unarmed.
This function removes every weapons from a specified player, rendering him unarmed.


Line 21: Line 22:
==See Also==
==See Also==
{{RU/Weapon functions}}
{{RU/Weapon functions}}
[[en:takeAllWeapons]]

Revision as of 10:52, 10 July 2009

This page requires local translation. If page will remain not translated in reasonable period of time it would be deleted.
After translating the page completely, please remove the ‎{{translate}}‎ tag from the page.

This function removes every weapons from a specified player, rendering him unarmed.

Note: weapons are removed when a player dies by default. This means that it is only appropriate to use this function while a player is alive.

Syntax

takeAllWeapons ( player thePlayer )

Required Arguments

  • thePlayer: A player object referencing the specified player

Returns

Returns true if the function succeeded, false otherwise.

Example

This example removes all weapons from every player

takeAllWeapons ( getRootElement() )  --remove all the weapons
outputChatBox ( "Weapons are not permitted!" ) --tell the players why they lost their weapons

See Also

Серверные функции

  • giveWeapon - дает указанное оружие игроку или пешеходу
  • takeAllWeapons - удаляет всё оружие с указанного игрока или пешехода
  • takeWeapon - удаляет указанное оружие или боеприпасы с игрока или пешехода
ДО ВЕРСИИ 1.3.1 :
  • takeWeaponAmmo - удаляет определённое кол-во боеприпасов у игрока для указанного оружия
  • giveWeaponAmmo - даёт определённое кол-во боеприпасов игроку для указанного оружия

Клиентские функции

Общие функции

  • getOriginalWeaponProperty - получает исходное свойство указанного типа оружия
  • getPickupWeapon - получает ID оружия из указанного пикапа
  • getSlotFromWeapon - получает слот к которому принадлежит оружие
  • getWeaponIDFromName - получает ID оружия из его названия
  • getWeaponNameFromID - получает название оружия или причину смерти из его ID
  • getWeaponProperty - получает свойство указанного оружия
  • setWeaponAmmo - устанавливает определенное кол-во боеприпасов для указанного оружия
  • setWeaponProperty - устанавливает свойство указанного типа оружия