全体にアナウンス・個人にメッセージ

Print message to all, but only broadcast to the target player
  • Function: Print a message to all players, but only broadcast to the target.
  • Takes: string, table, string
  • Returns: void
  • Example Input: "Hello world!", {1,1,1}, "White"
  • Example Output: void
 
function allGameMessage(msg, rgb, target_color)
for _, player in ipairs(Player.getPlayers()) do
if player.color == target_color then
player.broadcast(msg, rgb)
else
player.print(msg, rgb)
end
end

タグ:

+ タグ編集
  • タグ:
最終更新:2019年10月07日 20:39