Zadax
Enthusiast
Hello, everyone! I just made this script, and, as the title may hint, it broadcasts a world message telling the server a staff member has logged in (and it's color coded. because everything is better when it's color coded.) (i might or not might have a thing for color-coding scripts.)
WARNING: If you and your whole staff goes crazy because of this, it's not my fault.....at all.
Code:
--Script made by Zadax
print "Loading Gm Login/Logout Script"
local Classes = {
[1] = "C79C6E",
[2] = "F58CBA",
[3] = "ABD473",
[4] = "FFF569",
[5] = "FFFFFF",
[6] = "C41F3B",
[7] = "0070DE",
[8] = "69CCF0",
[9] = "9482C9",
[11] = "FF7d0A"
};
local Rank = { -- Add more ranks if you need to
[2] = "|cFFE700B1Moderator|r",
[3] = "|cFFE7A200Administrator|r",
[4] = "|cFFDC143COwner|r"
};
local function GMLogin (event, player)
print "A staff member has logged in"
if player:GetGMRank() >= 2 then
SendWorldMessage("A staff member has logged on. Character: |cFF"..Classes[player:GetClass()]..""..player:GetName().."|r. Rank: "..Rank[player:GetGMRank()].."")
else
end
end
local function GMLogout (event, player)
print "A staff member has logged out"
if player:GetGMRank() >2 then
SendWorldMessage("|cFF"..Classes[player:GetClass()]..""..player:GetName().."|r ("..Rank[player:GetGMRank()]..") has logged out.")
else
end
end
RegisterServerHook(3, GMLogin)
RegisterServerHook(4, GMLogout)
WARNING: If you and your whole staff goes crazy because of this, it's not my fault.....at all.
Last edited: