Skip to content

Commit

Permalink
Merge pull request #25 from FlyingCat-X/v1.2-stable
Browse files Browse the repository at this point in the history
Update LLHL to 1.2-stable:
- Add commands that returns the plugin's SHA1:
    - hash in console
    - /hash in say
- Remove WHBlocker starting from this release.
- Subtract 1 from the score when a player changes model during a match.
    - New cvar: sv_ag_change_model_penalization 0/1
- Simplify motd to fit more characters.
  • Loading branch information
7mochi authored Feb 16, 2021
2 parents 49f30da + a1fc82c commit 1ece08a
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 36 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/amxx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,6 @@ jobs:
cp metamod/*.so llhl-dev-linux/ag/addons/metamod/dlls
cp metamod/*.dll llhl-dev-windows/ag/addons/metamod/dlls
# Copy WHBlocker to metamod plugins folder
cp llhl-resources/metamod-plugins/whblocker-1.5.697/*.so llhl-dev-linux/ag/addons/metamod/dlls
cp llhl-resources/metamod-plugins/whblocker-1.5.697/*.dll llhl-dev-windows/ag/addons/metamod/dlls
# Copy WHBlocker CFG File (Windows and Linux)
cp llhl-resources/metamod-plugins/whblocker-1.5.697/config.ini llhl-dev-linux/ag/addons/metamod/dlls
cp llhl-resources/metamod-plugins/whblocker-1.5.697/config.ini llhl-dev-windows/ag/addons/metamod/dlls
# Copy GhostMineBlock to metamod plugins folder
cp llhl-resources/metamod-plugins/ghostmineblock-1.5/*.so llhl-dev-linux/ag/addons/metamod/dlls
cp llhl-resources/metamod-plugins/ghostmineblock-1.5/*.dll llhl-dev-windows/ag/addons/metamod/dlls
Expand All @@ -148,11 +140,9 @@ jobs:
cp llhl-resources/amxx-related/gRIP/configs/*.ini llhl-dev-windows/ag/addons/amxmodx/configs
# Add amxmodx to metamod plugins
metamodPluginsLinux='linux addons/metamod/dlls/whblocker_mm_i386.so'
metamodPluginsLinux+='\nlinux addons/metamod/dlls/gm_block_mm_i386.so'
metamodPluginsLinux+='\nlinux addons/amxmodx/dlls/amxmodx_mm_i386.so'
metamodPluginsWin='win32 addons/metamod/dlls/whblocker_mm.dll'
metamodPluginsWin+='\nwin32 addons/metamod/dlls/gm_block_mm.dll'
metamodPluginsWin+='\nwin32 addons/amxmodx/dlls/amxmodx_mm.dll'
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
This plugin is a port for Adrenaline Gamer 6.6 (And AGMini) from my [LLHL gamemode](https://github.com/rtxa/agmodx/blob/master/valve/addons/amxmodx/scripting/agmodx_llhl.sma) that was developed for rtxa's agmodx.
Unlike my gamemode for agmodx, this one only supports Protocol 48.

# Important notes
If you have any problem in your server, before opening an issue or contacting me by any means (Facebook, Whatsapp, Discord, etc.) make sure that the error is related to the LLHL plugin. If you have any problem associated to the plugin try to be as detailed as possible and provide me with logs and ways to get to the error. I won’t give you support if the problem is related to other plugins e.g. dproto or reunion.

## Features
- FPS Limiter (Default value is 144).
- FOV Limiter (Minimum value is 85, disabled by default).
Expand All @@ -14,12 +17,12 @@ Unlike my gamemode for agmodx, this one only supports Protocol 48.
- New intermission mode.
- More than 1 HLTV allowed.
- Force connected HLTV to have a certain delay value as a minimum (Minimum value is 30).
- Wallhack Blocker.
- Ghostmine Blocker.
- Simple OpenGF32 and AGFix detection (Through cheat commands).
- Take screenshots at map end and occasionally when a player dies.
- Avoid abusing a ReHLDS bug (Server disappears from the masterlist when it's' paused) only when there's no game in progress.
- Checks for new updates automatically
- Changing model during a match subtract 1 from the score. (Optional, enabled by default).
- Checks for new updates automatically.

## New cvars
- sv_ag_fpslimit_max_fps "144"
Expand All @@ -38,6 +41,7 @@ Unlike my gamemode for agmodx, this one only supports Protocol 48.
- sv_ag_block_ghostmine "1"
- sv_ag_cheat_cmd_check_interval "5.0"
- sv_ag_cheat_cmd_max_detections "5"
- sv_ag_change_model_penalization "1"
- sv_ag_check_updates "1"
- sv_ag_check_updates_retrys "3"
- sv_ag_check_updates_retry_delay "2.0"
Expand All @@ -46,6 +50,7 @@ Unlike my gamemode for agmodx, this one only supports Protocol 48.
- Last version of HLDS (build 8308) or ReHLDS 3.6 or newer (Warning: Last version of ReHLDS for Linux has an auto-aim bug, download version 3.7.0.693 instead).
- Metamod 1.21.37p or newer, I recommend using [this version of metamod](https://github.com/Solokiller/Metamod-P-CMake/releases/tag/v1.21p39) (included and ready to use in development builds).
- Have [AMXX 1.9](https://www.amxmodx.org/downloads-new.php) installed or newer (included and ready to use in development builds).
- AMXX Module: [GoldSrc REST In Pawn (gRIP)](https://forums.alliedmods.net/showthread.php?t=315567)

## Download (Stable)
- Full releases: Besides containing everything necessary for the proper functioning of the LLHL gamemode, it has new maps with their respective dependencies (Locs, wads, sprites, sounds, etc).
Expand All @@ -69,4 +74,5 @@ Download the [Latest Release](https://github.com/FlyingCat-X/llhl/releases/).
- naz: Useful codes for hook messages from AG engine.
- BulliT: For developing AG Mod and sharing the source code.
- Dcarlox: Grammar corrections and Spanish translation.
- leynieR: Portuguese Translation.
- leynieR: Portuguese Translation.
- xeroblood: SplitString() method.
10 changes: 8 additions & 2 deletions README_ES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Este plugin es una adaptación para Adrenaline Gamer 6.6 (y AGMini) de mi [LLHL gamemode](https://github.com/rtxa/agmodx/blob/master/valve/addons/amxmodx/scripting/agmodx_llhl.sma) que fue desarrollado para el agmodx de rtxa.
A diferencia de mi gamemode para agmodx, este solo es compatible con Protocolo 48.

# Consideraciones importantes
Si tienes algún problema en tu servidor, antes de abrir una issue o contactarme por cualquier medio (Facebook, Whatsapp, Discord, etc) asegurate de que el error es relacionado al plugin LLHL. Si tienes algún problema asociado al plugin trata de ser lo mas detallado posible y brindarme logs y maneras de como llegar a que salga dicho error. No daré soporte/ayuda si el problema es relacionado a otros plugins como dproto o reunion por ejemplo.

## Características
- Limitador de FPS (el valor por defecto es de 144).
- Limitador de FOV (el valor mínimo es de 85, por defecto está desactivado).
Expand All @@ -13,11 +16,11 @@ A diferencia de mi gamemode para agmodx, este solo es compatible con Protocolo 4
- No se permiten cambios de nombre y model cuando hay una partida en curso (Opcional, ambos activados por defecto).
- Nuevo modo de espera al finalizar un mapa.
- Se fuerza al HLTV conectado a tener un cierto valor de delay como mínimo (Valor mínimo por defecto es 30).
- Bloqueador de wallhack.
- Bloqueador de ghostmines.
- Detección simple de OpenGF32 y AGFix (Mediante comandos del cheat).
- Toma screenshots al termino de un mapa y ocasionalmente cuando un jugador muere.
- Se evita el abuso de un bug de ReHLDS (el servidor desaparece de la lista mundial cuando está pausado) solo cuando no hay una partida en curso.
- Cambiar de model durante una partida resta 1 de la puntuación. (Opcional, por defecto está activado).
- Verifica si hay nuevas actualizaciones automaticamente.

## Nuevas cvars
Expand All @@ -37,6 +40,7 @@ A diferencia de mi gamemode para agmodx, este solo es compatible con Protocolo 4
- sv_ag_block_ghostmine "1"
- sv_ag_cheat_cmd_check_interval "5.0"
- sv_ag_cheat_cmd_max_detections "5"
- sv_ag_change_model_penalization "1"
- sv_ag_check_updates "1"
- sv_ag_check_updates_retrys "3"
- sv_ag_check_updates_retry_delay "2.0"
Expand All @@ -45,6 +49,7 @@ A diferencia de mi gamemode para agmodx, este solo es compatible con Protocolo 4
- Última version de HLDS (build 8308) o ReHLDS 3.6 o más nueva (Advertencia: la versión más reciente de ReHLDS para Linux tiene un bug de auto apuntado, como alternativa se recomienda descargar la version 3.7.0.693).
- Metamod 1.21.37p o más reciente; recomiendo usar [esta versión de metamod](https://github.com/Solokiller/Metamod-P-CMake/releases/tag/v1.21p39) (incluido y listo para usar en versiones de desarrollo).
- Tener [AMXX 1.9](https://www.amxmodx.org/downloads-new.php) instalado o una versión más reciente (incluido y listo para usar en versiones de desarrollo).
- Módulo AMXX: [GoldSrc REST In Pawn (gRIP)](https://forums.alliedmods.net/showthread.php?t=315567)

## Descargas (Estables)
- Paquete full: Además de tener todo lo necesario para el correcto funcionamiento del LLHL gamemode, se incluyen nuevos mapas con sus respectivos archivos adicionales (Locs, wads, sprites, sounds, etc).
Expand All @@ -68,4 +73,5 @@ Descargar la [Última versión](https://github.com/FlyingCat-X/llhl/releases/).
- naz: Códigos útiles para hookear los mensajes del motor de AG.
- BulliT: Por desarrollar el AG mod y compartir el código fuente.
- Dcarlox: Correcciones gramaticales y traducción al español.
- leynieR: Traducción al Portugués.
- leynieR: Traducción al Portugués.
- xeroblood: Metodo SplitString().
12 changes: 9 additions & 3 deletions README_PT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
### [Versión en Inglés](https://github.com/FlyingCat-X/llhl/blob/master/README.md) | [Versión en Español](https://github.com/FlyingCat-X/llhl/blob/master/README_ES.md) | [Versión en Portugués](https://github.com/FlyingCat-X/llhl/blob/master/README_PT.md)
Este plugin é uma adaptação para Adrenaline Gamer 6.6 (e AGMini) do meu [modo de jogo LLHL](https://github.com/rtxa/agmodx/blob/master/valve/addons/amxmodx/scripting/agmodx_llhl.sma) que foi desenvolvido para rtxa agmodx. A diferença do meu modo de jogo para agmodx, este suporta apenas o Portocolo 48.

# Considerações importantes
Se tiver um problema no seu servidor antes de abrir uma issue ou entrar em contato comigo por qualquer meio (Facebook, Whatsapp, Discord, etc) certifique-se de que o erro esteja relacionado ao plugin LLHL. Si tiver algum problema associado a o plugin tente ser o mais detalhado possível e forneça logs e maneiras de resolver esse erro. Não darei suporte / ajuda se o problema estiver relacionado a outros plugins como dproto ou reunion por exemplo.

## Características
- Limitador de FPS (o valor por padrão e de 144).
- Limitador de FOV (o valor mínimo é 85, por padrão está desabilitado).
Expand All @@ -12,12 +15,12 @@ Este plugin é uma adaptação para Adrenaline Gamer 6.6 (e AGMini) do meu [modo
- Não são permitidas mudanças de nome e model quando um jogo está em andamento (opcional ambos ativados por padrão).
- Novo modo de espera ao terminar um mapa.
- Es forçado a ter HLTV conectado um certo valor de delay pelo mínimo (o valor padrão mínimo é 30).
- Bloqueador de wallhack.
- Bloqueador de ghostmines.
- Detecção simples de OpenGF32 e AGFix (Atraves do comandos do cheat)
- Faça screenshots no final de um mapa e ocasionalmente quando um jogador morre.
- Evite o abuso de um bug ReHLDS (o servidor desaparece da lista da mundial quando e pausado) apenas quando não há uma match em andamento.
- Verifica automaticamente a existência de novas actualizações
- A mudança de model durante uma partida subtrai 1 da pontuação. (Opcional, por padrão está activado).
- Verifica automaticamente a existência de novas actualizações.

## Novas cvars
- sv_ag_fpslimit_max_fps "144"
Expand All @@ -36,6 +39,7 @@ Este plugin é uma adaptação para Adrenaline Gamer 6.6 (e AGMini) do meu [modo
- sv_ag_block_ghostmine "1"
- sv_ag_cheat_cmd_check_interval "5.0"
- sv_ag_cheat_cmd_max_detections "5"
- sv_ag_change_model_penalization "1"
- sv_ag_check_updates "1"
- sv_ag_check_updates_retrys "3"
- sv_ag_check_updates_retry_delay "2.0"
Expand All @@ -44,6 +48,7 @@ Este plugin é uma adaptação para Adrenaline Gamer 6.6 (e AGMini) do meu [modo
- Versão mais recente do HLDS (build 8308) ou ReHLDS 3.6 ou mais recente (Atenção: a versão mais recente do ReHLDS para Linux tem um bug de auto-apontar, como alternativa é recomendado baixar a versão 3.7.0.693).
- Metamod 1.21.37p ou mais recente; recomendo usar [esta versão do metamod](https://github.com/Solokiller/Metamod-P-CMake/releases/tag/v1.21p39) (incluído e pronto para uso em versões de desenvolvimento).
- Ter AMXX 1.9 instalado a versão mais recente (incluído e pronto para uso em versões de desenvolvimento).
- Módulo AMXX: [GoldSrc REST In Pawn (gRIP)](https://forums.alliedmods.net/showthread.php?t=315567)

## Downloads (Estável)
- Pacote completo: Além de ter todo o necessário para o correto funcionamento do LLHL gamemode, novos mapas são incluídos com seus respectivos arquivos adicionais (Locs, wads, sprites, sounds, etc).
Expand All @@ -67,4 +72,5 @@ Baixe a [última versão](https://github.com/FlyingCat-X/llhl/releases/).
- naz: Códigos úteis para hookear as mensagens do motor AG.
- BulliT: Para desenvolver o mod AG e compartilhar o código-fonte.
- Dcarlox: Correções gramaticais e tradução para o espanhol.
- leynieR: Tradução portuguesa.
- leynieR: Tradução portuguesa.
- xeroblood: Metodo SplitString().
46 changes: 36 additions & 10 deletions ag/addons/amxmodx/scripting/llhl.sma
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
LLHL Gamemode for AG 6.6 and AGMini
Version: 1.1.1-stable
Version: 1.2-stable
Author: FlyingCat
# Information:
Expand All @@ -20,11 +20,11 @@
- New intermission mode
- More than 1 HLTV allowed
- Force connected HLTV to have a certain delay value as a minimum (Minimum value is 30)
- Wallhack Blocker
- Ghostmine Blocker
- Simple OpenGF32 and AGFix detection (Through cheat commands)
- Take screenshots at map end and occasionally when a player dies
- Avoid abusing a ReHLDS bug (Server disappears from the masterlist when it's' paused) only when there's no game in progress.
- Changing model during a match subtract 1 from the score. (Optional, enabled by default).
- Checks for new updates automatically.
# New cvars:
Expand All @@ -44,6 +44,7 @@
- sv_ag_block_ghostmine "1"
- sv_ag_cheat_cmd_check_interval "5.0"
- sv_ag_cheat_cmd_max_detections "5"
- sv_ag_change_model_penalization "1"
- sv_ag_check_updates "1"
- sv_ag_check_updates_retrys "3"
- sv_ag_check_updates_retry_delay "2.0"
Expand All @@ -57,7 +58,7 @@
- Dcarlox: Grammar corrections in the README
- leynieR: Portuguese Translation.
Contact: [email protected] or Suisei#9999 (Discord)
Contact: [email protected] or Suisei#1966 (Discord)
*/

#include <amxmodx>
Expand All @@ -70,7 +71,7 @@
#define PLUGIN "Liga Latinoamericana de Half Life"
#define PLUGIN_ACRONYM "LLHL"
#define PLUGIN_GAMEMODE "llhl"
#define VERSION "1.1.1-stable"
#define VERSION "1.2-stable"
#define AUTHOR "FlyingCat"
#define GH_API_URL "https://api.github.com/repos/FlyingCat-X/llhl/tags?per_page=1"

Expand Down Expand Up @@ -129,6 +130,7 @@ new gCvarMinHLTVDelay;
new gCvarBlockGhostmine;
new gCvarCheatCmdCheckInterval;
new gCvarCheatCmdMaxDetections;
new gCvarChangeModelPenalization;
new gCvarCheckUpdates;
new gCvarCheckUpdatesRetrys;
new gCvarCheckUpdatesRetryDelay;
Expand All @@ -138,6 +140,8 @@ new bool:gSecondCheatValidation[MAX_PLAYERS + 1];
new gCheatNumDetections[MAX_PLAYERS + 1];
new gCommandSended[16];

new gSHA1Hash[64];

new Float:gUnstuckLastUsed[MAX_PLAYERS + 1];
new Float:gServerFPS;
static Float:gActualServerFPS;
Expand Down Expand Up @@ -246,6 +250,9 @@ public plugin_init() {
gCvarCheatCmdCheckInterval = create_cvar("sv_ag_cheat_cmd_check_interval", "5.0");
gCvarCheatCmdMaxDetections = create_cvar("sv_ag_cheat_cmd_max_detections", "5");

// Score penalization
gCvarChangeModelPenalization = create_cvar("sv_ag_change_model_penalization", "1");

gGameState = GAME_IDLE;

if (gGhostMineBlockState == GMB_LOADED) {
Expand Down Expand Up @@ -274,6 +281,11 @@ public plugin_init() {
}

register_clcmd("say /unstuck", "CmdUnstuck");

hash_file("addons/amxmodx/plugins/llhl.amxx", Hash_Sha1, gSHA1Hash, charsmax(gSHA1Hash));

register_clcmd("hash", "CmdSHA1Hash");
register_clcmd("say /hash", "CmdSHA1Hash");

RegisterHam(Ham_Spawn, "player", "HamPlayerSpawnPre", 0);
RegisterHam(Ham_Spawn, "player", "HamPlayerSpawnPost", 1);
Expand Down Expand Up @@ -552,6 +564,11 @@ UnStuckPlayer(const id) {
return 0;
}

public CmdSHA1Hash(id) {
client_print(id, print_chat, "%s v%s SHA1: %s", PLUGIN_ACRONYM, VERSION, gSHA1Hash);
return PLUGIN_HANDLED;
}

public CheckHLTVDelay(id) {
static hltvDelay[32];
get_user_info(id, "hdelay", hltvDelay, charsmax(hltvDelay));
Expand Down Expand Up @@ -630,19 +647,28 @@ public FwSetModel(entid, model[]) {

public FwClientUserInfoChangedPre(id, info) {
static cvarRunning;
if ((cvarRunning || (cvarRunning = get_cvar_pointer("sv_ag_match_running"))) && get_pcvar_num(cvarRunning) && gGameState == GAME_RUNNING && is_user_connected(id) && hl_get_user_spectator(id)) {
if ((cvarRunning || (cvarRunning = get_cvar_pointer("sv_ag_match_running"))) && get_pcvar_num(cvarRunning) && gGameState == GAME_RUNNING && is_user_connected(id)) {
new changed, oldValue[32], newValue[32];
if (get_pcvar_num(gCvarBlockNameChangeInMatch) && pev(id, pev_netname, oldValue, charsmax(oldValue)) && engfunc(EngFunc_InfoKeyValue, info, "name", newValue, charsmax(newValue)) && !equal(oldValue, newValue)) {
new bool:isPlayerSpec = hl_get_user_spectator(id);

if (get_pcvar_num(gCvarBlockNameChangeInMatch) && pev(id, pev_netname, oldValue, charsmax(oldValue)) && engfunc(EngFunc_InfoKeyValue, info, "name", newValue, charsmax(newValue)) && !equal(oldValue, newValue) && isPlayerSpec) {
engfunc(EngFunc_SetClientKeyValue, id, info, "name", oldValue);
client_print(id, print_chat, "%l", "BLOCK_NAMECHANGE_MSG");
changed = true;
}

if (get_pcvar_num(gCvarBlockModelChangeInMatch) && copy(oldValue, charsmax(oldValue), gOldPlayerModel[id]) && engfunc(EngFunc_InfoKeyValue, info, "model", newValue, charsmax(newValue))) {
if (!equal(oldValue, newValue)) {
engfunc(EngFunc_SetClientKeyValue, id, info, "model", oldValue);
client_print(id, print_chat, "%l", "BLOCK_MODELCHANGE_MSG");
changed = true;
if (!equal(oldValue, newValue)) {
if (isPlayerSpec) {
engfunc(EngFunc_SetClientKeyValue, id, info, "model", oldValue);
client_print(id, print_chat, "%l", "BLOCK_MODELCHANGE_MSG");
changed = true;
} else {
if (get_pcvar_num(gCvarChangeModelPenalization)) {
ExecuteHam(Ham_AddPoints, id, -1, true);
}
engfunc(EngFunc_InfoKeyValue, info, "model", gOldPlayerModel[id], charsmax(gOldPlayerModel[]));
}
}
} else {
engfunc(EngFunc_InfoKeyValue, info, "model", gOldPlayerModel[id], charsmax(gOldPlayerModel[]));
Expand Down
1 change: 1 addition & 0 deletions ag/gamemodes/llhl.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ sv_ag_min_hltv_delay "30.0"
sv_ag_block_ghostmine "1"
sv_ag_cheat_cmd_check_interval "5.0"
sv_ag_cheat_cmd_max_detections "5"
sv_ag_change_model_penalization "1"
sv_ag_check_updates "1"
sv_ag_check_updates_retrys "3"
sv_ag_check_updates_retry_delay "2.0"
Loading

0 comments on commit 1ece08a

Please sign in to comment.