Sourcemod Plugins: Difference between revisions

From Empires Wiki
Jump to navigation Jump to search
No edit summary
m (EventTimeleftHostname is 100% my plugin -.-)
 
(70 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Fixme|Everything, making a crude start page right now.}}
{{ServerResources}}
{{Sitenav|Server Sourcemod Plugins}}
=Sourcemod installation=
 
Check the following page for guide how to install Metamod and Sourcemod: [[Sourcemod]]
== Compiling from Source ==
=Empires Specific Plugins=
Thanks to people smarter than me, compiling from source is pretty easy.
Empires has a few specific plugins coded by members of its community, you can find them on [https://git.empiresmod.com/sourcemod Empires' Gitlab].
Take your source-file or source-text and pop it in this: http://www.sourcemod.net/compiler.php
==Draftpick==
Download your compiled plugin, and put it in your sourcemod/plugins folder
[[Draftpick]] is a [[Sourcemod]] plugin by [[Mikleo]], it is responsible for automatically balancing the players between teams using statistics gathered by [[Empstats]]. It includes four types of Draft.
 
==Empfun==
[[Empfun]] is a [[Sourcemod]] plugin by [[Mikleo]], it adds a way to manipulate entities within the game and create custom scenarios.
==Empstats==
[[Empstats]] is a [[Sourcemod]] plugin by [[Mikleo]], it tracks various statistics.
==Emputils==
[[Emputils]] is a [[Sourcemod]] plugin by [[Mikleo]], it contains various utilities to be used by other plugins.
==EventTimeleftHostname==
[[EventTimeleftHostname]] is a [[Sourcemod]] plugin by [[Neoony]], it allows server owners to display a countdown in their server's title.
==Lawlietstats==
[[Lawlietstats]] is a [[Sourcemod]] plugin by [[Lawliet]], it collects various informations.
==Lobby==
[[Lobby]] is a [[Sourcemod]] plugin by [[Neoony]], it controls the Lobby Server.
==NoCommExtendVote==
'''No Commander Extend Vote''' or [[NCEV]] for short is a [[Sourcemod]] plugin by [[Neoony]], it automatically detects commanders and only allows the game to start if both teams have a commander. <br />
==PugPlugin==
==ResearchInfo==
[[ResearchInfo]] is a [[Sourcemod]] plugin by [[Neoony]], gives a chat command to show what your team has researched in console. Unstable and unfinished. WIP
==sameIPBlock==
[[sameIPBlock]] is a [[Sourcemod]] plugin by [[Neoony]], only allows players to join from unique IP address.
==SourcemodOffsets==
[[SourcemodOffsets]] is a [[Sourcemod]] plugin by [[Neoony]], it automatically updates the sourcemod offsets required for Empires when they change.
==SquadControl==
[[Squadcontrol]] is a [[Sourcemod]] plugin by [[Mikleo]], it adds various utilities for Empires.
==Surrender==
[[Surrender]] is a [[SourceMod]] plugin by [[Neoony]], it allows players to trigger a vote to surrender which if successful destroys their [[Command Vehicle]].<br />
==Updater==
[[Updater]] is a [[Sourcemod]] plugin by <> and updated for Empires by [[Neoony]], it allows servers to automatically update their plugins.
==Ungrief==
[[Ungrief]] is a [[Sourcemod]] plugin by [[Theowningone]] and updated by [[Neoony]], it allows admins to teleport the [[Command Vehicle]].
==Votetime==
[[Votetime]] is a [[Sourcemod]] plugin by [[Mikleo]], it adds commands to control the commander vote timer.
==vprofReport==
[[vprofReport]] is a [[Sourcemod]] plugin by [[Neoony]], automatically start "vprof" at certain number of clients on the server and then generates report when the round ends.
=Generic Plugins=
== End of Round AllTalk ==
== End of Round AllTalk ==
Original Plugin: https://forums.alliedmods.net/showthread.php?p=1246351
Original Plugin: https://forums.alliedmods.net/showthread.php?p=1246351
== Chat Triggers ==
Plugin link: https://forums.alliedmods.net/showthread.php?p=585758 <br />


<pre>
== Advertisements 2.0 ==
#pragma semicolon 1
Plugin link: https://forums.alliedmods.net/showthread.php?t=155705 <br />
 
Simple advertisements plugin. It supports center, chat, hint, menu and top messages.
#include <sourcemod>
== SourceBans++ ==
 
Plugin link: https://sbpp.github.io/ <br />
#define PLUGIN_VERSION "1.0.2"
Unofficial more updated version of SourceBans. <br />
 
-SourceBans++ is a majorly improved version of SourceBans 1.4.11 which was developed by GameConnect. <br />
new Handle:cvar_round_end_enabled = INVALID_HANDLE;
Those major improvements include a new design, more stable web application, login via steam account and much more community made customizations. <br />
new Handle:cvar_bomb_enabled = INVALID_HANDLE;
== SourceBot ==
new Handle:cvar_announce = INVALID_HANDLE;
''Original Plugin link:'' https://forums.alliedmods.net/showthread.php?p=883997 <br />
new Handle:cvar_alltalk = INVALID_HANDLE;


new alltalk_being_changed_by_us = false;
== TeamSwitch ==
new okay_to_disable_alltalk = false;
Plugin link: https://forums.alliedmods.net/showthread.php?p=587405 <br />
This is a fully mod-independent team switching plugin, which gives an admin the ability to switch players to the opposite team either immediately,  <br />
when they die, or at the end of the round (where appropriate). <br />
Players can also be switched to spectators. <br />
TeamSwitch detects which mod it is being run on at startup and configures itself accordingly. <br />


public Plugin:myinfo = {
== Ultimate Mapchooser 3.4.5 ==
  name = "Round-End Alltalk",
Plugin link: https://forums.alliedmods.net/showthread.php?t=134190 <br />
  author = "Mister_Magotchi",
Ultimate Mapchooser allows for increased control over map selection. This includes: <br />
  description = "Turns sv_alltalk on at round end or when all Terrorists are dead (in CS:S).",
* Random selection of the next map. <br />
  version = PLUGIN_VERSION,
* Which maps are added to votes <br />
  url = "https://forums.alliedmods.net/showthread.php?t=133016"
* Which maps are available for nominations <br />
};
You can control how the randomization works by dividing your map rotation into groups, and controlling the weights of each group or each individual map, <br />
specify a minimum or maximum number of players allowed on the server for the map to be available, specify how many maps from a group are allowed in a vote, etc. <br />
EDIT: It seems the original version isnt working even with Creepers event fix for end of map votes. <br />
Here is cyberkillers version: https://github.com/CyberKiller/Ultimate-Mapchooser <br />
But it might be a little outdated...<br />


public OnPluginStart() {
== Execute Configs ==
  CreateConVar(
''Original Plugin link:'' https://forums.alliedmods.net/showthread.php?t=67620<br />
    "sm_round_end_alltalk_version",
This plugin executes configs when there are either a certain amount of clients on, a certain event occurs, a certain round starts or when there are a certain amount of minutes left on the map. <br />
    PLUGIN_VERSION,
You can use this to disable alltalk above x clients, or to change the map when the timelimit hits, etc. <br />
    "Round-End Alltalk Version",
'''More updated version (1.2.4) + added empires roundstart/gamestart events:''' https://git.empiresmod.com/sourcemod/executeconfigs <br />
    FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_NOTIFY|FCVAR_DONTRECORD
  );
  cvar_round_end_enabled = CreateConVar(
    "sm_round_end_alltalk_round",
    "1",
    "Toggles whether alltalk is on at round end",
    FCVAR_PLUGIN
  );
  cvar_bomb_enabled = CreateConVar(
    "sm_round_end_alltalk_bomb",
    "0",
    "Toggles whether alltalk is on when all Terrorists are dead",
    FCVAR_PLUGIN
  );
  cvar_announce = CreateConVar(
    "sm_round_end_alltalk_announce",
    "1",
    "Toggles whether changes to sv_alltalk are announced in chat",
    FCVAR_PLUGIN
  );
  cvar_alltalk = FindConVar("sv_alltalk");
  SetConVarFlags(cvar_alltalk, GetConVarFlags(cvar_alltalk)&~FCVAR_NOTIFY);


  HookConVarChange(cvar_alltalk, AlltalkChanged);
[[Category:Sourcemod]]
  HookEvent("round_start", OnRoundStart);
  HookEvent("player_death", OnPlayerDeath);
  HookEvent("game_end", OnRoundEnd);
  AutoExecConfig(true, "round-end-alltalk");
}
 
TurnAlltalkOn () {
//  PrintToChatAll("Alltalk: DEBUG1");
  if (!GetConVarBool(cvar_alltalk)) {
    okay_to_disable_alltalk = true;
    alltalk_being_changed_by_us = true;
    SetConVarBool(cvar_alltalk, true);
  }
}
 
public AlltalkChanged (Handle:convar, const String:oldValue[], const String:newValue[]) {
//  PrintToChatAll("Alltalk: DEBUG2");
  new bool:announce = GetConVarBool(cvar_announce);
  if (StringToInt(newValue)) {
    if (announce) {
      PrintToChatAll("Alltalk is now on.");
    }
    if (alltalk_being_changed_by_us) {
      alltalk_being_changed_by_us = false;
    }
    else {
      okay_to_disable_alltalk = false;
    }
  }
  else {
    if (announce) {
      PrintToChatAll("Alltalk is now off.");
    }
  }
}
 
public OnRoundStart (Handle:event, const String:name[], bool:dontBroadcast) {
//  PrintToChatAll("Alltalk: DEBUG3");
  if (okay_to_disable_alltalk) {
    SetConVarBool(cvar_alltalk, false);
  }
}
 
public OnPlayerDeath (Handle:event, const String:name[], bool:dontBroadcast) {
//  PrintToChatAll("Alltalk: DEBUG4");
  if (GetConVarBool(cvar_bomb_enabled)) {
    new client;
    new bool:terrorists_dead = true;
    for (client = MaxClients; 0 < client; client--) {
      if (IsClientInGame(client) && IsPlayerAlive(client) && GetClientTeam(client) == 2) {
        terrorists_dead = false;
        break;
      }
    }
    if (terrorists_dead) {
      TurnAlltalkOn();
    }
  }
}
 
public OnRoundEnd (Handle:event, const String:name[], bool:dontBroadcast) {
//  PrintToChatAll("Alltalk: DEBUG5");
  if (GetConVarBool(cvar_round_end_enabled)) {
    TurnAlltalkOn();
  }
}
</pre>
 
== Chat Triggers ==
Plugin link: https://forums.alliedmods.net/showthread.php?p=585758 <br />
Adds commandlist.txt functionality (From Mani) to SourceMod.
You can easily define chat commands (e.g. !unstuck), to be linked to console commands.

Latest revision as of 01:00, 7 February 2024

Empires Server Resources
Dedicated Server Setup | Cvars | Optimization | Sourcemod Plugins



Sourcemod installation

Check the following page for guide how to install Metamod and Sourcemod: Sourcemod

Empires Specific Plugins

Empires has a few specific plugins coded by members of its community, you can find them on Empires' Gitlab.

Draftpick

Draftpick is a Sourcemod plugin by Mikleo, it is responsible for automatically balancing the players between teams using statistics gathered by Empstats. It includes four types of Draft.

Empfun

Empfun is a Sourcemod plugin by Mikleo, it adds a way to manipulate entities within the game and create custom scenarios.

Empstats

Empstats is a Sourcemod plugin by Mikleo, it tracks various statistics.

Emputils

Emputils is a Sourcemod plugin by Mikleo, it contains various utilities to be used by other plugins.

EventTimeleftHostname

EventTimeleftHostname is a Sourcemod plugin by Neoony, it allows server owners to display a countdown in their server's title.

Lawlietstats

Lawlietstats is a Sourcemod plugin by Lawliet, it collects various informations.

Lobby

Lobby is a Sourcemod plugin by Neoony, it controls the Lobby Server.

NoCommExtendVote

No Commander Extend Vote or NCEV for short is a Sourcemod plugin by Neoony, it automatically detects commanders and only allows the game to start if both teams have a commander.

PugPlugin

ResearchInfo

ResearchInfo is a Sourcemod plugin by Neoony, gives a chat command to show what your team has researched in console. Unstable and unfinished. WIP

sameIPBlock

sameIPBlock is a Sourcemod plugin by Neoony, only allows players to join from unique IP address.

SourcemodOffsets

SourcemodOffsets is a Sourcemod plugin by Neoony, it automatically updates the sourcemod offsets required for Empires when they change.

SquadControl

Squadcontrol is a Sourcemod plugin by Mikleo, it adds various utilities for Empires.

Surrender

Surrender is a SourceMod plugin by Neoony, it allows players to trigger a vote to surrender which if successful destroys their Command Vehicle.

Updater

Updater is a Sourcemod plugin by <> and updated for Empires by Neoony, it allows servers to automatically update their plugins.

Ungrief

Ungrief is a Sourcemod plugin by Theowningone and updated by Neoony, it allows admins to teleport the Command Vehicle.

Votetime

Votetime is a Sourcemod plugin by Mikleo, it adds commands to control the commander vote timer.

vprofReport

vprofReport is a Sourcemod plugin by Neoony, automatically start "vprof" at certain number of clients on the server and then generates report when the round ends.

Generic Plugins

End of Round AllTalk

Original Plugin: https://forums.alliedmods.net/showthread.php?p=1246351

Chat Triggers

Plugin link: https://forums.alliedmods.net/showthread.php?p=585758

Advertisements 2.0

Plugin link: https://forums.alliedmods.net/showthread.php?t=155705
Simple advertisements plugin. It supports center, chat, hint, menu and top messages.

SourceBans++

Plugin link: https://sbpp.github.io/
Unofficial more updated version of SourceBans.
-SourceBans++ is a majorly improved version of SourceBans 1.4.11 which was developed by GameConnect.
Those major improvements include a new design, more stable web application, login via steam account and much more community made customizations.

SourceBot

Original Plugin link: https://forums.alliedmods.net/showthread.php?p=883997

TeamSwitch

Plugin link: https://forums.alliedmods.net/showthread.php?p=587405
This is a fully mod-independent team switching plugin, which gives an admin the ability to switch players to the opposite team either immediately,
when they die, or at the end of the round (where appropriate).
Players can also be switched to spectators.
TeamSwitch detects which mod it is being run on at startup and configures itself accordingly.

Ultimate Mapchooser 3.4.5

Plugin link: https://forums.alliedmods.net/showthread.php?t=134190
Ultimate Mapchooser allows for increased control over map selection. This includes:

  • Random selection of the next map.
  • Which maps are added to votes
  • Which maps are available for nominations

You can control how the randomization works by dividing your map rotation into groups, and controlling the weights of each group or each individual map,
specify a minimum or maximum number of players allowed on the server for the map to be available, specify how many maps from a group are allowed in a vote, etc.
EDIT: It seems the original version isnt working even with Creepers event fix for end of map votes.
Here is cyberkillers version: https://github.com/CyberKiller/Ultimate-Mapchooser
But it might be a little outdated...

Execute Configs

Original Plugin link: https://forums.alliedmods.net/showthread.php?t=67620
This plugin executes configs when there are either a certain amount of clients on, a certain event occurs, a certain round starts or when there are a certain amount of minutes left on the map.
You can use this to disable alltalk above x clients, or to change the map when the timelimit hits, etc.
More updated version (1.2.4) + added empires roundstart/gamestart events: https://git.empiresmod.com/sourcemod/executeconfigs