Skip to content

Commit

Permalink
Typo Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MuxaJlbl4 committed Sep 1, 2024
1 parent dd55331 commit 44b3e9b
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 110 deletions.
4 changes: 2 additions & 2 deletions Condition-Zero-Coop.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MyAppName "Counter-Strike Condition Zero Cooperative Patch"
#define MyAppVersion "2.7.2"
#define MyAppVersion "2.8.2"
#define MyAppPublisher "MuLLlaH9!"
#define MyAppURL "https://github.com/MuxaJlbl4/Condition-Zero-Coop"

Expand Down Expand Up @@ -27,7 +27,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "czero\addons\*"; DestDir: "{app}\czero\addons"; Excludes: "cmdaccess.ini,logs,*.so,*.bat,*.pmx,*.prc,*.vis"; Flags: ignoreversion recursesubdirs
Source: "czero\BotCampaignProfile.db"; DestDir: "{app}\czero"; Flags: ignoreversion
Source: "czero\carrer.cfg"; DestDir: "{app}\czero"; Flags: ignoreversion
Source: "czero\career.cfg"; DestDir: "{app}\czero"; Flags: ignoreversion
Source: "czero\coop.cfg"; DestDir: "{app}\czero"; Flags: ignoreversion
Source: "czero\dlls\mp.dll"; DestDir: "{app}\czero\dlls"; Flags: ignoreversion
Source: "czero\liblist.gam"; DestDir: "{app}\czero"; Flags: ignoreversion
Expand Down
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ https://github.com/MuxaJlbl4/Condition-Zero-Coop/assets/20092823/f141a596-781c-4
- 🎫 Fixed restart and continue messages
- 🧊 Decreased freeze time
- 🔦 Enabled flashlights
- 🦘 No jump slowdown
- 🗝️ No passwords
- ⏳ No pauses

