GetPlayerArmor

From Onset Developer Wiki
Revision as of 15:50, 19 November 2019 by 28days (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
GetPlayerArmor

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Get the armor health of the specified player.

Syntax

GetPlayerArmor(player)
Client Syntax
GetPlayerArmor()

Parameters

  • player
    The player identifier.

Return Value

  • The armor value.

Example

AddCommand("armor", function(playerid)
	if GetPlayerArmor(playerid) < 30.0 then
		SetPlayerArmor(playerid, 100.0)
	else
		AddPlayerChat(playerid, "You have enough armor.")
	end
end)

See also