RemoveAllPlayerWeapons

From GT-MP
Jump to: navigation, search
RemoveAllPlayerWeapons
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

This function removes all weapons of the given player.


Syntax

API.removeAllPlayerWeapons(Client player);

Required Arguments

  • player: parameter input should be in Client type.

Usage example(s)

/discardallweps command that removes every weapon you have:

In C#
Server-Side Function

[Command("discardallweps")]
public void CMD_DiscardAllWeps(Client player)
{
    API.removeAllPlayerWeapons(player);
    API.sendChatMessageToPlayer(player, "You removed all of your weapons.");
}

References