GetPlayerStrength
getPlayerStrength
Returns a player's authoritative strength value.
Syntax
number|false getPlayerStrength(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns the current numeric value, or false if the player is invalid or the value has not been initialized.
Examples
Read a player's strength:
local value = getPlayerStrength(playerId)
if value ~= false then
outputDebugString("strength: " .. tostring(value))
end
Notes
- Available only in server-side resource scripts.
- This is a convenience wrapper around
getPlayerStat(playerId, "strength").