📜  FiveM Lua 如何创建所有在线玩家 id 的表 - Lua 代码示例

📅  最后修改于: 2022-03-11 14:54:54.708000             🧑  作者: Mango

代码示例1
for _, playerId in ipairs(GetPlayers()) do
  local name = GetPlayerName(playerId)
  print(('Player %s with id %i is in the server'):format(name, playerId))
  -- ('%s'):format('text') is same as string.format('%s', 'text)
end