Server bewerben

Initial release 1.0.0

Browse Source
1.0.0 - Initial release.
Daemon666 committed commit 3cc8156e5c63b690f13b5ea5626b53eed6d4467b
4 changed files with 164 additions and 0 deletions
+3 -0 CHANGELOG.md A
@@ -0,0 +1,3 @@
1 +## 1.0.0 (2026-02-07)
2 +
3 +1.0.0 - Initial release.
+1 -0 README.md A
@@ -0,0 +1 @@
1 +<p><strong>CSB Multi Jump</strong> lets players jump again in mid-air. In a <code>PlayerPreThink</code> hook the plugin watches for a <em>fresh</em> <code>+jump</code> press (not a held key) while the player is off the ground, and if they still have jumps left it sets their vertical velocity to the jump impulse. The counter refills the instant they touch the ground.</p><p>The number of extra jumps is <code>csb_mj_max</code> (default 1 = a double jump) and can be limited to a team (<code>csb_mj_team</code>) or an admin flag (<code>csb_mj_flag</code>) &mdash; handy for VIP-only air control.</p><p>Inspired by the well-known <em>Multi Jump</em> by VEN. Independent GPL re-implementation; no original code is reused.</p><h2>Features</h2><ul><li>Configurable number of extra jumps.</li><li>Edge-detected jump input, so holding jump does not burn every extra jump at once.</li><li>Optional team and/or flag gating.</li><li>Adjustable jump impulse.</li></ul><h2>Installation</h2><ol><li>Make sure the <code>fakemeta</code> module is enabled in <code>modules.ini</code> (default).</li><li>Compile, copy <code>csb_multi_jump.amxx</code> into <code>addons/amxmodx/plugins/</code> and add it to <code>plugins.ini</code>.</li><li>Change the map.</li></ol>
+109 -0 addons/amxmodx/scripting/csb_multi_jump.sma A
@@ -0,0 +1,109 @@
1 +/*
2 + * CSB Multi Jump
3 + * Copyright (C) 2026 counter-strike-boost.com
4 + *
5 + * Gives players N extra jumps in mid-air. In a PlayerPreThink hook the plugin
6 + * watches for a fresh +jump press while the player is off the ground and, if
7 + * jumps remain, launches them upward again. The number of extra jumps is
8 + * configurable and can be gated to a team or an admin flag. The counter resets
9 + * the moment the player touches the ground.
10 + *
11 + * Inspired by the well-known "Multi Jump" plugin by VEN. This is an independent
12 + * GPL re-implementation; no original code is reused.
13 + *
14 + * This program is free software: you can redistribute it and/or modify it under
15 + * the terms of the GNU General Public License as published by the Free Software
16 + * Foundation, either version 3 of the License, or (at your option) any later
17 + * version. See <https://www.gnu.org/licenses/> for details.
18 + */
19 +
20 +#include <amxmodx>
21 +#include <fakemeta>
22 +
23 +new const PLUGIN[] = "CSB Multi Jump"
24 +new const VERSION[] = "1.0.0"
25 +new const AUTHOR[] = "counter-strike-boost.com"
26 +
27 +new g_pEnabled, g_pMax, g_pImpulse, g_pFlag, g_pTeam
28 +
29 +new g_iJumpsDone[33]
30 +new bool:g_bOnGround[33]
31 +new g_iAllowFlags
32 +
33 +public plugin_init()
34 +{
35 + register_plugin(PLUGIN, VERSION, AUTHOR)
36 +
37 + g_pEnabled = register_cvar("csb_mj_enabled", "1")
38 + g_pMax = register_cvar("csb_mj_max", "1") /* extra jumps after the first */
39 + g_pImpulse = register_cvar("csb_mj_impulse", "265.0")
40 + g_pFlag = register_cvar("csb_mj_flag", "") /* empty = everyone */
41 + g_pTeam = register_cvar("csb_mj_team", "0") /* 0 = any, 1 = T, 2 = CT */
42 +
43 + register_forward(FM_PlayerPreThink, "fwPreThink")
44 +}
45 +
46 +public plugin_cfg()
47 +{
48 + new flagStr[8]
49 + get_pcvar_string(g_pFlag, flagStr, charsmax(flagStr))
50 + g_iAllowFlags = read_flags(flagStr)
51 +}
52 +
53 +bool:isAllowed(id)
54 +{
55 + if (g_iAllowFlags != 0 && !(get_user_flags(id) & g_iAllowFlags))
56 + return false
57 +
58 + new team = get_pcvar_num(g_pTeam)
59 + if (team != 0 && get_user_team(id) != team)
60 + return false
61 +
62 + return true
63 +}
64 +
65 +public fwPreThink(id)
66 +{
67 + if (!get_pcvar_num(g_pEnabled) || !is_user_alive(id))
68 + return FMRES_IGNORED
69 +
70 + new flags = pev(id, pev_flags)
71 +
72 + if (flags & FL_ONGROUND)
73 + {
74 + /* just landed: refill the jump budget */
75 + g_iJumpsDone[id] = 0
76 + g_bOnGround[id] = true
77 + return FMRES_IGNORED
78 + }
79 +
80 + /* airborne from here on */
81 + new button = pev(id, pev_button)
82 + new oldButton = pev(id, pev_oldbuttons)
83 +
84 + /* first frame after leaving the ground counts as the normal jump */
85 + if (g_bOnGround[id])
86 + {
87 + g_bOnGround[id] = false
88 + return FMRES_IGNORED
89 + }
90 +
91 + /* only a fresh press, not a held key */
92 + if (!(button & IN_JUMP) || (oldButton & IN_JUMP))
93 + return FMRES_IGNORED
94 +
95 + if (!isAllowed(id))
96 + return FMRES_IGNORED
97 +
98 + if (g_iJumpsDone[id] >= get_pcvar_num(g_pMax))
99 + return FMRES_IGNORED
100 +
101 + g_iJumpsDone[id]++
102 +
103 + new Float:velocity[3]
104 + pev(id, pev_velocity, velocity)
105 + velocity[2] = get_pcvar_float(g_pImpulse)
106 + set_pev(id, pev_velocity, velocity)
107 +
108 + return FMRES_IGNORED
109 +}
+51 -0 csb.json A
@@ -0,0 +1,51 @@
1 +{
2 + "name": "CSB Multi Jump",
3 + "category": "fun",
4 + "tags": "double jump, jump, movement",
5 + "image": "",
6 + "original_author": "VEN (Multi Jump)",
7 + "original_url": "",
8 + "license": "GPL-3.0",
9 + "title": "CSB Multi Jump",
10 + "short_desc": "Extra mid-air jumps. A fresh +jump while airborne re-launches the player; count and gating are cvars.",
11 + "version": "1.0.0",
12 + "amxx_min": "1.9",
13 + "amxx_compile_default": "1.9",
14 + "rehlds_ok": true,
15 + "hlds_ok": true,
16 + "regamedll_required": false,
17 + "metamod_flavor": "any",
18 + "reapi_required": false,
19 + "modules": "fakemeta",
20 + "install_notes": "1. fakemeta must be enabled in modules.ini (default)\n2. Put csb_multi_jump.amxx in addons/amxmodx/plugins/ and add it to plugins.ini\n3. Change map",
21 + "known_conflicts": "Any other multi/double jump plugin - run only one.",
22 + "cvars": [
23 + {
24 + "name": "csb_mj_enabled",
25 + "default": "1",
26 + "description": "Enable or disable multi jump."
27 + },
28 + {
29 + "name": "csb_mj_max",
30 + "default": "1",
31 + "description": "Extra jumps allowed after the normal one."
32 + },
33 + {
34 + "name": "csb_mj_impulse",
35 + "default": "265.0",
36 + "description": "Upward velocity of each extra jump."
37 + },
38 + {
39 + "name": "csb_mj_flag",
40 + "default": "",
41 + "description": "Admin flag required (empty = everyone)."
42 + },
43 + {
44 + "name": "csb_mj_team",
45 + "default": "0",
46 + "description": "Team allowed to multi jump (0 = any, 1 = T, 2 = CT)."
47 + }
48 + ],
49 + "commands": [],
50 + "main": "addons/amxmodx/scripting/csb_multi_jump.sma"
51 +}
0 52