## Requirements
- [Counter-Strike: Condition Zero](https://store.steampowered.com/app/80) for all teammates
- **LAN connection** with your teammates (physical or VPN)
- **LAN connection** with your teammates (physical or virtual)

## Installation and Usage
- **Admin**: Install [Condition-Zero-Coop.exe](https://github.com/MuxaJlbl4/Condition-Zero-Coop/releases/latest) to your **Half-Life** folder and start any career mission
Expand Down Expand Up @@ -65,21 +66,32 @@ All settings should be configured via [coop.cfg](czero/coop.cfg) file:
- 👀 Teammates can't view tasks
- 👯‍♀ Max players = 32

## Building
## Manual Building
1. Install:
- [Counter-Strike: Condition Zero](https://store.steampowered.com/app/80) - Clean **Base** Steam version
- [ReGameDLL_CS](https://github.com/s1lentq/ReGameDLL_CS/actions) - [**Release Play** version*](# "Actions -> Run -> Artifacts -> win32 -> tests -> mp.dll
or build Release Play manually with Visual Studio 2015 Update 3")
- [ReGameDLL_CS](https://github.com/s1lentq/ReGameDLL_CS/releases/tag/5.26.0.668) - [**Release Play** version*](# "Build Release Play version with Visual Studio 2015 Update 3")
- [AMX Mod X](https://www.amxmodx.org/downloads-new.php?branch=master) - Base Package + Counter-Strike
- [Metamod-R](https://github.com/theAsmodai/metamod-r/releases/latest)
- [Orpheu](https://github.com/Arkshine/Orpheu/releases/latest)
- [ReAPI](https://github.com/s1lentq/reapi/releases/latest)
- [YaPB](https://github.com/yapb/yapb/releases/latest)
2. Copy (with replace) repository content to your `Half-Life` folder
3. Replace hex bytes `3B F0 0F 4C F0 A1` to `BE 20 00 00 00 A1` in your `Half-Life\hw.dll` file
4. Launch `Half-Life\czero\addons\amxmodx\scripting\autospawnpoints.bat` to compile [Autospawnpoints](https://dev-cs.ru/resources/1253) plugin
5. Launch `Half-Life\czero\addons\amxmodx\scripting\cz_coop.bat` to compile [Condition Zero Coop](czero/addons/amxmodx/scripting/cz_coop.sma) plugin
6. Compile `Half-Life\Condition-Zero-Coop.iss` with [Inno Setup](https://jrsoftware.org/isinfo.php) to make installer
4. Compile [Condition Zero Coop](czero/addons/amxmodx/scripting/cz_coop.sma) with `Half-Life\czero\addons\amxmodx\scripting\cz_coop.bat`
5. Compile [Autospawnpoints](https://dev-cs.ru/resources/1253) with `Half-Life\czero\addons\amxmodx\scripting\autospawnpoints.bat`
6. Compile [No Slow Down](https://dev-cs.ru/threads/4088/page-2#post-95000) with `Half-Life\czero\addons\amxmodx\scripting\noslowdown.bat`
7. Compile `Half-Life\Condition-Zero-Coop.iss` with [Inno Setup](https://jrsoftware.org/isinfo.php) to make installer

## Special Thanks
[Arkshine](https://github.com/Arkshine) · [dystopm](https://github.com/dystopm) · [fl0werD](https://github.com/fl0werD) · [iPlague](https://roadtoglory.ru/profile?id=1) · [jeefo](https://github.com/jeefo) · [jkivilin](https://github.com/jkivilin) · [LunaTheReborn](https://forums.alliedmods.net/member.php?u=297878) · [s1lentq](https://github.com/s1lentq) · [theAsmodai](https://github.com/theAsmodai) · [Vaqtincha](https://github.com/Vaqtincha) · [wopox1337](https://github.com/wopox1337)
- [Arkshine](https://github.com/Arkshine)
- [dystopm](https://github.com/dystopm)
- [fl0werD](https://github.com/fl0werD)
- [iPlague](https://roadtoglory.ru/profile?id=1)
- [jeefo](https://github.com/jeefo)
- [jkivilin](https://github.com/jkivilin)
- [LunaTheReborn](https://forums.alliedmods.net/member.php?u=297878)
- [s1lentq](https://github.com/s1lentq)
- [SSX](https://dev-cs.ru/members/228)
- [theAsmodai](https://github.com/theAsmodai)
- [Vaqtincha](https://github.com/Vaqtincha)
- [wopox1337](https://github.com/wopox1337)
38 changes: 0 additions & 38 deletions czero/addons/amxmodx/configs/modules.ini

This file was deleted.

16 changes: 0 additions & 16 deletions czero/addons/amxmodx/configs/orpheu/memory/CareerDifficultyBase

This file was deleted.

1 change: 1 addition & 0 deletions czero/addons/amxmodx/configs/plugins.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ admincmd.amxx ; basic admin console commands

; Custom - Add 3rd party plugins here
autospawnpoints.amxx
noslowdown.amxx
cz_coop.amxx
69 changes: 26 additions & 43 deletions czero/addons/amxmodx/scripting/cz_coop.sma
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
#include <orpheu_advanced>

#define PLUGIN "Condition Zero Coop"
#define VERSION "2.7"
#define VERSION "2.8"
#define AUTHOR "MuLLlaH9!"

new OrpheuHook:HandleUTIL_CareerDPrintf
new WinMsg = 0
new default_team[64] = ""
new BotRejoin = 0
#define TASK 0.5

Expand Down Expand Up @@ -82,10 +81,10 @@ public plugin_init()
RegisterHookChain(RG_CBasePlayer_MakeBomber, "CBasePlayer_MakeBomber")

// Get career difficulty
set_cvar_num("bot_difficulty", get_career_difficulty())
set_cvar_num("bot_difficulty", get_cvar_num("cl_career_difficulty"))

// Additional cmd tweaks and fixes for carrer mode
server_cmd("exec carrer.cfg")
// Additional cmd tweaks and fixes for career mode
server_cmd("exec career.cfg")

// Load custom cvar values
server_cmd("exec coop.cfg")
Expand All @@ -99,15 +98,15 @@ public OrpheuHookReturn:OnBotAddCommand(pThisObject, team, isFromConsole)
// Create YaPB bot
server_cmd("yb add %i", get_cvar_num("bot_difficulty"))

// Get bot team
new bot_team[64]
// Convert BotProfileTeamType to TeamName
new TeamName:bot_team
if (team)
bot_team = "CT"
bot_team = TEAM_CT
else
bot_team = "T"
bot_team = TEAM_TERRORIST

// If bot team is NOT default
if (strcmp(get_default_team_str(), bot_team))
if (get_default_team() != bot_team)
BotRejoin++

OrpheuSetReturn(true)
Expand Down Expand Up @@ -151,17 +150,14 @@ public OnAreAllTasksComplete(...)

public OnUTIL_CareerDPrintf(...)
{
// Get default team
new team[64]
get_pcvar_string(get_cvar_pointer("humans_join_team"), team, charsmax(team))
// Get winner team
new winteam[64]
new TeamName:winteam
if (get_member_game(m_iNumCTWins) > get_member_game(m_iNumTerroristWins))
winteam = "CT"
winteam = TEAM_CT
else
winteam = "T"
winteam = TEAM_TERRORIST
// Check victory
if (!strcmp(team, winteam))
if (get_default_team() == winteam)
{
if (!WinMsg)
{
Expand Down Expand Up @@ -193,6 +189,7 @@ public OnUTIL_CareerDPrintf(...)
client_print_color(0, print_team_red, "^3Mission Failed! ^4Restarting...")
// Force restart
server_cmd("career_restart")
play_music("train_failure")
}
}

Expand Down Expand Up @@ -369,37 +366,23 @@ public spawn_count()

public TeamName:get_default_team()
{
if (!strcmp(get_default_team_str(), "T"))
// Get humans_join_team (too early for init)
new default_team[64]
get_pcvar_string(get_cvar_pointer("humans_join_team"), default_team, charsmax(default_team))

// Return int
if (!strcmp(default_team, "T"))
return TEAM_TERRORIST
else
return TEAM_CT

}

public get_default_team_str()
public play_music(name[])
{
// Update humans_join_team (too early for init)
if (!strcmp(default_team, ""))
get_pcvar_string(get_cvar_pointer("humans_join_team"), default_team, charsmax(default_team))
return default_team
}

public get_career_difficulty()
{
// Get career difficulty from GameUI.dll (cl_carrer_difficulty)
new offsets[1] = {0xF0}
return get_value_by_pointers(OrpheuMemoryGet("CareerDifficultyBase"), offsets, sizeof offsets)
}

public get_value_by_pointers(base, offsets[], size)
{
new bytes[4] = {0x00, 0x00, 0x00, 0x00}
for (new i = 0; i < size; i++)
{
// Get value from next pointer
OrpheuGetBytesAtAddress(base + offsets[i], bytes, sizeof bytes)
// Convert bytes to little-endian int
base = bytes[0] + (bytes[1] << 8) + (bytes[2] << 16) + (bytes[3] << 24)
}
return base
// Get players
new players[32], player_count
get_players(players, player_count, "d")
for (new i = 0; i < player_count; i++)
client_cmd(i, "mp3 play sound/music/%s.mp3", name)
}
3 changes: 3 additions & 0 deletions czero/addons/amxmodx/scripting/noslowdown.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
amxxpc.exe noslowdown.sma
move /y noslowdown.amxx ..\plugins\noslowdown.amxx
20 changes: 20 additions & 0 deletions czero/addons/amxmodx/scripting/noslowdown.sma
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

new const VERSION[] = "1.0"

public plugin_init()
{
register_plugin("No Slow Down", VERSION, "xxx")

RegisterHam(Ham_Player_Jump, "player", "Ham_CbasePlayer_Jump_Post", 0)
}

public Ham_CbasePlayer_Jump_Post( id )
{
if (!is_user_bot(id) )
{
set_pev(id, pev_fuser2, 0.0)
}
}
2 changes: 1 addition & 1 deletion czero/carrer.cfg → czero/career.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
echo "Executing CZ Coop Carrer File"
echo "Executing CZ Coop Career File"

// Auto balancing of teams: 0 - disabled; 1 - on after next round; 2 - on next round (default = 1)
mp_autoteambalance "0"
Expand Down
4 changes: 2 additions & 2 deletions czero/coop.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ simple_hostages "1"
// Simplified survival and in-a-row tasks. Sets task as failed when: 0 - any player is dead; 1 - all players are dead (default = 1)
simple_survival "1"

// Difficulty of extra bots and YaPB: 0 - Easy/Newbie; 1 - Medium/Average; 2 - Hard/Normal; 3 - Expert/Professional; 4 - Expert/Godlike (default = campaign difficulty) (uncomment to override)
// Difficulty of extra bots and YaPB: 0 - Easy/Newbie; 1 - Medium/Average; 2 - Hard/Normal; 3 - Expert/Professional; 4 - Expert/Godlike (default = cl_career_difficulty) (uncomment to override)
//bot_difficulty "1"

// Allow friendly fire: 0 - disabled; 1 - enabled (default = carrer rules) (uncomment to override)
// Allow friendly fire: 0 - disabled; 1 - enabled (default = career rules) (uncomment to override)
//mp_friendlyfire "0"

0 comments on commit 44b3e9b

Please sign in to comment.