Skip to main content

Player (Server-side)

Player

getIdentifier

รับตัวระบุของผู้เล่นตามประเภทที่ระบุ

บรรทัดที่ 22
function Player.getIdentifier(playerId, identifierType)
return GetPlayerIdentifierByType(playerId, identifierType)
end

Parameters

  • playerId: integer
    • Net ID ของผู้เล่น
  • identifierType: string
    • ประเภทตัวระบุ (steam, discord, license, license2, fivem, ip)

Returns

  • identifier: string | nil
    • ตัวระบุที่พบ หรือ nil หากไม่พบ

getIdentifiers

รับตัวระบุทั้งหมดของผู้เล่น

บรรทัดที่ 29
function Player.getIdentifiers(playerId)
return GetPlayerIdentifiers(playerId)
end

Parameters

  • playerId: integer
    • Net ID ของผู้เล่น

Returns

  • identifiers: string[]
    • ตัวระบุทั้งหมดของผู้เล่น