[Cerere]Plugin Bhop

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
wizzkidon
Membru, skill 0
Membru, skill 0
Posts: 81
Joined: 20 Jun 2013, 09:00
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 1 time
Been thanked: 1 time
Contact:

17 May 2022, 23:43

//LE: Inainte de a incepe, tin sa precizez ca mai am un topic in sectiune tot despre un plugin de bhop, dar problema de pe atunci am rezolvat-o, acum revenind cu altceva.

Va salut. Pe cat suna de usor, pe atat este de complicat (pentru mine cel mai probabil)
Detin de curand un server de Deathrun (stilul clasic, nu cu knife mod, cum era prin 2008-2010). In prezent detin pluginul asta:

Code: Select all

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define VERSION "1.2"
//#define	FL_ONGROUND	(1<<9)	// not moving on the ground (REMOVE)

new bunny_mode, bunny_factor;

public plugin_init() {
	register_plugin("Auto BunnyHop", VERSION, "Night Dreamer");
	register_cvar("Auto_BunnyHop_version",    VERSION, FCVAR_SERVER|FCVAR_SPONLY);
	set_cvar_string("Auto_BunnyHop_version",    VERSION);	
	bunny_mode = register_cvar("abh_on","1");
	bunny_factor = register_cvar("abh_factor","0");
	RegisterHam(Ham_Player_Jump,"player","bunnyhop");
}

public bunnyhop(id) {
	if(get_pcvar_num(bunny_mode) == 0)
		return HAM_IGNORED;
	{
	if((pev(id,pev_flags) & FL_ONGROUND) && get_pcvar_float(bunny_factor) >= 1)
	{
	      new Float: Vel[3];
	      pev(id,pev_velocity,Vel);
	      Vel[2] = get_pcvar_float(bunny_factor);
	      set_pev(id,pev_velocity,Vel);
	      set_pev(id,pev_gaitsequence, 6);
	      set_pev(id,pev_frame, 0.0)
	}
	if((pev(id,pev_flags) & FL_ONGROUND) && get_pcvar_float(bunny_factor) <= 0)
	{
	      new Float: Vel[3], Float: Spd;
	      pev(id,pev_maxspeed,Spd);
	      pev(id,pev_velocity,Vel);
	      Vel[2] = Spd;
	      set_pev(id,pev_velocity,Vel);
	      set_pev(id,pev_gaitsequence, 6);
	      set_pev(id,pev_frame, 0.0)
	}
	}
	return HAM_IGNORED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1048\\ f0\\ fs16 \n\\ par }
*/
Este ok dpdv al functionarii, DOAR CA viteza acumulata in timpul bhop-ului este unul din factorii pe care nu ii pot intelege. Fiind un server de DeathRun Classic, nu am nevoie de high speed. Ma intereseaza ca sv_maxvelocity al pluginului sa fie de 280. Logica este ca pot schimba cvarul general al serverului, sa fie pe 280 dar atunci intervin alte probleme logice. Suprafetele de surf/timpul cazaturilor,etc, scad mult si nu este ok.

Ce imi doresc defapt? Ca pluginul de bhop sa nu treaca mai mult de 280 speed (gen prin maxvelocity) (poate printr-un cvar pe care il pot regla cum imi doresc eu)

In schimb, pluginul asta: Click nu tine cont de sv_maxvaloracity, ceea ce este ok, DAR era ok sa pot totusi sa reglez viteza,. Ca si functionare este setat standard (cred) ca speed, de ~250 sau cat e normal.


Optional: Am incercat si pluginul asta: Link dar nu am reusit cine stie ce cu el.



Code: Select all

[b]Plugin Cerut: Bhop plugin (clasic)[/b] 
[b]Descriere (adica ce face el mai exact):[/b] Clasic Bhop plugin -no high speed-
[b]Serverul impune conditii strict HLDS/REHLDS?:[/b] Nu
[b]Ai cautat pluginul?(daca da, precizeaza cum):[/b] Da
[b]Necesita mod special?:[/b] Nu
[b]Configuratie server:[/b] Deathrun
[b]Versiune AMXX:[/b] -
RoyalServer
User avatar
CyBer[N]eTicK
Membru, skill +1
Membru, skill +1
Posts: 190
Joined: 29 May 2020, 05:35
Detinator Steam: Da
CS Status: Strong & Original
Detinator server CS: BB.BLACKGAMES.RO
SteamID: /id/cybernetick_cbk/
Fond eXtream: 0
Location: Albania, tirana
Discord: cybernetick_cbk
Has thanked: 21 times
Been thanked: 18 times
Contact:

19 May 2022, 11:36

Code: Select all

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define VERSION "1.2"
//#define	FL_ONGROUND	(1<<9)	// not moving on the ground (REMOVE)

