GetPlayerSkillPoints

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

getPlayerSkillPoints

Returns a player's authoritative learning point count value.

Syntax

number|false getPlayerSkillPoints(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 learning point count:

local value = getPlayerSkillPoints(playerId)
if value ~= false then
    outputDebugString("skill_points: " .. tostring(value))
end

Notes

  • Available only in server-side resource scripts.
  • This is a convenience wrapper around getPlayerStat(playerId, "skill_points").