1
0
EQ2Emu/docs/lua_functions/GetPlayersInZone.md
2025-05-13 22:57:49 -04:00

16 lines
479 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Function: GetPlayersInZone(Zone)
Description: Retrieves a list of all player spawns currently present in the specified zone.
Parameters:
Zone: Zone The zone object or context to search in.
Returns: Table A list (array) of player Spawn objects in that zone.
Example:
-- Example usage (announce a message to all players in the zone)
for _, player in ipairs(GetPlayersInZone(GetZone(NPC))) do
SendMessage(player, "The dragon roars in the distance!", "red")
end