AEGIS.chatCommands.party = {adminOnly=true;}; function AEGIS.chatCommands.party:func(player, chatMsg) local party = string.match((chatMsg.text), "^!party (%w+)"); local f = {w = unknown; s = unknown; c = "<font color=\"#0000ff\">!! ! ";}; if (party=="tac") then f.s = "TACGun"; f.w = "Tacgun"; f.c = "<font color=\"#ff0000\">!! ! "; elseif (party=="gauss") then f.s = "GaussRifle"; f.w = "Gauss"; f.c = "<font color=\"#00ff00\">!! ! "; else XMessageChatToPlayer( player, "Chat command syntax: !party [TAC GAUSS]"); return; end XMessageChatToPlayer( player, ""..f.w.."-Party started!"); local tmessage = 69; local wmessage = 5; local cmessage = false; local display; for display = 1, tmessage do Script.SetTimer(display * 100, function() tmessage = tmessage - 1; if (cmessage and tmessage>50) then XMessageBigCenterToAll(""..f.c..""..f.w.." Party ! !!<\font>"); cmessage = false; elseif (tmessage>50) then XMessageBigCenterToAll("<font color=\"#ffffff\">!! ! "..f.w.." Party ! !!<\font>"); cmessage = true; end if (tmessage==0) then XMessageBigCenterToAll(" "); XItemGive("all", ""..f.s..""); elseif (tmessage==50 or tmessage==40 or tmessage==30 or tmessage==20 or tmessage==10) then XMessageBigCenterToAll("<font color=\"#ffffff\">Keep a free Hand for the Weapon !</font><font color=\"#ff0000\"> "..wmessage.." </font><font color=\"#ffffff\">Seconds</font>"); wmessage = wmessage - 1; end end); end end
AEGIS.chatCommands.map = {adminOnly=true;}; function AEGIS.chatCommands.map:func(player, chatMsg) local rules, maps = string.match((chatMsg.text), "^!map (.*) (.*)$"); if (not rules) then XMessageChatToPlayer( player, "Chat command syntax: !map [RULES] [MAPNAME]"); return; end local MatchCounter = 0; local MatchName = false; local MatchCostum = false; local FullMatch = false; if (rules=="ia" or rules=="tia") then if (XCfgVar.StandartTIAMaps) then for i, MapName in ipairs(XCfgVar.StandartTIAMaps)do if (MapName==maps) then FullMatch = true; MatchCounter = 1; MatchName = MapName; elseif (not FullMatch) and (string.find(MapName, maps)) then MatchCounter = MatchCounter + 1; MatchName = MapName; end end end if (XCfgVar.CostumTIAMaps) then for i, MapName in ipairs(XCfgVar.CostumTIAMaps)do if (MapName==maps) then FullMatch = true; MatchCounter = 1; MatchName = MapName; MatchCostum = true; elseif (not FullMatch) and (string.find(MapName, maps)) then MatchCounter = MatchCounter + 1; MatchName = MapName; MatchCostum = true; end end end elseif (rules=="ps") then if (XCfgVar.StandartPSMaps) then for i, MapName in ipairs(XCfgVar.StandartPSMaps)do if (MapName==maps) then FullMatch = true; MatchCounter = 1; MatchName = MapName; elseif (not FullMatch) and (string.find(MapName, maps)) then MatchCounter = MatchCounter + 1; MatchName = MapName; end end end if (XCfgVar.CostumPSMaps) then for i, MapName in ipairs(XCfgVar.CostumPSMaps)do if (MapName==maps) then FullMatch = true; MatchCounter = 1; MatchName = MapName; MatchCostum = true; elseif (not FullMatch) and (string.find(MapName, maps)) then MatchCounter = MatchCounter + 1; MatchName = MapName; MatchCostum = true; end end end else XMessageChatToPlayer( player, "[ERROR] Game Rule is misspelled: ia, tia or ps"); XMessageChatToPlayer( player, "[ERROR] Typed: "..rules); return; end if (MatchCounter==0) then XMessageChatToPlayer( player, "[ERROR] Mapcall: "..maps); XMessageChatToPlayer( player, "[ERROR] Map not found or is misspelled"); elseif (MatchCounter>1) and (not MatchFinal) then XMessageChatToPlayer( player, "[ERROR] Mapcall: "..maps); XMessageChatToPlayer( player, "[ERROR] Map Name multiple Matches"); else Script.SetTimer( 4000,function() if (MatchCostum) then System.ExecuteCommand("net_mapDownloadURL "..XCfgVar.CostumMapsAutodownloadURL..""..MatchName..".zip"); end if (rules=="ia") then System.ExecuteCommand("sv_gamerules = InstantAction"); System.ExecuteCommand("g_fraglimit "..XCfgVar.fraglimitIA); elseif (rules=="tia") then System.ExecuteCommand("sv_gamerules = TeamInstantAction"); System.ExecuteCommand("g_scorelimit "..XCfgVar.scorelimitTIA); else System.ExecuteCommand("sv_gamerules = PowerStruggle"); end mapthendeactivate(); System.ExecuteCommand("g_timelimit "..XCfgVar.roundtimeallGamerules); System.ExecuteCommand("map "..MatchName); end); XMessageChatToPlayer( player, "Succesfull called Map: "..MatchName.." Rules: "..rules..""); XLogEventsToFile("["..os.date("%d.%m.%Y-%H:%M:%S",time).."] [!map] Admin "..player:GetName().." start the Map "..MatchName.." with GameRules "..rules..""); XMessageBigCenterToAll("<font color=\"#ffffff\">Server will change to the Map</font><font color=\"#ff0000\"> ", MatchName, "</font><font color=\"#ffffff\"> shortly. ", rules, "</font>"); Script.SetTimer( 2000,function() XMessageBigCenterToAll("<font color=\"#ffffff\">Server will change to the Map</font><font color=\"#ff0000\"> ", MatchName, "</font><font color=\"#ffffff\"> shortly. ", rules, "</font>"); end); end end
AEGIS.chatCommands.mapthen = {adminOnly=true;}; function AEGIS.chatCommands.mapthen:func(player, chatMsg) local rules, maps = string.match((chatMsg.text), "^!mapthen (.*) (.*)$"); if (not rules) then XMessageChatToPlayer( player, "Chat command syntax: !mapthen [RULES] [MAPNAME]"); XMessageChatToPlayer( player, "Chat command syntax: !mapthen - - (Delete the Next Map)"); return; end if (rules=="-" and maps=="-") then mapthendeactivate(); XMessageChatToPlayer( player, "Mapthen deactivated"); XMessageChatToPlayer( player, "Standart Levelrotation continues"); return; end local MatchCounter = 0; local MatchName = false; local MatchCostum = false; local FullMatch = false; if (rules=="ia" or rules=="tia") then if (XCfgVar.StandartTIAMaps) then for i, MapName in ipairs(XCfgVar.StandartTIAMaps)do if (MapName==maps) then FullMatch = true; MatchCounter = 1; MatchName = MapName; elseif (not FullMatch) and (string.find(MapName, maps)) then MatchCounter = MatchCounter + 1; MatchName = MapName; end end end if (XCfgVar.CostumTIAMaps) then for i, MapName in ipairs(XCfgVar.CostumTIAMaps)do if (MapName==maps) then FullMatch = true; MatchCounter = 1; MatchName = MapName; MatchCostum = true; elseif (not FullMatch) and (string.find(MapName, maps)) then MatchCounter = MatchCounter + 1; MatchName = MapName; MatchCostum = true; end end end elseif (rules=="ps") then if (XCfgVar.StandartPSMaps) then for i, MapName in ipairs(XCfgVar.StandartPSMaps)do if (MapName==maps) then FullMatch = true; MatchCounter = 1; MatchName = MapName; elseif (not FullMatch) and (string.find(MapName, maps)) then MatchCounter = MatchCounter + 1; MatchName = MapName; end end end if (XCfgVar.CostumPSMaps) then for i, MapName in ipairs(XCfgVar.CostumPSMaps)do if (MapName==maps) then FullMatch = true; MatchCounter = 1; MatchName = MapName; MatchCostum = true; elseif (not FullMatch) and (string.find(MapName, maps)) then MatchCounter = MatchCounter + 1; MatchName = MapName; MatchCostum = true; end end end else XMessageChatToPlayer( player, "[ERROR] Game Rule is misspelled: ia, tia or ps"); XMessageChatToPlayer( player, "[ERROR] Typed: "..rules); return; end if (MatchCounter==0) then XMessageChatToPlayer( player, "[ERROR] Mapcall: "..maps); XMessageChatToPlayer( player, "[ERROR] Map not found or is misspelled"); elseif (MatchCounter>1) and (not MatchFinal) then XMessageChatToPlayer( player, "[ERROR] Mapcall: "..maps); XMessageChatToPlayer( player, "[ERROR] Map Name multiple Matches"); else if (MatchCostum) then XVar.mapthendownloadlink = "net_mapDownloadURL "..XCfgVar.CostumMapsAutodownloadURL..""..MatchName..".zip"; end if (rules=="ia") then XVar.mapthengamerules = "sv_gamerules = InstantAction"; XVar.mapthenscorelimit = "g_fraglimit "..XCfgVar.fraglimitIA; elseif (rules=="tia") then XVar.mapthengamerules = "sv_gamerules = TeamInstantAction"; XVar.mapthenscorelimit = "g_scorelimit "..XCfgVar.scorelimitTIA; else XVar.mapthengamerules = "sv_gamerules = PowerStruggle"; end XVar.mapthenmaptime = "g_timelimit "..XCfgVar.roundtimeallGamerules; XVar.mapthenmap = "map "..MatchName; XVar.mapthenactive = "Next Map: "..MatchName.." GameRules: "..rules; XMessageChatToPlayer( player, "Succesfull called Map: "..MatchName.." Rules: "..rules..""); XLogEventsToFile("["..os.date("%d.%m.%Y-%H:%M:%S",time).."] [!mapthen] Admin "..player:GetName().." start the Map'as next' "..MatchName.." with GameRules "..rules..""); XMessageBigCenterToAll("<font color=\"#ffffff\">Next Map: </font><font color=\"#ff0000\"> ", MatchName, "</font><font color=\"#ffffff\"> Gamerules: </font><font color=\"#ff0000\">", rules, "</font>"); Script.SetTimer( 2000,function() XMessageBigCenterToAll("<font color=\"#ffffff\">Next Map: </font><font color=\"#ff0000\"> ", MatchName, "</font><font color=\"#ffffff\"> Gamerules: </font><font color=\"#ff0000\">", rules, "</font>"); end); end end
AEGIS.chatCommands.hunter = {adminOnly=true;}; function AEGIS.chatCommands.hunter:func(player, chatMsg) if (player.actor:GetSpectatorMode()~=0) then XMessageChatToPlayer(player, "Only in Game!"); return; end if (player:IsDead()) then return; end local hunter = System.GetEntitiesByClass("Hunter"); local count = 0; for i,c in pairs(hunter) do count = count + 1; end if (count>=1) then XRemoveEntitiesByClass("Hunter"); XMessageChatToPlayer(player, "Hunter succesfull removed"); else if (player:IsOnVehicle()) then XMessageChatToPlayer(player, "[ERROR] Leave your Vehicle!"); return; end System.ExecuteCommand("xspawn "..player:GetName().." 0 Hunter"); XMessageChatToPlayer(player, "Hunter succesfull spawned"); end end
-- ---------------------------------------------------------------------------------- -- PLACE NOTHING AFTER THIS LINE!!! -- ---------------------------------------------------------------------------------- AEGIS.ChatFile = true;
Kто с мечом к нам придет того на шишку посадим )))!!!