ParaPlayerService.GetPlayerById

Declaration

public static ParaPlayer GetPlayerById(int playerID)

Parameter

playerIDSpecified Player ID

Description

If it exists, the ParaPlayer objects of the specified GameObject will be returned; otherwise, null will be returned.

function GetPlayerById(id)
  local player = CS.ParaPlayerService.GetPlayerById(id)
  if player ~= nil then
    print(player.playerID)
  end
  return player
end