[help] Increase Bunnyhop strafe

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
L.O.F.I
Извън линия
Foreigner
Foreigner
Мнения: 36
Регистриран на: 03 Фев 2020, 19:01
Местоположение: Algeria
Се отблагодари: 2 пъти
Обратна връзка:

[help] Increase Bunnyhop strafe

Мнение от L.O.F.I » 20 Сеп 2021, 17:28

Hi !
I would like you to add some code to increase and decrease the speed of the bhop. I saw this on a (FURIEN) server and the speed of bhop was just crazy.

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <engine>

#define	FL_WATERJUMP	(1<<11)	// player jumping out of water
#define	FL_ONGROUND	(1<<9)	// At rest / on the ground

public plugin_init() {
	register_plugin("Super Bunny Hopper", "2.1", "Okeh")
	register_cvar("sbhopper_version", "1.2", FCVAR_SERVER)

	register_cvar("bh_enabled", "1")
	register_cvar("bh_autojump", "1")
	register_cvar("bh_showusage", "1")
}

public client_PreThink(id) {
	if (!get_cvar_num("bh_enabled"))
		return PLUGIN_CONTINUE

	entity_set_float(id, EV_FL_fuser2, 0.0)		// Disable slow down after jumping

	if (!get_cvar_num("bh_autojump"))
		return PLUGIN_CONTINUE

// Code from CBasePlayer::Jump (player.cpp)		Make a player jump automatically
	if (entity_get_int(id, EV_INT_button) & 2) {	// If holding jump
		new flags = entity_get_int(id, EV_INT_flags)

		if (flags & FL_WATERJUMP)
			return PLUGIN_CONTINUE
		if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
			return PLUGIN_CONTINUE
		if ( !(flags & FL_ONGROUND) )
			return PLUGIN_CONTINUE

		new Float:velocity[3]
		entity_get_vector(id, EV_VEC_velocity, velocity)
		velocity[2] += 250.0
		entity_set_vector(id, EV_VEC_velocity, velocity)

		entity_set_int(id, EV_INT_gaitsequence, 6)	// Play the Jump Animation
	}
	return PLUGIN_CONTINUE
}

public client_authorized(id)
	set_task(30.0, "showUsage", id)

public showUsage(id) {
	if ( !get_cvar_num("bh_enabled") || !get_cvar_num("bh_showusage") )
		return PLUGIN_HANDLED

	if ( !get_cvar_num("bh_autojump") ) {
		
	} else {
		
	}
	return PLUGIN_HANDLED
}
Последно промяна от thoughtz на 20 Сеп 2021, 17:50, променено общо 1 път.
Причина: Use [code] tag
𝕊𝕖𝕣𝕧𝕖𝕣 𝕄𝕠𝕕 : 𝔽𝕌ℝ𝕀𝔼ℕ ℂ𝕝𝕒𝕤𝕤𝕚𝕔
ℂ.𝔼.𝕆 : 𝕐𝕦𝕤𝕠ℂ𝕙𝕒𝕟-
𝕀ℙ : 𝟡𝟛.𝟙𝟙𝟝.𝟝𝟛.𝟙𝟞𝟠:𝟚𝟟𝟘𝟙𝟟

  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: Google [Bot] и 7 госта