Likes: 0
Results 1 to 9 of 9
Thread: [LUA] Global Chat System
-
19-08-10, 10:11 PM #1
[LUA] Global Chat System
Register to remove this adAgain, I was browsing through my LUA folder when I found this..
Simple chat system, allows both Horde & Alliance to chat with each other on a "channel". Like trade, but you don't have an option to leave. You can edit the Command for the Chat System to anything, however it can't be ".s" as those functions are client based, not server side. e.g. #chat, #c, #cc, #ch etc.
Chat System - Pastebin
Code:local ChatMsg = "#chat" -- Command for use of chat system --[[ EDIT THE BELOW SCRIPT AT YOUR OWN RISK ]]-- function ChatSystem (event, player, message, type, language) if (message:find(ChatMsg.." ") == 1) then local text = message:gsub(ChatMsg.." ", "") local plrs = GetPlayersInWorld() for k, v in pairs(plrs) do if (player:GetTeam() == 0) then -- Alliance local GMrank = player:GetGmRank() if (GMrank == 'az') then v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cFFFFA500[Admin] |cffffff00["..player:GetName().."]: |cff00ff00"..text.."") -- Admin Tag elseif (GMrank == 'a') then v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cFFFFA500[GM] |cffffff00["..player:GetName().."]: |cff00ff00"..text.."") -- GM Tag else v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cff00ff00[Alliance] |cffffff00["..player:GetName().."]: |cff00ff00"..text.."") -- Ally Tag end elseif (player:GetTeam() == 1) then -- Horde local GMrank = player:GetGmRank() if (GMrank == 'az') then v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cFFFFA500[Admin] |cffffff00["..player:GetName().."]: |cffff0000"..text.."") -- Admin Tag elseif (GMrank == 'a') then v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cFFFFA500[GM] |cffffff00["..player:GetName().."]: |cffff0000"..text.."") -- GM Tag else v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cffff0000[Horde] |cffffff00["..player:GetName().."]: |cffff0000"..text.."") -- Horde Tag end end end return 0 end end RegisterServerHook(16, "ChatSystem")
› See More: [LUA] Global Chat System
-
22-08-10, 10:56 PM #2
1st comment and if i can. . .awesome share!
-
23-08-10, 08:49 AM #3
Yeah, it's rather nice for large servers, or even small servers to communicate easily. Looks good and is easy to use.
-
23-08-10, 01:00 PM #4
Yupp but it didn't work for my server but i still give you cred
-
23-08-10, 05:08 PM #5
What error did it give? If your using ArcEmu should work perfectly, all you do is put it into your Scripts folder, load world.exe up (or type reloadscripts in the world.exe screen). It should say "Loaded 1 script" if thats the only script you have. If there is an error, it'll list it. Second, try in-game typing #c Hello!
Unless you changed the chat command, then use that.
-
24-08-10, 10:50 AM #6
Na when i type in #chat to join the channel it just says "#chat" Outloud and trust me i know what to do with lua scripts im no noobs xD
-
24-08-10, 03:53 PM #7
It's technically not a "channel" as such. You do not type #chat to join. You type #chat message here. Everyone will get this message.
-
24-08-10, 11:30 PM #8
So you have to type that everytime lol :P ok it works thanks dude =)
-
25-08-10, 10:40 AM #9
Register to remove this adNo problem