SHOW:
|
|
- or go back to the newest paste.
| 1 | --[==[ | |
| 2 | GameMaster Raid Announce by Salja | |
| 3 | ]==] | |
| 4 | ||
| 5 | local ChatPrefix = "#announce" | |
| 6 | - | local worldPlayers = GetPlayersInWorld(TEAM_NEUTRAL, false) |
| 6 | + | |
| 7 | if (ChatPrefix:sub(-1) ~= " ") then | |
| 8 | ChatPrefix = ChatPrefix.." "; | |
| 9 | end | |
| 10 | ||
| 11 | local function ChatSystem(event, player, msg, _, lang) | |
| 12 | if (msg:sub(1, ChatPrefix:len()) == ChatPrefix) then | |
| 13 | if player:IsGM() then | |
| 14 | local t = table.concat({"|cff7DFF00[", "|Hplayer:", player:GetName(), "|h", player:GetName(), "]|h:|r ", msg:sub(ChatPrefix:len()+1), ""});
| |
| 15 | - | local t = table.concat({"|cff7DFF00[", "|Hplayer:", player:GetName(), "|h", player:GetName(), "]|h:|r ", msg:sub(ChatPrefix:len()+1), ""});
|
| 15 | + | for _, p in ipairs(GetPlayersInWorld(2, false)) do |
| 16 | - | player:SendChatMessageToPlayer(40, 0, t, worldPlayers) |
| 16 | + | player:SendChatMessageToPlayer(40, 0, t, p) |
| 17 | end | |
| 18 | else | |
| 19 | PrintInfo("Not GameMaster or GameMaster modus off")
| |
| 20 | end | |
| 21 | end | |
| 22 | end | |
| 23 | ||
| 24 | RegisterPlayerEvent(18, ChatSystem) |