GetPlayerClothesDrawable

From GT-MP
Jump to: navigation, search
GetPlayerClothesDrawable
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Returns the specified player's clothing drawable/ID on the specified slot.

Icon-info.png
This function will return -1 when there is no clothing set on the specified slot. (Version 0.1.7)

Syntax

API.getPlayerClothesDrawable(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.

NOTE: This function returns data in int type.

Usage example(s)

[Command("maskcheck")]
public void MaskCheck(Client player)
{
    if (API.getPlayerClothesDrawable(player, 1) > 0)
    {
        API.sendChatMessageToPlayer(player, "You have a mask.");
    }
    else
    {
        API.sendChatMessageToPlayer(player, "You don't have a mask.");
    }
}

References