Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
97866c1a55 | |||
2461bda5f7 | |||
8d02c1e0a3 | |||
3379596de4 | |||
a881c1ef93 | |||
5faba66cb1 | |||
51aba2c1a1 |
@ -7,6 +7,7 @@ var public config String NegativeColorHex;
|
|||||||
var public config bool bChatNotifications;
|
var public config bool bChatNotifications;
|
||||||
var public config bool bHudNotifications;
|
var public config bool bHudNotifications;
|
||||||
var public config float DefferedClearHUD;
|
var public config float DefferedClearHUD;
|
||||||
|
var public config int VoteTime;
|
||||||
|
|
||||||
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
|
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
@ -17,6 +18,9 @@ public static function InitConfig(int Version, int LatestVersion, E_LogLevel Log
|
|||||||
case `NO_CONFIG:
|
case `NO_CONFIG:
|
||||||
ApplyDefault(LogLevel);
|
ApplyDefault(LogLevel);
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
default.VoteTime = class'KFVoteCollector'.default.VoteTime;
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,6 +51,12 @@ public static function Load(E_LogLevel LogLevel)
|
|||||||
`Log_Error("DefferedClearHUD" @ "(" $ default.DefferedClearHUD $ ")" @ "must be greater than 0");
|
`Log_Error("DefferedClearHUD" @ "(" $ default.DefferedClearHUD $ ")" @ "must be greater than 0");
|
||||||
default.DefferedClearHUD = 0.0f;
|
default.DefferedClearHUD = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (default.VoteTime <= 0 || default.VoteTime > 255)
|
||||||
|
{
|
||||||
|
`Log_Error("VoteTime" @ "(" $ default.VoteTime $ ")" @ "must be in range 1-255");
|
||||||
|
default.VoteTime = class'KFVoteCollector'.default.VoteTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static function ApplyDefault(E_LogLevel LogLevel)
|
protected static function ApplyDefault(E_LogLevel LogLevel)
|
||||||
@ -58,6 +68,7 @@ protected static function ApplyDefault(E_LogLevel LogLevel)
|
|||||||
default.PositiveColorHex = class'KFLocalMessage'.default.EventColor;
|
default.PositiveColorHex = class'KFLocalMessage'.default.EventColor;
|
||||||
default.NegativeColorHex = class'KFLocalMessage'.default.InteractionColor;
|
default.NegativeColorHex = class'KFLocalMessage'.default.InteractionColor;
|
||||||
default.DefferedClearHUD = 1.0f;
|
default.DefferedClearHUD = 1.0f;
|
||||||
|
default.VoteTime = class'KFVoteCollector'.default.VoteTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static function bool IsValidHexColor(String HexColor, E_LogLevel LogLevel)
|
protected static function bool IsValidHexColor(String HexColor, E_LogLevel LogLevel)
|
||||||
|
@ -2,7 +2,7 @@ class CVC extends Info
|
|||||||
dependson(CVC_LocalMessage)
|
dependson(CVC_LocalMessage)
|
||||||
config(CVC);
|
config(CVC);
|
||||||
|
|
||||||
const LatestVersion = 1;
|
const LatestVersion = 2;
|
||||||
|
|
||||||
const CfgKickProtected = class'KickProtected';
|
const CfgKickProtected = class'KickProtected';
|
||||||
const CfgKickVote = class'KickVote';
|
const CfgKickVote = class'KickVote';
|
||||||
@ -79,6 +79,8 @@ private function PreInit()
|
|||||||
case `NO_CONFIG:
|
case `NO_CONFIG:
|
||||||
`Log_Info("Config created");
|
`Log_Info("Config created");
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
|
||||||
case MaxInt:
|
case MaxInt:
|
||||||
`Log_Info("Config updated to version"@LatestVersion);
|
`Log_Info("Config updated to version"@LatestVersion);
|
||||||
break;
|
break;
|
||||||
@ -224,15 +226,10 @@ private function bool PlayerHasRequiredLevel(KFPlayerController KFPC)
|
|||||||
return (KFPRI.GetActivePerkLevel() >= CfgStartWaveKickProtection.default.MinLevel);
|
return (KFPRI.GetActivePerkLevel() >= CfgStartWaveKickProtection.default.MinLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function bool PlayerCanKickVote(KFPlayerController KFPC, optional KFPlayerController KFPC_Kickee)
|
public function bool PlayerCanStartKickVote(KFPlayerController KFPC, KFPlayerController KFPC_Kickee)
|
||||||
{
|
{
|
||||||
`Log_Trace();
|
`Log_Trace();
|
||||||
|
|
||||||
if (KFPC_Kickee == None)
|
|
||||||
{
|
|
||||||
KFPC_Kickee = KFPlayerController(KFGRI.VoteCollector.CurrentKickVote.PlayerPRI.Owner);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (KFPC_Kickee != None)
|
if (KFPC_Kickee != None)
|
||||||
{
|
{
|
||||||
if (KFPC == KFPC_Kickee)
|
if (KFPC == KFPC_Kickee)
|
||||||
|
@ -15,19 +15,17 @@ public event PreBeginPlay()
|
|||||||
|
|
||||||
foreach WorldInfo.DynamicActors(class'CVC', CVC)
|
foreach WorldInfo.DynamicActors(class'CVC', CVC)
|
||||||
{
|
{
|
||||||
`Log_Base("Found 'CVC'");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CVC == None)
|
if (CVC == None)
|
||||||
{
|
{
|
||||||
`Log_Base("Spawn 'CVC'");
|
|
||||||
CVC = WorldInfo.Spawn(class'CVC');
|
CVC = WorldInfo.Spawn(class'CVC');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CVC == None)
|
if (CVC == None)
|
||||||
{
|
{
|
||||||
`Log_Base("Can't Spawn 'CVC', Destroy...");
|
`Log_Base("FATAL: Can't Spawn 'CVC'");
|
||||||
SafeDestroy();
|
SafeDestroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,8 @@ var private localized String PlayerIsKickProtected;
|
|||||||
var const String PlayerIsStartWaveKickProtectedDefault;
|
var const String PlayerIsStartWaveKickProtectedDefault;
|
||||||
var private localized String PlayerIsStartWaveKickProtected;
|
var private localized String PlayerIsStartWaveKickProtected;
|
||||||
|
|
||||||
var const String PlayerCantVoteDefault;
|
var const String PlayerCantStartKickVoteDefault;
|
||||||
var private localized String PlayerCantVote;
|
var private localized String PlayerCantStartKickVote;
|
||||||
|
|
||||||
var const String KickVoteNotEnoughPlayersDefault;
|
var const String KickVoteNotEnoughPlayersDefault;
|
||||||
var private localized String KickVoteNotEnoughPlayers;
|
var private localized String KickVoteNotEnoughPlayers;
|
||||||
@ -44,7 +44,7 @@ enum E_CVC_LocalMessageType
|
|||||||
{
|
{
|
||||||
CVC_PlayerIsKickProtected,
|
CVC_PlayerIsKickProtected,
|
||||||
CVC_PlayerIsStartWaveKickProtected,
|
CVC_PlayerIsStartWaveKickProtected,
|
||||||
CVC_PlayerCantVote,
|
CVC_PlayerCantStartKickVote,
|
||||||
|
|
||||||
CVC_KickVoteNotEnoughPlayers,
|
CVC_KickVoteNotEnoughPlayers,
|
||||||
CVC_KickVoteStarted,
|
CVC_KickVoteStarted,
|
||||||
@ -97,8 +97,8 @@ public static function String GetLocalizedString(
|
|||||||
case CVC_PlayerIsStartWaveKickProtected:
|
case CVC_PlayerIsStartWaveKickProtected:
|
||||||
return ReplWaves(ReplKickee(default.PlayerIsStartWaveKickProtected != "" ? default.PlayerIsStartWaveKickProtected : default.PlayerIsStartWaveKickProtectedDefault, String1), String2);
|
return ReplWaves(ReplKickee(default.PlayerIsStartWaveKickProtected != "" ? default.PlayerIsStartWaveKickProtected : default.PlayerIsStartWaveKickProtectedDefault, String1), String2);
|
||||||
|
|
||||||
case CVC_PlayerCantVote:
|
case CVC_PlayerCantStartKickVote:
|
||||||
return ReplWaves(default.PlayerCantVote != "" ? default.PlayerCantVote : default.PlayerCantVoteDefault, String1);
|
return ReplWaves(default.PlayerCantStartKickVote != "" ? default.PlayerCantStartKickVote : default.PlayerCantStartKickVoteDefault, String1);
|
||||||
|
|
||||||
case CVC_KickVoteNotEnoughPlayers:
|
case CVC_KickVoteNotEnoughPlayers:
|
||||||
return ReplWaves(default.KickVoteNotEnoughPlayers != "" ? default.KickVoteNotEnoughPlayers : default.KickVoteNotEnoughPlayersDefault, String1);
|
return ReplWaves(default.KickVoteNotEnoughPlayers != "" ? default.KickVoteNotEnoughPlayers : default.KickVoteNotEnoughPlayersDefault, String1);
|
||||||
@ -147,7 +147,7 @@ defaultproperties
|
|||||||
{
|
{
|
||||||
PlayerIsKickProtectedDefault = "<kickee> is protected from kick"
|
PlayerIsKickProtectedDefault = "<kickee> is protected from kick"
|
||||||
PlayerIsStartWaveKickProtectedDefault = "You can't kick <kickee> right now. He can be kicked when he plays at least <waves> wave(s)"
|
PlayerIsStartWaveKickProtectedDefault = "You can't kick <kickee> right now. He can be kicked when he plays at least <waves> wave(s)"
|
||||||
PlayerCantVoteDefault = "You can't vote for kick now. You can vote when you play at least <waves> wave(s)"
|
PlayerCantStartKickVoteDefault = "You can't start kick vote now. You can start kick vote when you play at least <waves> wave(s)"
|
||||||
KickVoteNotEnoughPlayersDefault = "Not enough players to start vote (only players who have played at least <waves> wave(s) can vote)"
|
KickVoteNotEnoughPlayersDefault = "Not enough players to start vote (only players who have played at least <waves> wave(s) can vote)"
|
||||||
KickVoteStartedDefault = "<kicker> has started a vote to kick <kickee>"
|
KickVoteStartedDefault = "<kicker> has started a vote to kick <kickee>"
|
||||||
KickVoteStartedForPlayerDefault = "<kicker> started voting to kick you"
|
KickVoteStartedForPlayerDefault = "<kicker> started voting to kick you"
|
||||||
|
@ -46,7 +46,6 @@ public function ServerStartVoteKick(PlayerReplicationInfo PRI_Kickee, PlayerRepl
|
|||||||
{
|
{
|
||||||
local Array<KFPlayerReplicationInfo> KFPRIs;
|
local Array<KFPlayerReplicationInfo> KFPRIs;
|
||||||
local KFPlayerReplicationInfo KFPRI;
|
local KFPlayerReplicationInfo KFPRI;
|
||||||
local KFPlayerController KFPC;
|
|
||||||
local KFGameInfo KFGI;
|
local KFGameInfo KFGI;
|
||||||
|
|
||||||
`Log_Trace();
|
`Log_Trace();
|
||||||
@ -70,11 +69,11 @@ public function ServerStartVoteKick(PlayerReplicationInfo PRI_Kickee, PlayerRepl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CVC.PlayerCanKickVote(KFPC_Kicker, KFPC_Kickee))
|
if (!CVC.PlayerCanStartKickVote(KFPC_Kicker, KFPC_Kickee))
|
||||||
{
|
{
|
||||||
CVC.WriteToChatLocalized(
|
CVC.WriteToChatLocalized(
|
||||||
KFPC_Kicker,
|
KFPC_Kicker,
|
||||||
CVC_PlayerCantVote,
|
CVC_PlayerCantStartKickVote,
|
||||||
CfgKickVote.default.WarningColorHex,
|
CfgKickVote.default.WarningColorHex,
|
||||||
String(CfgStartWaveKickProtection.default.Waves));
|
String(CfgStartWaveKickProtection.default.Waves));
|
||||||
return;
|
return;
|
||||||
@ -164,7 +163,7 @@ public function ServerStartVoteKick(PlayerReplicationInfo PRI_Kickee, PlayerRepl
|
|||||||
GetKFPRIArray(KFPRIs);
|
GetKFPRIArray(KFPRIs);
|
||||||
foreach KFPRIs(KFPRI)
|
foreach KFPRIs(KFPRI)
|
||||||
{
|
{
|
||||||
KFPRI.ShowKickVote(PRI_Kickee, VoteTime, !(KFPRI == PRI_Kicker || KFPRI == PRI_Kickee || !CVC.PlayerCanKickVote(KFPlayerController(KFPRI.Owner))));
|
KFPRI.ShowKickVote(PRI_Kickee, CfgKickVote.default.VoteTime, !(KFPRI == PRI_Kicker || KFPRI == PRI_Kickee));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CfgKickVote.default.bChatNotifications)
|
if (CfgKickVote.default.bChatNotifications)
|
||||||
@ -180,25 +179,7 @@ public function ServerStartVoteKick(PlayerReplicationInfo PRI_Kickee, PlayerRepl
|
|||||||
KFPC_Kickee,
|
KFPC_Kickee,
|
||||||
CVC_KickVoteStartedForPlayer,
|
CVC_KickVoteStartedForPlayer,
|
||||||
CfgKickVote.default.NegativeColorHex,
|
CfgKickVote.default.NegativeColorHex,
|
||||||
KickerName,
|
KickerName);
|
||||||
KickeeName);
|
|
||||||
|
|
||||||
foreach KFPRIs(KFPRI)
|
|
||||||
{
|
|
||||||
if (KFPRI == PRI_Kickee)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
KFPC = KFPlayerController(KFPRI.Owner);
|
|
||||||
if (!CVC.PlayerCanKickVote(KFPC))
|
|
||||||
{
|
|
||||||
CVC.WriteToChatLocalized(
|
|
||||||
KFPC,
|
|
||||||
CVC_PlayerCantVote,
|
|
||||||
CfgKickVote.default.WarningColorHex,
|
|
||||||
String(CfgStartWaveKickProtection.default.Waves));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -216,7 +197,7 @@ public function ServerStartVoteKick(PlayerReplicationInfo PRI_Kickee, PlayerRepl
|
|||||||
AllowHudNotification = bTraderIsOpen;
|
AllowHudNotification = bTraderIsOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetTimer(VoteTime, false, nameof(ConcludeVoteKick), Self);
|
SetTimer(CfgKickVote.default.VoteTime, false, nameof(ConcludeVoteKick), Self);
|
||||||
|
|
||||||
RecieveVoteKick(PRI_Kicker, true);
|
RecieveVoteKick(PRI_Kicker, true);
|
||||||
}
|
}
|
||||||
@ -260,7 +241,7 @@ private function int VotingPlayers(optional PlayerReplicationInfo KickeePRI, opt
|
|||||||
foreach KFPRIs(KFPRI)
|
foreach KFPRIs(KFPRI)
|
||||||
{
|
{
|
||||||
KFPC = KFPlayerController(KFPRI.Owner);
|
KFPC = KFPlayerController(KFPRI.Owner);
|
||||||
if (KFPC != None && CVC.PlayerCanKickVote(KFPC, KFPC_Kickee))
|
if (KFPC != None && KFPC != KFPC_Kickee)
|
||||||
{
|
{
|
||||||
VotingPlayersNum++;
|
VotingPlayersNum++;
|
||||||
}
|
}
|
||||||
@ -401,7 +382,7 @@ public reliable server function RecieveVoteKick(PlayerReplicationInfo PRI, bool
|
|||||||
{
|
{
|
||||||
CVC.BroadcastHUDLocalized(
|
CVC.BroadcastHUDLocalized(
|
||||||
CVC_KickVoteStartedHUD,
|
CVC_KickVoteStartedHUD,
|
||||||
float(VoteTime),
|
float(CfgKickVote.default.VoteTime),
|
||||||
KickerName,
|
KickerName,
|
||||||
KickeeName,
|
KickeeName,
|
||||||
YesVotesPlayers);
|
YesVotesPlayers);
|
||||||
@ -410,7 +391,7 @@ public reliable server function RecieveVoteKick(PlayerReplicationInfo PRI, bool
|
|||||||
{
|
{
|
||||||
CVC.BroadcastHUDLocalized(
|
CVC.BroadcastHUDLocalized(
|
||||||
CVC_KickVoteReceivedHUD,
|
CVC_KickVoteReceivedHUD,
|
||||||
float(VoteTime),
|
float(CfgKickVote.default.VoteTime),
|
||||||
YesVotesPlayers,
|
YesVotesPlayers,
|
||||||
NoVotesPlayers);
|
NoVotesPlayers);
|
||||||
}
|
}
|
||||||
@ -569,7 +550,7 @@ private function LogKickVotes()
|
|||||||
}
|
}
|
||||||
|
|
||||||
`Log_Kick("Kicker:" @ LogVotePlayer(Kicker));
|
`Log_Kick("Kicker:" @ LogVotePlayer(Kicker));
|
||||||
`Log_Kick("Kicked:" @ LogVotePlayer(Kickee) @ String(Kickee.Perk) @ String(Kickee.Level));
|
`Log_Kick("Kicked:" @ LogVotePlayer(Kickee));
|
||||||
|
|
||||||
`Log_Kick("Yes voters:");
|
`Log_Kick("Yes voters:");
|
||||||
foreach Yes(KV) `Log_Kick(LogVotePlayer(KV));
|
foreach Yes(KV) `Log_Kick(LogVotePlayer(KV));
|
||||||
@ -584,7 +565,18 @@ private function String LogVotePlayer(S_KickVote KV)
|
|||||||
{
|
{
|
||||||
`Log_Trace();
|
`Log_Trace();
|
||||||
|
|
||||||
return KV.Name @ "(UniqueID:" @ KV.UniqueID $ (KV.SteamID == "" ? "" : (", SteamID:" @ KV.SteamID $ ", Profile:" @ "https://steamcommunity.com/profiles/" $ KV.SteamID)) $ ")";
|
return KV.Name @ "(UniqueID:" @ KV.UniqueID $ (KV.SteamID == "" ? "" : (", SteamID:" @ KV.SteamID $ ", Profile:" @ "https://steamcommunity.com/profiles/" $ KV.SteamID)) $ ")" @ "Perk:" @ Repl(String(KV.Perk), "KFPerk_", "", false) @ "Level:" @ String(KV.Level);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function ServerStartVoteSkipTrader(PlayerReplicationInfo PRI)
|
||||||
|
{
|
||||||
|
`Log_Trace();
|
||||||
|
|
||||||
|
VoteTime = CfgSkipTraderVote.default.VoteTime;
|
||||||
|
|
||||||
|
Super.ServerStartVoteSkipTrader(PRI);
|
||||||
|
|
||||||
|
VoteTime = default.VoteTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public reliable server function RecieveVoteSkipTrader(PlayerReplicationInfo PRI, bool bSkip)
|
public reliable server function RecieveVoteSkipTrader(PlayerReplicationInfo PRI, bool bSkip)
|
||||||
@ -611,7 +603,7 @@ public reliable server function RecieveVoteSkipTrader(PlayerReplicationInfo PRI,
|
|||||||
{
|
{
|
||||||
CVC.BroadcastHUDLocalized(
|
CVC.BroadcastHUDLocalized(
|
||||||
CVC_VoteProgressHUD,
|
CVC_VoteProgressHUD,
|
||||||
float(VoteTime),
|
float(CfgSkipTraderVote.default.VoteTime),
|
||||||
VotedPlayers(),
|
VotedPlayers(),
|
||||||
DidntVotedPlayers());
|
DidntVotedPlayers());
|
||||||
}
|
}
|
||||||
@ -638,6 +630,17 @@ public reliable server function ConcludeVoteSkipTrader()
|
|||||||
Super.ConcludeVoteSkipTrader();
|
Super.ConcludeVoteSkipTrader();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function ServerStartVotePauseGame(PlayerReplicationInfo PRI)
|
||||||
|
{
|
||||||
|
`Log_Trace();
|
||||||
|
|
||||||
|
VoteTime = CfgPauseVote.default.VoteTime;
|
||||||
|
|
||||||
|
Super.ServerStartVotePauseGame(PRI);
|
||||||
|
|
||||||
|
VoteTime = default.VoteTime;
|
||||||
|
}
|
||||||
|
|
||||||
public reliable server function ReceiveVotePauseGame(PlayerReplicationInfo PRI, bool bSkip)
|
public reliable server function ReceiveVotePauseGame(PlayerReplicationInfo PRI, bool bSkip)
|
||||||
{
|
{
|
||||||
local bool MustNotify;
|
local bool MustNotify;
|
||||||
@ -662,7 +665,7 @@ public reliable server function ReceiveVotePauseGame(PlayerReplicationInfo PRI,
|
|||||||
{
|
{
|
||||||
CVC.BroadcastHUDLocalized(
|
CVC.BroadcastHUDLocalized(
|
||||||
CVC_VoteProgressHUD,
|
CVC_VoteProgressHUD,
|
||||||
float(VoteTime),
|
float(CfgPauseVote.default.VoteTime),
|
||||||
VotedPlayers(),
|
VotedPlayers(),
|
||||||
DidntVotedPlayers());
|
DidntVotedPlayers());
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
[img]https://img.shields.io/static/v1?logo=GitHub&labelColor=gray&color=blue&logoColor=white&label=&message=Open Source[/img] [img]https://img.shields.io/github/license/GenZmeY/KF2-ControlledVoteCollector[/img] [img]https://img.shields.io/steam/subscriptions/2847465899[/img] [img]https://img.shields.io/steam/favorites/2847465899[/img] [img]https://img.shields.io/steam/update-date/2847465899[/img] [url=https://steamcommunity.com/sharedfiles/filedetails/changelog/2847465899][img]https://img.shields.io/github/v/tag/GenZmeY/KF2-ControlledVoteCollector[/img][/url]
|
[img]https://img.shields.io/static/v1?logo=GitHub&labelColor=gray&color=blue&logoColor=white&label=&message=Open Source[/img] [img]https://img.shields.io/github/license/GenZmeY/KF2-ControlledVoteCollector[/img] [img]https://img.shields.io/steam/favorites/2847465899[/img] [img]https://img.shields.io/steam/update-date/2847465899[/img] [url=https://steamcommunity.com/sharedfiles/filedetails/changelog/2847465899][img]https://img.shields.io/github/v/tag/GenZmeY/KF2-ControlledVoteCollector[/img][/url]
|
||||||
|
|
||||||
[h1]Description[/h1]
|
[h1]Description[/h1]
|
||||||
New vote collector with improvements and features.
|
New vote collector with improvements and features.
|
||||||
@ -32,7 +32,7 @@ No. This mod is not whitelisted and will de-rank your server. Any XP gained will
|
|||||||
[/olist]
|
[/olist]
|
||||||
|
|
||||||
[h1]Setup (KFCVC.ini)[/h1]
|
[h1]Setup (KFCVC.ini)[/h1]
|
||||||
Config will be created at the first start.
|
Config will be created at the first start[b]*[/b].
|
||||||
|
|
||||||
[b][CVC.MapStat][/b]
|
[b][CVC.MapStat][/b]
|
||||||
[list]
|
[list]
|
||||||
@ -69,7 +69,8 @@ This section sets the next map when no one voted for the map.
|
|||||||
[*][b]PositiveColorHex[/b] - hex color for yes vote in chat;
|
[*][b]PositiveColorHex[/b] - hex color for yes vote in chat;
|
||||||
[*][b]NegativeColorHex[/b] - hex color for no vote in chat;
|
[*][b]NegativeColorHex[/b] - hex color for no vote in chat;
|
||||||
[*][b]bHudNotifications[/b] - set to [b]True[/b] to see player votes in HUD;
|
[*][b]bHudNotifications[/b] - set to [b]True[/b] to see player votes in HUD;
|
||||||
[*][b]DefferedClearHUD[/b] - HUD notification will remain on the screen for the specified number of seconds after voting ends.
|
[*][b]DefferedClearHUD[/b] - HUD notification will remain on the screen for the specified number of seconds after voting ends;
|
||||||
|
[*][b]VoteTime[/b] - time in seconds for voting (will be automatically reduced if it exceeds the trader's remaining time).
|
||||||
[/list]
|
[/list]
|
||||||
|
|
||||||
[b][CVC.PauseVote][/b]
|
[b][CVC.PauseVote][/b]
|
||||||
@ -78,7 +79,8 @@ This section sets the next map when no one voted for the map.
|
|||||||
[*][b]PositiveColorHex[/b] - hex color for yes vote in chat;
|
[*][b]PositiveColorHex[/b] - hex color for yes vote in chat;
|
||||||
[*][b]NegativeColorHex[/b] - hex color for no vote in chat;
|
[*][b]NegativeColorHex[/b] - hex color for no vote in chat;
|
||||||
[*][b]bHudNotifications[/b] - set to [b]True[/b] to see player votes in HUD;
|
[*][b]bHudNotifications[/b] - set to [b]True[/b] to see player votes in HUD;
|
||||||
[*][b]DefferedClearHUD[/b] - HUD notification will remain on the screen for the specified number of seconds after voting ends.
|
[*][b]DefferedClearHUD[/b] - HUD notification will remain on the screen for the specified number of seconds after voting ends;
|
||||||
|
[*][b]VoteTime[/b] - time in seconds for voting (will be automatically reduced if it exceeds the trader's remaining time).
|
||||||
[/list]
|
[/list]
|
||||||
|
|
||||||
[b][CVC.KickVote][/b]
|
[b][CVC.KickVote][/b]
|
||||||
@ -92,7 +94,8 @@ This section sets the next map when no one voted for the map.
|
|||||||
[*][b]DefferedClearHUD[/b] - HUD notification will remain on the screen for the specified number of seconds after voting ends.
|
[*][b]DefferedClearHUD[/b] - HUD notification will remain on the screen for the specified number of seconds after voting ends.
|
||||||
[*][b]bLogKickVote[/b] - set to [b]True[/b] to log information about every kick vote;
|
[*][b]bLogKickVote[/b] - set to [b]True[/b] to log information about every kick vote;
|
||||||
[*][b]MinVotingPlayersToStartKickVote[/b] - minimum number of voting players to start kick voting;
|
[*][b]MinVotingPlayersToStartKickVote[/b] - minimum number of voting players to start kick voting;
|
||||||
[*][b]MaxKicks[/b] - maximum number of kicks per game.
|
[*][b]MaxKicks[/b] - maximum number of kicks per game;
|
||||||
|
[*][b]VoteTime[/b] - time in seconds for voting.
|
||||||
[/list]
|
[/list]
|
||||||
|
|
||||||
[b][CVC.KickProtected][/b]
|
[b][CVC.KickProtected][/b]
|
||||||
@ -104,18 +107,26 @@ This section sets the next map when no one voted for the map.
|
|||||||
[b][CVC.StartWaveKickProtection][/b]
|
[b][CVC.StartWaveKickProtection][/b]
|
||||||
In this section, the system for preventing early kicks is configured (especially for lazy ass admins like me who don't want to consider player complaints about this).
|
In this section, the system for preventing early kicks is configured (especially for lazy ass admins like me who don't want to consider player complaints about this).
|
||||||
[list]
|
[list]
|
||||||
[*][b]Waves[/b] - the number of waves during which a new player has kick protection and cannot vote for a kick;
|
[*][b]Waves[/b] - the number of waves during which a new player has kick protection and cannot start kick vote;
|
||||||
[*][b]MinLevel[/b] - the minimum level that a player needs to have in order to receive protection from a kick after joining the server.
|
[*][b]MinLevel[/b] - the minimum level that a player needs to have in order to receive protection from a kick after joining the server.
|
||||||
[/list]
|
[/list]
|
||||||
|
|
||||||
[b]How start wave kick protection works:[/b]
|
[b]How start wave kick protection works:[/b]
|
||||||
When a player joins a server, he is protected from a kick for the specified number of [b]Waves[/b]. This keeps the server from being taken over by players, and it also forces current players to play with the new player for at least a little bit before they can kick him. This solves most of the unfair kicks in the game.
|
When a player joins a server, he is protected from a kick for the specified number of [b]Waves[/b]. This keeps the server from being taken over by players, and it also forces current players to play with the new player for at least a little bit before they can kick him. This solves most of the unfair kicks in the game.
|
||||||
|
|
||||||
Along with receiving the kick protection, the new player loses the ability to vote for the kick. This eliminates the ability for new players to remove existing players using kick protection for impunity.
|
Along with receiving the kick protection, the new player loses the ability to start kick vote. This eliminates the ability for new players to remove existing players using kick protection for impunity.
|
||||||
|
|
||||||
When the player has played the specified number of [b]Waves[/b], he loses the kick protection and gets the opportunity to vote for the kick.
|
When the player has played the specified number of [b]Waves[/b], he loses the kick protection and gets the opportunity to start kick vote.
|
||||||
|
|
||||||
The [b]MinLevel[/b] parameter specifies an exception to these rules, giving kick protection only to players above or equal the specified level. All players can vote to exclude players with an unsuitable level, regardless of whether they have played enough [b]Waves[/b] or not. This allows to remove low-level players without waiting for them to screw up in the game.
|
The [b]MinLevel[/b] parameter specifies an exception to these rules, giving kick protection only to players above or equal the specified level. All players can vote to exclude players with an unsuitable level, regardless of whether they have played enough [b]Waves[/b] or not. This allows to remove low-level players without waiting for them to screw up in the game.
|
||||||
|
|
||||||
|
[h1]Troubleshooting[/h1]
|
||||||
|
[b](*)[/b] If your config is not created for some reason, create it manually with the following content:
|
||||||
|
[b][CVC.CVC]
|
||||||
|
Version=0
|
||||||
|
[/b]
|
||||||
|
|
||||||
|
Then start the server and check the file again - config content should be generated.
|
||||||
|
|
||||||
[h1]Sources[/h1]
|
[h1]Sources[/h1]
|
||||||
[url=https://github.com/GenZmeY/KF2-ControlledVoteCollector]https://github.com/GenZmeY/KF2-ControlledVoteCollector[/url] [b](GNU GPLv3)[/b]
|
[url=https://github.com/GenZmeY/KF2-ControlledVoteCollector]https://github.com/GenZmeY/KF2-ControlledVoteCollector[/url] [b](GNU GPLv3)[/b]
|
@ -1,7 +1,6 @@
|
|||||||
# Controlled Vote Collector
|
# Controlled Vote Collector
|
||||||
|
|
||||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
||||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
|
||||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
||||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
||||||
[](https://github.com/GenZmeY/KF2-ControlledVoteCollector/tags)
|
[](https://github.com/GenZmeY/KF2-ControlledVoteCollector/tags)
|
||||||
|
Reference in New Issue
Block a user