TakeAllWeapons

From Multi Theft Auto: Wiki
Revision as of 22:39, 6 September 2024 by FileEX (talk | contribs) (→‎See Also)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function removes every weapons from a specified ped, rendering it unarmed.

[[{{{image}}}|link=|]] Note: Weapons are removed when a ped dies by default. This means that it is only appropriate to use this function while a ped is alive.

Syntax

bool takeAllWeapons ( ped thePed )

Required Arguments

  • thePed: A ped element referencing the specified ped

Returns

Returns true if the function succeeded, false otherwise.

Example

This example removes all weapons from every player

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

See Also