new bunny_mode, bunny_factor;

public plugin_init() {
	register_plugin("Auto BunnyHop", VERSION, "Night Dreamer");
	register_cvar("Auto_BunnyHop_version",    VERSION, FCVAR_SERVER|FCVAR_SPONLY);
	set_cvar_string("Auto_BunnyHop_version",    VERSION);	
	bunny_mode = register_cvar("abh_on","1");
	bunny_factor = register_cvar("abh_factor","0");
	RegisterHam(Ham_Player_Jump,"player","bunnyhop");
}
public client_connect(id)
{
	client_cmd(id,"cl_forwardspeed 280;cl_backspeed 280; cl_sidespeed 280")
}

public bunnyhop(id) {
	if(get_pcvar_num(bunny_mode) == 0)
		return HAM_IGNORED;
	{
	if((pev(id,pev_flags) & FL_ONGROUND) && get_pcvar_float(bunny_factor) >= 1)
	{
	      new Float: Vel[3];
	      pev(id,pev_velocity,Vel);
	      Vel[2] = get_pcvar_float(bunny_factor);
	      set_pev(id,pev_velocity,Vel);
	      set_pev(id,pev_gaitsequence, 6);
	      set_pev(id,pev_frame, 0.0)
	}
	if((pev(id,pev_flags) & FL_ONGROUND) && get_pcvar_float(bunny_factor) <= 0)
	{
	      new Float: Vel[3], Float: Spd;
	      pev(id,pev_maxspeed,Spd);
	      pev(id,pev_velocity,Vel);
	      Vel[2] = Spd;
	      set_pev(id,pev_velocity,Vel);
	      set_pev(id,pev_gaitsequence, 6);
	      set_pev(id,pev_frame, 0.0)
	}
	}
	return HAM_IGNORED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1048\\ f0\\ fs16 \n\\ par }
*/

--> Joaca-te putin si cu astea.

Code: Select all

cl_forwardspeed
cl_backspeed
cl_sidespeed
sv_airaccelerate 
sv_maxspeed 
Din ce m-am interesat pe internet depinde de client și de aceste comenzi, acum nici nu știu cu exactitate, am încercat să te ajut cum pot.
User avatar
Rainq
Membru, skill +2
Membru, skill +2
Posts: 681
Joined: 21 Jul 2015, 19:50
Detinator Steam: Da
CS Status: Retras
Detinator server CS: zm.extreamcs.com
SteamID: mrainq
Reputatie: Fost super moderator
Fost detinator ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: Bucharest
Discord: manuraiders
Has thanked: 29 times
Been thanked: 51 times
Contact:

19 May 2022, 20:01

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN	"Bhop Abilities"
#define VERSION "0.5.2"
#define AUTHOR	"ConnorMcLeod"

#define MAX_PLAYERS	32

#define OFFSET_CAN_LONGJUMP    356 // VEN
#define BUNNYJUMP_MAX_SPEED_FACTOR 1.7

#define PLAYER_JUMP		6

new g_iCdWaterJumpTime[MAX_PLAYERS+1]
new bool:g_bAlive[MAX_PLAYERS+1]
new bool:g_bAutoBhop[MAX_PLAYERS+1]

new g_pcvarBhopStyle, g_pcvarAutoBhop, g_pcvarFallDamage
new g_pcvarGravity

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)

	register_cvar("bhop_abilities", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
	g_pcvarBhopStyle = register_cvar("bhop_style", "2")  // (1 : no slowdown, 2 : no speed limit)
	g_pcvarAutoBhop = register_cvar("bhop_auto", "1")
	g_pcvarFallDamage = register_cvar("mp_falldamage", "0.0")

	RegisterHam(Ham_Player_Jump, "player", "Player_Jump")
	register_forward(FM_UpdateClientData, "UpdateClientData")
	register_forward(FM_CmdStart, "CmdStart")
	RegisterHam(Ham_Spawn, "player", "Check_Alive", 1)
	RegisterHam(Ham_Killed, "player", "Check_Alive", 1)
	RegisterHam(Ham_TakeDamage, "player", "Ham_TakeDamage_player")

	register_concmd("amx_autobhop", "AdminCmd_Bhop", ADMIN_LEVEL_A, "<nick|#userid> <0|1>")

	g_pcvarGravity = get_cvar_pointer("sv_gravity")
}

public Check_Alive(id)
{
	g_bAlive[id] = bool:is_user_alive(id)
}

public Ham_TakeDamage_player(id, ent, idattacker, Float:damage, damagebits)
{
	if( damagebits != DMG_FALL )
		return HAM_IGNORED

	damage *= get_pcvar_float(g_pcvarFallDamage)
	SetHamParamFloat(4, damage)

	return HAM_HANDLED
}

