ClearPlayerAccessory

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

This function removes the accessory on the specified slot of the given player.


Syntax

API.clearPlayerAccessory(Client player, int slot);

Required Arguments

  • player: parameter input should be in Client type.
  • slot: parameter input should be in int type. See Character Components.

Usage example(s)

/removehat command which will remove your hat (slot 0):

In C#
Server-Side Function

[Command("removehat")]
public void CMD_ByeHat(Client player)
{
    API.clearPlayerAccessory(player, 0);
}

References