GetPlayerArmor

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

This function will tell you how much armor the given player has.


Syntax

API.getPlayerArmor(Client player);

Required Arguments

  • player: parameter input should be in Client type.

NOTE: This function returns data in int type.


Usage example(s)

/armor to see how much armor you have:

In C#
Server-Side Function

[Command("armor")]
public void CMD_MyArmor(Client player)
{
    API.sendChatMessageToPlayer(player, "Your armor: " + API.getPlayerArmor(player));
}


References