hier kannst du einstellen, was passiert, wenn einer den server joint uns sonnstiges, kommt in die xastrada.lua, aber es müsste bei dir schon vorhanden sein:
Code:
ChatEntityName = "-=SLAM=-BOT:"; -- Name that SSM Aegis uses to chat to players
sendChatOnXSpawn = true; --Announce use of x_spawn or x_spawn_vehicle
sendChatOnXTeleport = true; --Announce use of x_teleport
sendChatOnXAward = true; --Announce use of x_award_points
sendChatOnXPunish = true; --Announce use of x_punish
sendChatOnXUnpunish = true; --Announce use of x_unpunish
sendChatOnXPlayerTeam = true; --Announce use of x_player_team
sendChatOnJoinLeave = true; --Announce Players joining and leaving
sendChatOnRename = true; --Announce player renames
sendChatOnPingKick = true; --Announce high ping kicks/warnings
sendChatOnXKick = true; --Announce use of x_kick
sendChatOnXVehicleBoot = true; --Announce use of x_vehicle_boot
sendChatOnXKill = true; --Announce use of x_player_kill
sendChatOnXSay = true; --Put x_say's message in Allchat aswell.
in deinem zzastrada.pak unter scripts/entities/multiplayer kommt dann folgendes hinein, um deine base zu verstärken
HQ.lua
Code:
----------------------------------------------------------------------------------------------------
-- Crytek Source File.
-- Copyright (C), Crytek Studios, 2001-2006.
----------------------------------------------------------------------------------------------------
-- $Id$
-- $DateTime$
-- Description: HQ for Power Struggle
--
----------------------------------------------------------------------------------------------------
-- History:
-- - 31:7:2006 18:49 : Created by Márcio Martins
--
----------------------------------------------------------------------------------------------------
HQ =
{
Client = {};
Server = {};
Editor={
Model="Editor/Objects/HQ.cgf",
},
Properties =
{
objModel = "objects/default.cgf",
objDestroyedModel = "",
teamName = "",
nHitPoints = 500,
perimeterAreaId = 0,
hqType = "bunker",
Explosion =
{
Effect = "explosions.harbor_airstirke.center_ship_explosion",
Effect2 = "explosions.generator.small",
Effect3 = "explosions.gauss.tank_gauss",
EffectScale = 2,
EffectScale2 = 10,
EffectScale3 = 10,
EffectDirection = {x=0,y=0,z=1},
},
},
};
----------------------------------------------------------------------------------------------------
Net.Expose {
Class = HQ,
ClientMethods = {
ClDestroy = { RELIABLE_UNORDERED, PRE_ATTACH },
},
ServerMethods = {
},
ServerProperties = {
health=FLOAT,
}
}
----------------------------------------------------------------------------------------------------
function HQ:OnPreFreeze(freeze, vapor)
if (freeze) then
return false; -- don't allow freezing
end
end
----------------------------------------------------------------------------------------------------
function HQ:CanShatter()
return 0;
end
----------------------------------------------------------------------------------------------------
function HQ:Destroy()
self.destroyed=true;
self:EnableSlot(0, false);
self:EnableSlot(1, true);
Script.SetTimer(6000, function() System.ExecuteCommand("sv_restart"); end);
local explosion=self.Properties.Explosion;
if (explosion.Effect ~= "") then
Particle.SpawnEffect(explosion.Effect, self:GetWorldPos(), explosion.EffectDirection, explosion.EffectScale);
Particle.SpawnEffect(explosion.Effect2, self:GetWorldPos(), explosion.EffectDirection, explosion.EffectScale2);
Particle.SpawnEffect(explosion.Effect3, self:GetWorldPos(), explosion.EffectDirection, explosion.EffectScale3);
end
end
----------------------------------------------------------------------------------------------------
function HQ:LoadGeometry(slot, model)
if (string.len(model) > 0) then
local ext = string.lower(string.sub(model, -4));
if ((ext == ".chr") or (ext == ".cdf") or (ext == ".cga")) then
self:LoadCharacter(slot, model);
else
self:LoadObject(slot, model);
end
end
end
-------------------------------------------------------------------------
function HQ:OnSpawn()
CryAction.CreateGameObjectForEntity(self.id);
CryAction.BindGameObjectToNetwork(self.id);
CryAction.ForceGameObjectUpdate(self.id, true);
self:LoadGeometry(0, self.Properties.objModel);
self:LoadGeometry(1, self.Properties.objDestroyedModel);
end
----------------------------------------------------------------------------------------------------
function HQ:EnableSlot(slot, enable)
if (enable) then
self:Physicalize(slot, PE_STATIC, {});
self:DrawSlot(slot, 1);
else
self:DestroyPhysics();
self:DrawSlot(slot, 0);
end
end
----------------------------------------------------------------------------------------------------
function HQ:OnReset()
self:EnableSlot(1, false);
self:EnableSlot(0, true);
self.isServer = CryAction.IsServer();
self.isClient = CryAction.IsClient();
if (self.isServer) then
if (self.Properties.teamName ~= "") then
self:SetTeamId(g_gameRules.game:GetTeamId(self.Properties.teamName) or 0);
else
self:SetTeamId(0);
end
end
self.destroyed=false;
LogAdmins("Setting HQ Health...");
self:SetHealth(3 * 6000);
self.Properties.nHitPoints = 3 * 6000;
end
----------------------------------------------------------------------------------------------------
function HQ:OnPropertyChange()
self:OnReset();
end
----------------------------------------------------------------------------------------------------
function HQ:OnDestroy()
end
----------------------------------------------------------------------------------------------------
function HQ:OnSave(save)
end
----------------------------------------------------------------------------------------------------
function HQ:OnLoad(saved)
end
----------------------------------------------------------------------------------------------------
function HQ:GetTeamId()
return g_gameRules.game:GetTeam(self.id);
end
----------------------------------------------------------------------------------------------------
function HQ:SetTeamId(teamId)
g_gameRules.game:SetTeam(teamId, self.id);
end
----------------------------------------------------------------------------------------------------
function HQ:IsDead()
return self.destroyed;
end
----------------------------------------------------------------------------------------------------
function HQ:SetHealth(health)
self.synched.health=health;
end
----------------------------------------------------------------------------------------------------
function HQ:GetHealth()
return self.synched.health;
end
----------------------------------------------------------------------------------------------------
function HQ.Server:OnInit()
self:OnReset();
end
----------------------------------------------------------------------------------------------------
function HQ.Server:OnShutDown()
if (g_gameRules) then
g_gameRules.game:RemoveMinimapEntity(self.id);
end
end
----------------------------------------------------------------------------------------------------
function HQ.Server:OnInitClient(channelId)
if (self.destroyed) then
self.onClient:ClDestroy(channelId);
end
end
----------------------------------------------------------------------------------------------------
function HQ.Client:OnInit()
self:OnReset();
end
----------------------------------------------------------------------------------------------------
function HQ.Server:OnHit(hit)
if (self.destroyed) then
return;
end
local team = nil;
if (self:GetTeamId() == 2) then
team = "US";
else
team = "NK";
end
-- don't take partial damage (eg from splash since explosion radius is 100m)
if(hit.damage < self:GetHealth()) then
end
local destroyed=false;
-- check if destroyed, decrease health if needed
local teamId=g_gameRules.game:GetTeam(hit.shooterId);
if (teamId==0 or teamId~=self:GetTeamId()) then
if (hit.explosion and hit.type=="tac") then
self:SetHealth(self:GetHealth()-hit.damage);
-- show damage
local life = (100 * self:GetHealth()) / self.Properties.nHitPoints;
life = math.ceil(life);
local damage = 100 - life;
XSendBigCenterMessage(team.." HQ now has "..tostring(damage).."% damage");
if (self:GetHealth()<=0) then
destroyed=true;
end
if (hit.damage>0 and hit.type~="repair") then
if (g_gameRules.Server.OnHQHit) then
g_gameRules.Server.OnHQHit(g_gameRules, self, hit);
end
end
end
end
if (destroyed) then
if (not self.isClient) then
self:Destroy();
end
self.allClients:ClDestroy();
if (g_gameRules and g_gameRules.OnHQDestroyed) then
g_gameRules:OnHQDestroyed(self, hit.shooterId, teamId);
end
end
return destroyed;
end
----------------------------------------------------------------------------------------------------
function HQ.Client:ClDestroy()
self:Destroy();
end
----------------------------------------------------------------------------------------------------
function HQ.Server:OnEnterArea(entity, areaId)
if (entity.actor and areaId == self.Properties.perimeterAreaId) then
if (g_gameRules.Server.OnPerimeterBreached) then
g_gameRules.Server.OnPerimeterBreached(g_gameRules, self, entity);
end
end
end
Bei self:SetHealth(3 * 6000);
self.Properties.nHitPoints = 3 * 6000
kannst du die 2 dreier in eine beliebige zahl umtauschen, beide zahlen müssen aber gleich sein. > 3 tacs benötigt um das hq zu zerstören.
bei der happyhour weiß ichs nur, wie du es manuell machen kannst, da kannst du bspw. jede 20 minuten !happyhour eingeben, wenn du admin bist und gut ist. Ist aber ne dumme Lösung. Hier das happyhour skript:
Code:
--Happy Hour Chat Command
--Submitted By b6gm6n
--
--Every thing is free for 1 minute, 15 minute timer between runs, admin only command.
AEGIS.chatCommands.happyhour = {};
function AEGIS.chatCommands.happyhour:func(player, chatMsg)
if(player:IsDead()) then return end
if(HappyHourStarted) then XSendChatToTarget(nil, player, "ERROR :: You must WAIT 15 MINUTES between each Happy-Hour!"); return end
if(XIsAdmin(player)) then Script.SetTimer( 1000,function() XSendChatToAll(nil, "ADMIN :: %s started a Happy-Hour! // ONCE EVERY 15 MINUTES!", player:GetName()); end);
else XSendChatToTarget(nil, player, "AUTHORIZATION FAILURE! // Command :::: ADMINS ONLY!"); return end
System.SetCVar("g_pp_scale_price", 0); LogAdmins("Happy Hour Started");
Script.SetTimer( 100,function() HappyHourStarted = true; g_gameRules.game:SendTextMessage(TextMessageBig, "<font color=\"#afafaf\">***</font> <font color=\"#ffdc36\">HAPPY HOUR : EVERYTHING FREE!</font> <font color=\"#afafaf\">***</font>", TextMessageToAllRemote); end);
Script.SetTimer( 3000,function() g_gameRules.game:SendTextMessage(TextMessageBig, "<font color=\"#afafaf\">***</font> <font color=\"#5ca9cf\">RUN TO YOUR NEAREST BUY ZONE!</font> <font color=\"#afafaf\">***</font>", TextMessageToAllRemote); end);
Script.SetTimer( 5000,function() System.ExecuteCommand("x_say_info !! HAPPY HOUR ACTIVE !!"); end);
Script.SetTimer( 10000,function() System.ExecuteCommand("x_say_info !! HAPPY HOUR ACTIVE !!"); end);
Script.SetTimer( 15000,function() System.ExecuteCommand("x_say_info !! HAPPY HOUR ACTIVE !!"); end);
Script.SetTimer( 20000,function() System.ExecuteCommand("x_say_info !! HAPPY HOUR ACTIVE !!"); end);
Script.SetTimer( 25000,function() System.ExecuteCommand("x_say_info !! HAPPY HOUR ACTIVE !!"); end);
Script.SetTimer( 30000,function() System.ExecuteCommand("x_say_info !! HAPPY HOUR ACTIVE !!"); end);
Script.SetTimer( 35000,function() System.ExecuteCommand("x_say_info !! HAPPY HOUR ACTIVE !!"); end);
Script.SetTimer( 40000,function() System.ExecuteCommand("x_say_info !! HAPPY HOUR ACTIVE !!"); end);
Script.SetTimer( 45000,function() System.ExecuteCommand("x_say_info !! HAPPY HOUR ACTIVE !!"); end);
Script.SetTimer( 50000,function() System.ExecuteCommand("x_say_info HAPPY HOUR ENDS IN : 10 SECONDS"); end);
Script.SetTimer( 55000,function() System.ExecuteCommand("x_say_info HAPPY HOUR ENDS IN : 5 SECONDS"); end);
Script.SetTimer( 60000,function() g_gameRules.game:SendTextMessage(TextMessageError, ":::: TOO LATE ::::", TextMessageToAllRemote); end);
Script.SetTimer( 61000,function() g_gameRules.game:SendTextMessage(TextMessageBig, "<font color=\"#afafaf\">***</font> <font color=\"#ff2020\">HAPPY HOUR : OVER!</font> <font color=\"#afafaf\">***</font>", TextMessageToAllRemote); System.SetCVar("g_pp_scale_price", 1); end); Script.SetTimer( 900000,function() HappyHourStarted = false; end);
end
Das muss bei ssm aegis 1.2.1 in die xastrada.lua zu den chat commands oder bei 1.3 unter Config_aplha > Chat_commands > Happyhour.lua
Mfg, Installation