Unknown ❤ RESPAWN.ZAFEST.RO | VIP FREE | FREE FOR ALL ❤ 0/32
Romania XPlayZM.CSBlackDevil.COM # Zombie Plague UltimateX [ Respawn + FDL + VIP 22-12PM + POINTS] ® 17/32
Promover servidor

Add 6 tutorials (6 files)

Browse Source
Daemon666 committed parent 1600b4707b commit d3c17a39339192121b66ee8aa048b808e1cd6d13
6 changed files with 312 additions and 0 deletions
+55 -0 add-admin-by-password/en.md A
@@ -0,0 +1,55 @@
1 +---
2 +title: "Adding Admins by Password or Nickname (and Why It's Risky)"
3 +excerpt: "How AMX Mod X password- and name-based admin entries in users.ini work, the setinfo field clients use, and why SteamID auth is safer on public servers."
4 +category: "administration"
5 +tags: "admin, security"
6 +image: ""
7 +read_time: "8 min read"
8 +---
9 +<p>AMX Mod X can recognise an admin three ways: by SteamID, by IP, or by name plus a password. Password and name entries exist mainly for non-Steam servers where SteamIDs are unreliable, and they are convenient — but every one of them is a weaker link than a SteamID entry, and it is worth understanding exactly why before you hand out access this way.</p>
10 +
11 +<h2>1. Where admins are defined</h2>
12 +<p>All admin identities live in <code>addons/amxmodx/configs/users.ini</code>, one per line, in four fields:</p>
13 +<pre>; &lt;name|steamid|ip&gt; &lt;password&gt; &lt;access flags&gt; &lt;account flags&gt;
14 +"BiG_BoSS" "s3cretPass" "abcdefghijklmnopqrstu" "a"</pre>
15 +<p>The third field is the <strong>access flags</strong> (what commands they can run — see the <a href="/tutorials/amxx-admin-flags-reference">flags reference</a>). The fourth field is the <strong>account flags</strong>, and this is what decides <em>how</em> the player is authenticated. Getting the fourth field right is the whole game.</p>
16 +
17 +<h2>2. Account flags control the auth method</h2>
18 +<p>The letters in the fourth field are not command permissions — they tell AMXX how to match this entry to a connected player:</p>
19 +<ul>
20 +<li><code>a</code> — kick the player if they match this entry by name but supply the wrong password.</li>
21 +<li><code>b</code> — treat the first field as a clan tag: match if the player's name <em>contains</em> it, not only if it is identical.</li>
22 +<li><code>c</code> — the first field is a SteamID (authid).</li>
23 +<li><code>d</code> — the first field is an IP address.</li>
24 +<li><code>e</code> — do <strong>not</strong> check a password; grant access on name/IP/SteamID match alone.</li>
25 +</ul>
26 +<p>If the flags contain neither <code>c</code> nor <code>d</code>, the entry is matched by <strong>name</strong>. That is the crux of the risk below.</p>
27 +
28 +<h2>3. Set up a password admin</h2>
29 +<p>For a name-plus-password admin, leave out <code>c</code>, <code>d</code> and <code>e</code>, and add <code>a</code> so a wrong password kicks rather than silently failing:</p>
30 +<pre>"BiG_BoSS" "s3cretPass" "abcdefghijklmnopqrstu" "a"</pre>
31 +<p>The player then tells AMXX their password with a client-side <code>setinfo</code> key. The key name is the <code>amx_password_field</code> cvar from <a href="/tutorials/amxx-cfg-explained">amxx.cfg</a>, which defaults to <code>_pw</code>:</p>
32 +<pre>setinfo _pw "s3cretPass"</pre>
33 +<p>Put that line in the player's own <code>userconfig.cfg</code> or <code>autoexec.cfg</code> so it is sent on every connect. If <code>amx_password_field</code> differs on your server, the client's <code>setinfo</code> key must match it exactly or authentication silently fails.</p>
34 +
35 +<h2>4. Name-only admins with the e flag</h2>
36 +<p>Adding <code>e</code> drops the password entirely and grants access to anyone using the configured name:</p>
37 +<pre>"BiG_BoSS" "" "abcdefghijklmnopqrstu" "ce" ; only safe because c = SteamID
38 +"BiG_BoSS" "" "abcdefghijklmnopqrstu" "e" ; DANGER: anyone using this name is admin</pre>
39 +<p>The second line is the classic self-inflicted wound. On CS 1.6 — especially non-Steam — names are not unique. Anyone can set their name to <code>BiG_BoSS</code> and inherit full admin. Never combine name-based matching with <code>e</code> on a public server.</p>
40 +
41 +<h2>5. Why SteamID is safer</h2>
42 +<p>A SteamID (or a stable Reunion/dproto authid) cannot be typed by an impostor the way a name can. A password entry is better than name-only, but the password travels in a client config and is only as strong as the value you chose. Wherever a player has a genuine SteamID, prefer <a href="/tutorials/add-admin-by-steamid">adding them by SteamID</a> instead. Reserve password auth for non-Steam boxes where you have no reliable ID — and even there, consider <a href="/tutorials/install-reunion">Reunion</a> to get stable authids.</p>
43 +
44 +<h2>Common errors</h2>
45 +<ul>
46 +<li><strong>Admin not recognised after connecting</strong> — the <code>setinfo</code> key does not match <code>amx_password_field</code>, or the name in <code>users.ini</code> does not match the player's name character-for-character. See <a href="/tutorials/fix-admin-not-recognized">admin not recognised</a>.</li>
47 +<li><strong>Everyone using a common name gets admin</strong> — you used the <code>e</code> flag on a name entry. Remove <code>e</code> or switch to SteamID.</li>
48 +<li><strong>Wrong password does nothing instead of kicking</strong> — you omitted the <code>a</code> account flag. Add it so a bad password is rejected clearly.</li>
49 +<li><strong>Line ignored entirely</strong> — a missing quote or a stray comment (<code>;</code>) in the middle of the line. Each field must be quoted; the file is whitespace-separated.</li>
50 +</ul>
51 +
52 +<h2>Verification</h2>
53 +<p>Connect with the admin name and password set, then check your own access in the console:</p>
54 +<pre>amx_who</pre>
55 +<p>Your entry should list the access flags you assigned. Try connecting with the wrong <code>setinfo _pw</code> value and confirm you are kicked (with the <code>a</code> flag) rather than silently granted or denied. Once you are confident the entry works, review the full <a href="/tutorials/users-ini-explained">users.ini format</a> so you know exactly what each field does before you add more admins.</p>
+73 -0 backup-configs-bans-stats/en.md A
@@ -0,0 +1,73 @@
1 +---
2 +title: "Backing Up Configs, Bans and Stats Automatically"
3 +excerpt: "What is actually worth backing up on a CS 1.6 server &mdash; configs, ban lists, admin lists and the stats database &mdash; and a cron + rsync routine that keeps versioned copies off the box."
4 +category: "administration"
5 +tags: "backup, maintenance"
6 +image: ""
7 +read_time: "8 min read"
8 +---
9 +<p>The files that make your server <em>yours</em> &mdash; the configs you tuned over months, your ban list, your admin roster, your stats database &mdash; are tiny, and almost nobody backs them up until the day a disk dies or a fat-fingered command wipes them. The game files you can re-download in minutes; the state you built up you cannot. This is a short, practical routine for backing up exactly what matters and nothing you do not need.</p>
10 +
11 +<h2>1. Know what is worth saving</h2>
12 +<p>Back up state, not the game install. The high-value files on a typical AMX Mod X server:</p>
13 +<ul>
14 +<li><code>cstrike/server.cfg</code>, <code>cstrike/mapcycle.txt</code>, <code>cstrike/motd.txt</code> and any custom <code>.cfg</code> files &mdash; your tuning.</li>
15 +<li><code>cstrike/addons/amxmodx/configs/</code> &mdash; <code>users.ini</code> (admins), <code>amxx.cfg</code>, <code>plugins.ini</code>, <code>maps.ini</code>, plugin config files.</li>
16 +<li>Engine ban lists &mdash; <code>cstrike/banned.cfg</code> (SteamID bans) and <code>cstrike/listip.cfg</code> (IP bans).</li>
17 +<li>Stats: if you run CSStats/AMXX stats, the <code>csstats.dat</code> file; if you run a MySQL-backed system (AMXBans, a stats web panel), the <strong>database</strong>, not a file.</li>
18 +<li>Any custom maps you cannot re-download, and your FastDL mirror is worth a copy too.</li>
19 +</ul>
20 +<p>You do <strong>not</strong> need to back up <code>hlds_linux</code>, the base <code>valve/</code> and <code>cstrike/</code> game assets, or compiled <code>.amxx</code> binaries you can rebuild from source.</p>
21 +
22 +<h2>2. Back up the flat files with a dated archive</h2>
23 +<p>A single tarball with the date in its name gives you versioned history for free. Put this in a script:</p>
24 +<pre>#!/bin/bash
25 +# backup-cs.sh
26 +SRC=/home/steam/hlds/cstrike
27 +DST=/home/steam/backups
28 +STAMP=$(date +%Y-%m-%d_%H%M)
29 +mkdir -p "$DST"
30 +tar czf "$DST/cs-config-$STAMP.tar.gz" \
31 + -C "$SRC" \
32 + server.cfg mapcycle.txt motd.txt \
33 + addons/amxmodx/configs \
34 + banned.cfg listip.cfg 2&gt;/dev/null
35 +# keep only the last 30 archives
36 +ls -1t "$DST"/cs-config-*.tar.gz | tail -n +31 | xargs -r rm --</pre>
37 +<p>The last line is the part people forget: without pruning, dated backups fill the disk. Keeping the newest 30 gives you a month of daily history in a few megabytes.</p>
38 +
39 +<h2>3. Back up a MySQL stats/ban database properly</h2>
40 +<p>If your stats or bans live in MySQL (AMXBans, PsychoStats, a web panel), copying files is useless &mdash; you need a logical dump while the database is consistent:</p>
41 +<pre>mysqldump --single-transaction -u csbackup -p'PASSWORD' amxbans \
42 + | gzip &gt; /home/steam/backups/amxbans-$(date +%Y-%m-%d).sql.gz</pre>
43 +<p><code>--single-transaction</code> takes a consistent snapshot without locking the tables, so live play is not interrupted. Create a dedicated read-only backup user rather than dumping as root, and never put the password on a shared command line in production &mdash; use a <code>~/.my.cnf</code> with <code>0600</code> permissions instead.</p>
44 +
45 +<h2>4. Schedule it with cron</h2>
46 +<p>Run the flat-file script nightly and the database dump nightly too. Edit the crontab for the game user:</p>
47 +<pre>crontab -e</pre>
48 +<pre># minute hour dom mon dow command
49 +30 5 * * * /home/steam/hlds/backup-cs.sh
50 +45 5 * * * /home/steam/hlds/backup-db.sh</pre>
51 +<p>Pick an hour when the server is quiet. Make the scripts executable (<code>chmod +x</code>) and test them by hand once before trusting cron &mdash; a cron job that silently fails is worse than no backup, because it gives you false confidence.</p>
52 +
53 +<h2>5. Get the copies off the box</h2>
54 +<p>A backup on the same disk as the original dies with that disk. Push the archives to a second machine or object storage after each run. <code>rsync</code> over SSH is the simplest:</p>
55 +<pre>rsync -az --delete /home/steam/backups/ \
56 + [email protected]:/srv/cs-backups/</pre>
57 +<p>Set up SSH key auth so cron can run this without a password prompt. Now a full box loss costs you at most one day of bans and stats, and your carefully tuned configs are safe. This pairs naturally with an <a href="/tutorials/auto-restart-on-crash">auto-restart supervisor</a>: one keeps the server up, the other lets you rebuild it from scratch.</p>
58 +
59 +<h2>Common errors</h2>
60 +<ul>
61 +<li><strong>Backup archive is empty or tiny</strong> &mdash; the <code>SRC</code> path is wrong, or a listed file does not exist. Run the script by hand and read the <code>tar</code> errors instead of suppressing them.</li>
62 +<li><strong>Stats \"restore\" does not work</strong> &mdash; you copied a live <code>.dat</code> or database files mid-write. Use <code>mysqldump</code> for SQL; for <code>csstats.dat</code>, back up while the server is stopped or accept a slightly stale copy.</li>
63 +<li><strong>Cron job never runs</strong> &mdash; the script is not executable, uses a relative path that cron cannot resolve, or the crontab is under the wrong user. Cron runs with a minimal environment; use absolute paths everywhere.</li>
64 +<li><strong>Disk full after a few weeks</strong> &mdash; no pruning. Cap the number of retained archives.</li>
65 +<li><strong>Password leaked in process list</strong> &mdash; you passed <code>-pPASSWORD</code> on the command line, visible to <code>ps</code>. Use a protected <code>.my.cnf</code>.</li>
66 +</ul>
67 +
68 +<h2>Verification</h2>
69 +<p>A backup you have never restored is a guess. Prove it end to end: extract yesterday's archive into a scratch directory and confirm your <code>users.ini</code> and <code>banned.cfg</code> are intact and current.</p>
70 +<pre>mkdir /tmp/restore-test
71 +tar xzf /home/steam/backups/cs-config-*.tar.gz -C /tmp/restore-test
72 +ls -l /tmp/restore-test/addons/amxmodx/configs/users.ini</pre>
73 +<p>For the database, restore the dump into a throwaway schema and count the ban rows. Do this once when you set the system up, and you will trust it on the day you actually need it.</p>
+54 -0 cs16-cannot-find-wad/en.md A
@@ -0,0 +1,54 @@
1 +---
2 +title: "Fix: 'Cannot find halflife.wad / decals.wad' in CS 1.6"
3 +excerpt: "Why CS 1.6 throws a missing WAD error on connect or map load, where the standard WAD files live, and how to recover the ones a bad install or custom map deleted."
4 +category: "client"
5 +tags: "wad, files"
6 +image: ""
7 +read_time: "7 min read"
8 +---
9 +<p>A WAD is a texture archive. Every CS 1.6 map references one or more of them — <code>halflife.wad</code>, <code>decals.wad</code>, <code>cs_dust.wad</code> and friends — and if the client cannot find a referenced WAD it aborts the load with a hard error. The message reads something like:</p>
10 +<blockquote>Host_Error: Cannot find wad file halflife.wad</blockquote>
11 +<p>or, from a custom map, a named WAD you have never heard of. This is almost always a client-side file problem, and it is fixable. Here is where these files belong and how to get the missing one back.</p>
12 +
13 +<h2>1. Know which WADs are standard</h2>
14 +<p>A stock CS 1.6 install ships the shared texture archives in <code>cstrike/</code> itself. The ones maps reference constantly:</p>
15 +<ul>
16 +<li><code>halflife.wad</code> — base Half-Life textures, referenced by nearly every map.</li>
17 +<li><code>decals.wad</code> — bullet holes, blood, sprays.</li>
18 +<li><code>cs_dust.wad</code>, <code>de_aztec.wad</code>, <code>itsitaly.wad</code>, <code>torntextures.wad</code> — the themed sets used by the default maps.</li>
19 +</ul>
20 +<p>If <code>halflife.wad</code> or <code>decals.wad</code> is the one reported missing, your install itself is damaged — those are not optional. If the missing WAD has an unfamiliar name, a custom map is asking for a texture archive that was never bundled with it.</p>
21 +
22 +<h2>2. Repair a broken stock install</h2>
23 +<p>For the standard WADs the correct fix is to let Steam restore them rather than hunting for a copy online. In your Steam library, right-click <strong>Counter-Strike</strong>, choose <strong>Properties → Installed Files → Verify integrity of game files</strong>. Steam re-downloads any file that fails its checksum, which puts <code>halflife.wad</code> and <code>decals.wad</code> back exactly as shipped. This is the same first move as in <a href="/tutorials/cs16-crashes-on-startup">fixing startup crashes</a>, and for missing core files it is the only reliable one.</p>
24 +
25 +<h2>3. Confirm where the files must sit</h2>
26 +<p>The engine looks for WADs in the mod folder and the base folders it inherits. The reliable location is directly inside <code>cstrike/</code>:</p>
27 +<pre>Steam/steamapps/common/Half-Life/cstrike/halflife.wad
28 +Steam/steamapps/common/Half-Life/cstrike/decals.wad</pre>
29 +<p>If someone "cleaned up" the folder and moved WADs into a subdirectory, the map load fails. Move them back to the top of <code>cstrike/</code>. Do not scatter copies into <code>cstrike/maps/</code> — that is not where the loader looks.</p>
30 +
31 +<h2>4. Handle a custom map that names an unknown WAD</h2>
32 +<p>When you connect to a server running a custom map, the map file lists the WADs it was compiled against. Two things can go wrong:</p>
33 +<ul>
34 +<li>The mapper embedded the textures inside the <code>.bsp</code> — then no external WAD is needed, and a leftover reference is a bug in the map you cannot fix client-side.</li>
35 +<li>The map depends on an external WAD that the server is supposed to send you. If the server has <a href="/tutorials/fastdl-setup-guide">FastDL</a> configured, that WAD downloads on connect; if not, you join to the error.</li>
36 +</ul>
37 +<p>You cannot force a missing custom WAD to appear. If a specific community server always throws this, the fault is on the server — its download setup is not shipping the file. That is the admin's problem to solve with FastDL, not yours.</p>
38 +
39 +<h2>5. Rule out a corrupt or fake WAD</h2>
40 +<p>A WAD that exists but is the wrong size or a renamed junk file produces the same error, because the loader rejects it. Check the file size against a known-good install; a <code>halflife.wad</code> that is a few kilobytes is not real. Delete the bad copy and verify game files again.</p>
41 +
42 +<h2>Common errors</h2>
43 +<ul>
44 +<li><strong><code>Cannot find wad file halflife.wad</code></strong> — the core WAD is missing or moved out of <code>cstrike/</code>. Verify game files.</li>
45 +<li><strong>Error names a map-specific WAD (e.g. <code>jail_textures.wad</code>)</strong> — a custom map's texture archive did not download. The server needs FastDL; you cannot supply it yourself.</li>
46 +<li><strong>WAD is present but the error persists</strong> — it is corrupt or the wrong file. Compare its size to a good install and re-verify.</li>
47 +<li><strong>Only some maps fail</strong> — the failing maps share one missing themed WAD (<code>cs_dust.wad</code> for the dust family, for instance). Verify game files to restore the default set.</li>
48 +<li><strong>Error after installing a texture/skin pack</strong> — the pack overwrote a stock WAD with an incompatible version. Remove the pack and verify.</li>
49 +</ul>
50 +
51 +<h2>Verification</h2>
52 +<p>After verifying game files, launch to the main menu, then load a default map locally to confirm the core archives are intact:</p>
53 +<pre>map de_dust2</pre>
54 +<p>If <code>de_dust2</code> loads with correct textures, <code>halflife.wad</code> and <code>decals.wad</code> are healthy. Then reconnect to the server that failed. If a default map loads clean but one specific community server still errors on its custom map, the missing WAD is on that server's side and no amount of local repair will fix it — that admin needs to serve the file over <a href="/tutorials/fastdl-setup-guide">FastDL</a>.</p>
+61 -0 jack-editor-setup-cs16/en.md A
@@ -0,0 +1,61 @@
1 +---
2 +title: "J.A.C.K. Editor Setup for CS 1.6 (Game Config, WADs, Compile Tools)"
3 +excerpt: "Configure J.A.C.K. for Counter-Strike 1.6 from scratch: the game configuration, FGD, WAD texture list, compile tool paths and where compiled maps land."
4 +category: "mapping"
5 +tags: "jack, editor"
6 +image: ""
7 +read_time: "7 min read"
8 +---
9 +<p>J.A.C.K. (Jack's Awesome Config Kit) is the practical successor to Valve Hammer 3.5 for GoldSrc mapping — same workflow, but stable on modern Windows and Linux, native 64-bit, and far less crash-prone. Out of the box it knows nothing about Counter-Strike; you have to point it at the CS entity definitions, textures and compile tools yourself. Get this configuration right once and every map you build compiles with a single keypress.</p>
10 +
11 +<h2>1. Open Game Configurations</h2>
12 +<p>Go to <strong>Tools &rarr; Options &rarr; Game Profiles</strong> (called "Game Configurations" in some builds). Click <strong>Add</strong> and name the profile <code>Counter-Strike 1.6</code>. Everything below is set per-profile, so you can keep separate configs for CS, DoD and Half-Life without them colliding.</p>
13 +
14 +<h2>2. Point it at the CS entity definitions (FGD)</h2>
15 +<p>The FGD (Forge Game Data) file tells the editor which entities exist and what keyvalues they take — <code>func_bomb_target</code>, <code>func_buyzone</code>, <code>info_player_start</code> and the rest. Add the Counter-Strike FGD to the <strong>Game Data files</strong> list:</p>
16 +<pre>Game Data files:
17 + halflife-cs.fgd</pre>
18 +<p>Without the CS FGD you only see generic Half-Life entities and cannot place bomb sites or buy zones. Use a CS 1.6 FGD, not the vanilla Half-Life one.</p>
19 +
20 +<h2>3. Set directories and the game engine</h2>
21 +<p>In the profile, fill the paths so the editor knows where the game lives and where output goes:</p>
22 +<pre>Game Directory: ...\Steam\steamapps\common\Half-Life\cstrike
23 +Mod Directory: ...\Half-Life\cstrike
24 +Game Executable: ...\Half-Life\hl.exe
25 +RMF/JMF directory: your working source-map folder
26 +Map (.map/.bsp) directory: ...\Half-Life\cstrike\maps</pre>
27 +<p>The Game Directory must be <code>cstrike</code> (not the parent <code>Half-Life</code> folder) or texture and model browsing points at the wrong content.</p>
28 +
29 +<h2>4. Add the WAD texture files</h2>
30 +<p>Textures live in WAD archives inside <code>cstrike</code>. Add the ones you intend to use to the profile's <strong>Textures</strong> list — at minimum the standard set:</p>
31 +<pre>cstrike\halflife.wad
32 +cstrike\cs_dust.wad
33 +cstrike\itsitaly.wad
34 +cstrike\torntextures.wad</pre>
35 +<p>Only load the WADs you actually build with. Every WAD a map references gets baked into the compile via <code>-wadinclude</code> or auto-detection, and shipping unused WADs bloats the BSP. Keep the list lean and matched to the theme you are mapping.</p>
36 +
37 +<h2>5. Configure the compile tools</h2>
38 +<p>CS 1.6 uses the ZHLT/VHLT command-line compilers, not an internal one. In the profile's <strong>Build Programs</strong> tab, point each stage at the executable and set the output directory:</p>
39 +<pre>Game executable: ...\Half-Life\hl.exe
40 +CSG executable: ...\tools\hlcsg.exe
41 +BSP executable: ...\tools\hlbsp.exe
42 +VIS executable: ...\tools\hlvis.exe
43 +RAD executable: ...\tools\hlrad.exe
44 +Place compiled maps in this directory:
45 + ...\Half-Life\cstrike\maps</pre>
46 +<p>Use the <a href="/tutorials/zhlt-vhlt-compile-parameters">Vluzacn VHLT</a> tools rather than the ancient original ZHLT — they fix real compile bugs and handle modern hardware. When you press <strong>F9</strong> to run the compile, the Run Map dialog lets you tick VIS/RAD and pass the flags from that same reference.</p>
47 +
48 +<h2>6. Grid and view preferences</h2>
49 +<p>Set a sane default grid before you draw anything. A 2D grid of 16 units with snap enabled keeps brushes aligned and prevents the off-grid vertices that cause <a href="/tutorials/fix-leak-in-hull-pointfile">leaks</a>. Configure this under <strong>2D Views</strong> and leave snap-to-grid on by default.</p>
50 +
51 +<h2>Troubleshooting</h2>
52 +<ul>
53 +<li><strong>"Can't find WAD file" on compile</strong> — a texture in the map comes from a WAD not in your list, or the WAD path moved. Add it, or remove the offending texture.</li>
54 +<li><strong>No CS entities in the entity menu</strong> — the CS FGD is not loaded, or you added a Half-Life FGD by mistake. Check the Game Data files list.</li>
55 +<li><strong>Compile runs but the map does not launch</strong> — the Game Executable or Game Directory path is wrong, or output is not landing in <code>cstrike\maps</code>. Verify the "Place compiled maps" path.</li>
56 +<li><strong>Textures show as solid black/checkerboard</strong> — the WAD list is empty or points at a missing file. Re-add the WADs from <code>cstrike</code>.</li>
57 +<li><strong>Editor cannot find the compile tools</strong> — a Build Programs path is blank or points at a deleted file. Re-select each of the four executables.</li>
58 +</ul>
59 +
60 +<h2>Verification</h2>
61 +<p>Build a single hollow room with one <code>info_player_start</code>, one <code>light</code> and a texture on every face, then press <strong>F9</strong> and run a full compile. A correct configuration produces a lit <code>.bsp</code> in <code>cstrike\maps</code> and, if you enabled "run game", launches CS on that map. If the compile completes but the map is dark or fullbright, revisit the tool paths and flags in the <a href="/tutorials/zhlt-vhlt-compile-parameters">compile parameters guide</a>. With the editor working, move on to <a href="/tutorials/make-your-first-cs16-map">making your first playable de_ map</a>.</p>
+52 -0 mapchooser-setup/en.md A
@@ -0,0 +1,52 @@
1 +---
2 +title: "Setting Up MapChooser / End-of-Map Voting"
3 +excerpt: "Enable the stock AMX Mod X mapchooser end-of-map vote, tune the extend and ratio cvars, control the candidate map pool, and stop it fighting with nextmap and RTV."
4 +category: "administration"
5 +tags: "mapchooser, voting"
6 +image: ""
7 +read_time: "8 min read"
8 +---
9 +<p>The stock <code>mapchooser.amxx</code> that ships with AMX Mod X pops a vote menu in the closing minutes of a map and switches to the winner. It needs no extra download, but it does need a real <code>mp_timelimit</code>, a sane candidate pool, and a load order that keeps it from fighting <code>nextmap</code> and any Rock The Vote plugin. This gets all three right.</p>
10 +
11 +<h2>1. Confirm the plugin is loaded</h2>
12 +<p>Open <code>addons/amxmodx/configs/plugins.ini</code> and make sure the line is present and not commented:</p>
13 +<pre>mapchooser.amxx
14 +nextmap.amxx
15 +timeleft.amxx</pre>
16 +<p>These three ship enabled in a default <a href="/tutorials/install-amx-mod-x-1-9">AMXX 1.9 install</a>. From the server console, <code>amxx plugins</code> should list <code>mapchooser.amxx</code> as <code>running</code>. If it reads <code>bad load</code>, resolve that before configuring anything — see <a href="/tutorials/plugins-ini-load-order">plugins.ini load order</a>.</p>
17 +
18 +<h2>2. The vote fires off mp_timelimit — set it</h2>
19 +<p>mapchooser schedules its vote for the final minute or two of the time limit. With <code>mp_timelimit 0</code> the map never ends and the vote never runs. Set a real limit in <a href="/tutorials/setup-server-cfg-cs16">server.cfg</a>:</p>
20 +<pre>mp_timelimit 30 // minutes</pre>
21 +<p>Round and win limits end a map early too, and when they do, mapchooser runs its vote at that point instead. The full <code>mp_</code> family is in the <a href="/tutorials/mp-cvars-reference">mp_ cvars reference</a>.</p>
22 +
23 +<h2>3. Tune the vote cvars</h2>
24 +<p>Put these in <code>amxx.cfg</code> or <code>server.cfg</code>:</p>
25 +<pre>amx_extendmap_max 90 // ceiling in minutes a map may be extended to
26 +amx_extendmap_step 15 // minutes added each time "Extend" wins
27 +amx_vote_ratio 0.02 // minimum fraction of players for a valid result
28 +amx_vote_time 10 // seconds the vote menu stays open
29 +amx_show_activity 2 // announce the outcome</pre>
30 +<p>The <code>Extend</code> option is the one to watch: without a sane <code>amx_extendmap_max</code>, a popular map gets extended for hours because the crowd keeps voting to stay. A max of 90 on a 30-minute limit allows two extensions, then forces a change.</p>
31 +
32 +<h2>4. Control which maps appear on the ballot</h2>
33 +<p>By default mapchooser draws its candidates at random from <a href="/tutorials/mapcycle-txt-setup">mapcycle.txt</a>. That means the vote quality is only as good as your rotation: a bloated mapcycle full of maps nobody wants produces a bad ballot. Keep the cycle curated. Every candidate must exist as <code>cstrike/maps/&lt;name&gt;.bsp</code> and, if you host downloads, be on your <a href="/tutorials/fastdl-setup-guide">FastDL mirror</a> — a vote that resolves to a map the server cannot load drops everyone.</p>
34 +<p>A common refinement is to keep a smaller, hand-picked pool of "vote maps" separate from the full rotation, so the ballot only ever offers maps you know play well with a crowd. Whatever pool you use, the same rule holds: the map name on the ballot, the <code>.bsp</code> on disk, and the file on FastDL must all agree. Mismatched names are the single most common reason a vote appears to succeed and then strands everyone on a black screen.</p>
35 +
36 +<h2>5. Stop the three vote plugins from colliding</h2>
37 +<p>mapchooser, <code>nextmap</code>, and any Rock The Vote plugin all want to decide the next map. Whichever registers its forward first tends to win, so order them deliberately in <code>plugins.ini</code> and do not run two end-of-map voters at once. The full walkthrough of pairing RTV with the end-map vote is in <a href="/tutorials/rtv-nextmap-setup">the RTV and nextmap guide</a>. If you would rather not referee them by hand, the <a href="/plugins/csb-mapchooser">CSB Mapchooser</a> plugin bundles the end-map vote, nominations and RTV so they share one decision path.</p>
38 +
39 +<h2>Troubleshooting</h2>
40 +<ul>
41 +<li><strong>Vote never appears</strong> — <code>mp_timelimit 0</code>, or <code>mapchooser.amxx</code> is not running. The vote is scheduled off the time limit; no limit, no vote.</li>
42 +<li><strong>Vote appears but result is ignored</strong> — too few players to meet <code>amx_vote_ratio</code>, or another plugin overrode the next map afterward. Lower the ratio on small servers and check load order.</li>
43 +<li><strong>Map extends forever</strong> — <code>amx_extendmap_max</code> is too high or unset. Cap it.</li>
44 +<li><strong>Two vote menus at once</strong> — both mapchooser and an RTV plugin triggered an end-map vote. Disable one, or use a bundle that unifies them.</li>
45 +<li><strong>Vote loads a broken map</strong> — a candidate <code>.bsp</code> is missing from <code>cstrike/maps/</code> or absent from FastDL. Keep the mapcycle and installed maps in sync.</li>
46 +</ul>
47 +
48 +<h2>Verification</h2>
49 +<p>On a test server set a short limit and force the endgame:</p>
50 +<pre>mp_timelimit 2
51 +amx_vote_time 10</pre>
52 +<p>Connect, wait for the last minute, and confirm the vote menu opens, counts votes, and switches to the winner. Type <code>say nextmap</code> after the vote to confirm the scheduled map matches the result. Once it behaves, restore your real <code>mp_timelimit</code> and, if you want mid-map voting too, add <a href="/tutorials/rtv-nextmap-setup">Rock The Vote</a> on top.</p>
+17 -0 setup-stats-system/en.md A
@@ -0,0 +1,17 @@
1 +---
2 +title: "Setting Up a Stats System (CSStats and Rankings)"
3 +excerpt: "How the AMX Mod X csx module and its stats plugins build a ranking from live play, where the csstats.dat file lives, the say /rank and /top15 commands, and how to tune what shows on death."
4 +category: "administration"
5 +tags: "stats, csstats"
6 +image: ""
7 +read_time: "8 min read"
8 +---
9 +<p>A working rank system keeps players coming back &mdash; they want to climb. On CS 1.6 the standard, no-database way to do this is the <strong>csx</strong> module that ships with AMX Mod X plus its bundled stats plugins. It tracks kills, deaths, headshots and objectives, computes a rank, and shows a HUD summary when you die. No MySQL, no external service; the data lives in one file on the server.</p><h2>1. Confirm the csx module is loaded</h2><p>Ranking is powered by the <code>csx</code> module, not a plugin alone. Check it is enabled in <code>addons/amxmodx/configs/modules.ini</code> (the line <code>csx</code>), then confirm at runtime from the server console:</p><pre>amxx modules</pre><p><code>csx</code> must read <code>running</code>. If it is missing, ranking natives are unavailable and every stats plugin silently does nothing. The module is part of a normal <a href="/tutorials/install-amx-mod-x-1-9">AMX Mod X 1.9 install</a>.</p><h2>2. Enable the stats plugins</h2><p>Two plugins do the visible work; add them to <code>addons/amxmodx/configs/plugins.ini</code> if they are commented out:</p><pre>stats.amxx ; rank commands: /rank /top15 /stats
10 +statsx.amxx ; HUD stats shown to a player when they die</pre><p>Load order is not critical here, but keep them below <code>admin.amxx</code> as usual &mdash; see <a href="/tutorials/plugins-ini-load-order">plugins.ini load order</a>. Change the map after editing, because <code>plugins.ini</code> is only re-read on map change or restart.</p><h2>3. Where the ranking is stored</h2><p>The rank database is a single binary file:</p><pre>cstrike/addons/amxmodx/data/csstats.dat</pre><p>Every player's accumulated kills, deaths, headshots, hits and objective actions live here, keyed by SteamID. Back this file up &mdash; losing it wipes every rank. A few cvars control how it grows and behaves; set them in <code>amxx.cfg</code> or a dedicated config:</p><pre>csstats_maxsize 3000 // max number of players kept in the ranking
11 +csstats_reset 0 // set to 1 once to wipe the ranking, then back to 0
12 +csstats_rank 1 // 1 = rank by an algorithm using K/D and more</pre><p>Raise <code>csstats_maxsize</code> on a busy server or old players get pruned to make room; lower it if the file grows unwieldy. To wipe the ranking cleanly, set <code>csstats_reset 1</code>, change map once, then set it back to <code>0</code> so it does not wipe again on every load.</p><h2>4. The commands players will use</h2><p>Once <code>stats.amxx</code> runs, players get chat triggers:</p><pre>say /rank // your rank, kills, deaths, K/D, accuracy
13 +say /top15 // the server leaderboard
14 +say /stats // detailed personal stats
15 +say /statsme // same, alternate trigger on some builds</pre><p>Advertise these in your <a href="/tutorials/motd-txt-html-guide">MOTD</a> or with an <a href="/plugins/csb-adverts">adverts plugin</a> so players discover them. The leaderboard is what drives the competition, so make <code>/top15</code> visible.</p><h2>5. Tune the death HUD (statsx)</h2><p><code>statsx.amxx</code> shows the "you killed / were killed by" breakdown after each death, and it has its own cvars to control how much detail appears:</p><pre>amx_statsx_mode 1 // 0 off, 1 normal HUD, 2 detailed
16 +amx_statsx_duration 12 // seconds the panel stays on screen
17 +amx_statsx_freq 2 // how often the round-end summary is shown</pre><p>Keep the duration short; a stats panel that lingers into the next round annoys players. The weapon icons and names shown come from <code>addons/amxmodx/configs/stats.ini</code>, which maps each weapon to its display &mdash; leave it alone unless you add custom weapons.</p><h2>6. How the rank number is computed</h2><p>Players will ask why their rank moved, so it helps to know the model. The csx ranking is not a raw kill count &mdash; it weighs kills against deaths, rewards headshots and objective actions (planting, defusing, hostage rescues), and normalizes so a player with 100 kills and 20 deaths outranks one with 200 kills and 250 deaths. Two consequences worth telling players: farming kills while dying constantly barely moves your rank, and objective play counts even when your K/D is mediocre. This is why <code>csstats_rank 1</code> feels fairer than a pure frag ladder. If you would rather rank purely by kills, some builds accept an alternate value, but the default weighted model is what keeps a public server's ladder honest and is worth leaving on. The one thing that resets everyone's position is a wipe of <code>csstats.dat</code>, so guard that file.</p><h2>Common errors</h2><ul><li><strong>/rank returns nothing or "unknown command"</strong> &mdash; <code>stats.amxx</code> is not in <code>plugins.ini</code>, or the <code>csx</code> module is not running. Check <code>amxx plugins</code> and <code>amxx modules</code>.</li><li><strong>Ranks reset every map</strong> &mdash; <code>csstats_reset</code> was left at <code>1</code>. Set it to <code>0</code> after a deliberate wipe.</li><li><strong>Ranking never persists across restarts</strong> &mdash; the server has no write permission to <code>addons/amxmodx/data/</code>, so <code>csstats.dat</code> cannot be saved. Fix the directory ownership.</li><li><strong>New players push old ones out</strong> &mdash; <code>csstats_maxsize</code> is too small for your traffic. Raise it.</li><li><strong>Stats count on a non-Steam server look wrong</strong> &mdash; ranks are keyed by SteamID, and if <a href="/tutorials/find-player-steamid">non-Steam IDs collide</a> two people share one rank. Configure Reunion to hand out stable IDs.</li></ul><h2>Verification</h2><p>Play a round, get a kill, then type <code>say /rank</code> &mdash; your kill count should increment. Restart the server and check <code>/rank</code> again; if your numbers survived the restart, <code>csstats.dat</code> is being written correctly. Finally, confirm the death HUD from <code>statsx</code> appears and clears within the duration you set. For a database-backed ranking that survives across multiple servers you would move to an SQL stats plugin, but for a single box the csx system above is the reliable default.</p>
0 18