public CmdStart(id, uc_handle, seed)
{
	if(	g_bAlive[id]
	&&	get_pcvar_num(g_pcvarBhopStyle)
	&&	get_uc(uc_handle, UC_Buttons) & IN_USE
	&&	pev(id, pev_flags) & FL_ONGROUND	)
	{
		static Float:fVelocity[3]
		pev(id, pev_velocity, fVelocity)
		fVelocity[0] *= 0.3
		fVelocity[1] *= 0.3
		fVelocity[2] *= 0.3
		set_pev(id, pev_velocity, fVelocity)
	}
}

public Player_Jump(id)
{
	if( !g_bAlive[id] )
	{
		return
	}
	
	static iBhopStyle ; iBhopStyle = get_pcvar_num(g_pcvarBhopStyle)
	if(!iBhopStyle)
	{
		static iOldButtons ; iOldButtons = pev(id, pev_oldbuttons)
		if( (get_pcvar_num(g_pcvarAutoBhop) || g_bAutoBhop[id]) && iOldButtons & IN_JUMP && pev(id, pev_flags) & FL_ONGROUND)
		{
			iOldButtons &= ~IN_JUMP
			set_pev(id, pev_oldbuttons, iOldButtons)
			set_pev(id, pev_gaitsequence, PLAYER_JUMP)
			set_pev(id, pev_frame, 0.0)
			return
		}
		return
	}

	if( g_iCdWaterJumpTime[id] )
	{
		//client_print(id, print_center, "Water Jump !!!")
		return
	}

	if( pev(id, pev_waterlevel) >= 2 )
	{
		return
	}

	static iFlags ; iFlags = pev(id, pev_flags)
	if( !(iFlags & FL_ONGROUND) )
	{
		return
	}

	static iOldButtons ; iOldButtons = pev(id, pev_oldbuttons)
	if( !get_pcvar_num(g_pcvarAutoBhop) && !g_bAutoBhop[id] && iOldButtons & IN_JUMP )
	{
		return
	}

	// prevent the game from making the player jump
	// as supercede this forward just fails
	set_pev(id, pev_oldbuttons, iOldButtons | IN_JUMP)

	static Float:fVelocity[3]
	pev(id, pev_velocity, fVelocity)

	if(iBhopStyle == 1)
	{
		static Float:fMaxScaledSpeed
		pev(id, pev_maxspeed, fMaxScaledSpeed)
		if(fMaxScaledSpeed > 0.0)
		{
			fMaxScaledSpeed *= BUNNYJUMP_MAX_SPEED_FACTOR
			static Float:fSpeed
			fSpeed = floatsqroot(fVelocity[0]*fVelocity[0] + fVelocity[1]*fVelocity[1] + fVelocity[2]*fVelocity[2])
			if(fSpeed > fMaxScaledSpeed)
			{
				static Float:fFraction
				fFraction = ( fMaxScaledSpeed / fSpeed ) * 0.65
				fVelocity[0] *= fFraction
				fVelocity[1] *= fFraction
				fVelocity[2] *= fFraction
			}
		}
	}

	static Float:fFrameTime, Float:fPlayerGravity
	global_get(glb_frametime, fFrameTime)
	pev(id, pev_gravity, fPlayerGravity)

	new iLJ
	if(	(pev(id, pev_bInDuck) || iFlags & FL_DUCKING)
	&&	get_pdata_int(id, OFFSET_CAN_LONGJUMP)
	&&	pev(id, pev_button) & IN_DUCK
	&&	pev(id, pev_flDuckTime)	)
	{
		static Float:fPunchAngle[3], Float:fForward[3]
		pev(id, pev_punchangle, fPunchAngle)
		fPunchAngle[0] = -5.0
		set_pev(id, pev_punchangle, fPunchAngle)
		global_get(glb_v_forward, fForward)

		fVelocity[0] = fForward[0] * 560
		fVelocity[1] = fForward[1] * 560
		fVelocity[2] = 299.33259094191531084669989858532
		iLJ = 1
	}
	else
	{
		fVelocity[2] = 268.32815729997476356910084024775
	}

	fVelocity[2] -= fPlayerGravity * fFrameTime * 0.5 * get_pcvar_num(g_pcvarGravity)

	set_pev(id, pev_velocity, fVelocity)

	set_pev(id, pev_gaitsequence, PLAYER_JUMP+iLJ)
	set_pev(id, pev_frame, 0.0)
}

public UpdateClientData(id, sendweapons, cd_handle)
{
	g_iCdWaterJumpTime[id] = get_cd(cd_handle, CD_WaterJumpTime)
}
Image
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests