Code:
AEGIS.chatCommands.admin = {adminOnly=true;};
function AEGIS.chatCommands.admin:func(player, chatMsg)
if (not XIsProtected(player)) then
XSendChatToAll(nil, "%s has logged into admin mode", player:GetName());
local name = player:GetName();
XPlayerChangeName(name, XFormat("%s%s", XCfgVar.adminTag, name));
else
XSendChatToAll(nil, "%s has logged out from the admin mode", player:GetName());
local name = player:GetName();
local newname = string.sub(name, string.len(XCfgVar.adminTag)+1, string.len(name));
XPlayerChangeName(name, newname);
end
end
Es gibt aber nur ein problem, wenn man nochmal !admin macht loggt man sich nicht aus, sonder wird umbenennt in z.B. [Admin][Admin]Installation. Also man kann sich hier nur einloggen, nicht ausloggen.
Code:
if (XCfgVar.useServerJoinWelcomeMessage and XCfgVar.serverJoinWelcomeMessage) then
Script.SetTimer(20000, function() XSendBigCenterMessageToPlayer(player,"* <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> *"); end);
Script.SetTimer(21000, function() XSendBigCenterMessageToPlayer(player,"** <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> **"); end);
Script.SetTimer(22000, function() XSendBigCenterMessageToPlayer(player,"*** <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> ***"); end);
Script.SetTimer(23000, function() XSendBigCenterMessageToPlayer(player,"**** <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> ****"); end);
Script.SetTimer(24000, function() XSendBigCenterMessageToPlayer(player,"* <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> *"); end);
Script.SetTimer(25000, function() XSendBigCenterMessageToPlayer(player,"** <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> **"); end);
Script.SetTimer(26000, function() XSendBigCenterMessageToPlayer(player,"*** <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> ***"); end);
Script.SetTimer(27000, function() XSendBigCenterMessageToPlayer(player,"**** <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> ****"); end);
Script.SetTimer(28000, function() XSendBigCenterMessageToPlayer(player,"* <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> *"); end);
Script.SetTimer(29000, function() XSendBigCenterMessageToPlayer(player,"** <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> **"); end);
Script.SetTimer(30000, function() XSendBigCenterMessageToPlayer(player,"*** <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> ***"); end);
Script.SetTimer(31000, function() XSendBigCenterMessageToPlayer(player,"**** <font color=\"#ffff00\">Welcome to a </font><font color=\"#ff8000\">Noobhunters.org</font><font color=\"#ffff00\"> server !</font> ****"); end);
if (XIsPremium(player)) then
Script.SetTimer(32000, function() XSendBigCenterMessageToPlayer(player,"* <font color=\"#ffff00\">Your PREMIUM account is ON !</font> *"); end);
Script.SetTimer(33000, function() XSendBigCenterMessageToPlayer(player,"** <font color=\"#ffff00\">Your PREMIUM account is ON !</font> **"); end);
Script.SetTimer(34000, function() XSendBigCenterMessageToPlayer(player,"*** <font color=\"#ffff00\">Your PREMIUM account is ON !</font> ***"); end);
Script.SetTimer(35000, function() XSendBigCenterMessageToPlayer(player,"**** <font color=\"#ffff00\">Your PREMIUM account is ON !</font> ****"); end);
Script.SetTimer(36000, function() XSendBigCenterMessageToPlayer(player,"* <font color=\"#ffff00\">Your PREMIUM account is ON !</font> *"); end);
Script.SetTimer(37000, function() XSendBigCenterMessageToPlayer(player,"** <font color=\"#ffff00\">Your PREMIUM account is ON !</font> **"); end);
Script.SetTimer(38000, function() XSendBigCenterMessageToPlayer(player,"*** <font color=\"#ffff00\">Your PREMIUM account is ON !</font> ***"); end);
Script.SetTimer(39000, function() XSendBigCenterMessageToPlayer(player,"**** <font color=\"#ffff00\">Your PREMIUM account is ON !</font> ****"); end);
Script.SetTimer(40000, function() XSendBigCenterMessageToPlayer(player," <font color=\"#ffff00\">Your PREMIUM account is ON !</font> "); end);
else
Script.SetTimer(32000, function() XSendBigCenterMessageToPlayer(player,"* <font color=\"#ffff00\">Order your PREMIUM account =></font> <font color=\"#ff0000\">Noobhunters.org</font> *"); end);
Script.SetTimer(33000, function() XSendBigCenterMessageToPlayer(player,"** <font color=\"#ffff00\">Order your PREMIUM account =></font> <font color=\"#ff0000\">Noobhunters.org</font> **"); end);
Script.SetTimer(34000, function() XSendBigCenterMessageToPlayer(player,"*** <font color=\"#ffff00\">Order your PREMIUM account =></font> <font color=\"#ff0000\">Noobhunters.org</font> ***"); end);
Script.SetTimer(35000, function() XSendBigCenterMessageToPlayer(player,"**** <font color=\"#ffff00\">Order your PREMIUM account =></font> <font color=\"#ff0000\">Noobhunters.org</font> ****"); end);
Script.SetTimer(36000, function() XSendBigCenterMessageToPlayer(player,"* <font color=\"#ffff00\">Order your PREMIUM account =></font> <font color=\"#ff0000\">Noobhunters.org</font> *"); end);
Script.SetTimer(37000, function() XSendBigCenterMessageToPlayer(player,"** <font color=\"#ffff00\">Order your PREMIUM account =></font> <font color=\"#ff0000\">Noobhunters.org</font> **"); end);
Script.SetTimer(38000, function() XSendBigCenterMessageToPlayer(player,"*** <font color=\"#ffff00\">Order your PREMIUM account =></font> <font color=\"#ff0000\">Noobhunters.org</font> ***"); end);
Script.SetTimer(39000, function() XSendBigCenterMessageToPlayer(player,"**** <font color=\"#ffff00\">Order your PREMIUM account =></font> <font color=\"#ff0000\">Noobhunters.org</font> ****"); end);
Script.SetTimer(40000, function() XSendBigCenterMessageToPlayer(player," <font color=\"#ffff00\">Order your PREMIUM account =></font> <font color=\"#ff0000\">Noobhunters.org</font> "); end);
end
end
end