AX.ChatCommand.box = {AdminCommand=true; Info = " HA KyILAKAX";};
function AX.ChatCommand.box:func(player, chatMsg)
if (XIsAdmin(player)) then
if (not boxistrue) then
boxistrue = true;
local players = System.GetEntitiesByClass("Player");
local restrictedItems = "SCAR,FY71,SOCOM,C4,LAW,Claymore,FGL40,AY69,GaussRifle,DSG1,Shotgun,SMG,Hurricane,AlienMount,explosivegrenade,empgrenade,TACGun";
for i, p in ipairs(players) do
p.inventory:Destroy();
ItemSystem.GiveItem("Fists", p.id, true);
ItemSystem.GiveItem("AlienCloak", p.id, true);
ItemSystem.GiveItem("OffHand", p.id, true);
end
System.ExecuteCommand("i_restrictItems "..restrictedItems);
XMessageBigCenterToAll("<font color=\"#ff0000\">HA KyILAKAX!!!!</font");
Script.SetTimer( 2500,function() System.ExecuteCommand(XFormat("sv_restart")); end);
else
boxistrue = false;
System.ExecuteCommand("i_restrictItems nothing");
XMessageBigCenterToAll("<font color=\"#ff0000\">BCE!</font");
Script.SetTimer( 2500,function() System.ExecuteCommand(XFormat("sv_restart")); end);
end
else
XMessageBigCenterToPlayer(player, "<font color=\"#D20000\">!box is an admin-only commad!</font>");
end
end
AX.ChatCommand.ay69 = {ClanCommand=true;};
function AX.ChatCommand.ay69:func(player, chatMsg)
--===================================================================================
-- your Config.
--===================================================================================
local Delay = 5; -- in Minutes
--===================================================================================
if (player.actor:GetSpectatorMode()~=0) then
XMessageChatToPlayer( player, "[ERROR] You must in Game to use!");
else
local mustWait = DelayControl(Delay, player.CommandAY69);
if (mustWait) then
XMessageChatToPlayer( player, "[ERROR] You can only use !ay69 every "..Delay.." Minutes (Remaining Time: "..mustWait.." Minutes)!");
else
if (player:IsOnVehicle()) then
XMessageChatToPlayer( player, "[ERROR] Leave your Vehicle!");
elseif (not player:IsDead()) then
player.CommandAY69 = _time;
local Time = 0;
for i = 6, 1, -1 do
Script.SetTimer( Time,function()
XMessageBigCenterToPlayer(player, "<font color=\"#ffffff\">Keep a free Hand for the Weapon !</font><font color=\"#ff0000\"> "..(i-1).." </font><font color=\"#ffffff\">Seconds</font>");
if (i==1) then
XItemGive(player:GetName(), "AY69");
XItemGive(player:GetName(), "AY69");
end
end);
Time = Time + 1000;
end
end
end
end
end