PL/takeAllWeapons: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{PL/Server function}} This function removes every weapons from a specified ped, rendering it unarmed. {{Note|Weapons are removed when a ped dies by default. Thi...") |
(No difference)
|
Revision as of 17:37, 13 September 2018
This function removes every weapons from a specified ped, rendering it unarmed.
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 thePlayer )
Wymagane argumenty
Wynik
Zwraca true jeśli broń została poprawnie nadana, false jeśli nie.
Przykłady
Ten przykład dodaje komendę "usunbronie", która usuwa bronie wszystkim graczom na serwerze.
addCommandHandler( "usunbronie", function ( player, command ) for k, v in ipairs ( getElementsByType("player") ) do takeAllWeapons(v) outputChatbox("Gracz " .. getPlayerName( player ) .. " zabiera wszystkim bronie.", player ) end end )
Zobacz również
Shared