Cerere 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 .
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:

30 Jan 2021, 19:22

Code: Select all

/*
 *
 *	Author:		homorapian
 *	Date:		14-Aug-2005 
 *
 *
 *	what it is..	It is a bunnyhop that removes the slowdown after a jump. hold it to go faster
 *
 *	Cvars:
 *			bh_enabled		1 to enable this plugin, 0 to disable.
 *			bh_autojump		If set to 1 players just need to hold down jump to bunny hop (no skill required)
 *			bh_showusage		If set to 1 it will inform joining players that bunny hopping has been enabled
 *						and how to use it if bh_autojump enabled.
 *
 *	Requirements:	amxmodx 1.01 or higher
 *
 *  ************************ I LEARNED THIS PLUGIN FROM ANOTHER Bunnyhop PLUGIN*************************************
 */

#include <amxmodx>
#include <engine>

#define	FL_WATERJUMP	(1<<11)	// popping out of the water
#define	FL_ONGROUND	(1<<9)	// not moving on the ground

public plugin_init() {
	register_plugin("Bhop", "1.0", "homorapian")
	register_cvar("sbhopper_version", "1.0", 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)		// Won't slow down after a jump

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

	if (entity_get_int(id, EV_INT_button) & 2) {	
		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)	// Jump graphics
	}
	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") ) {
	//	xCoLoR(id, "!n[!veXtreamCS!n]!v Bunny hop!n este!n activat!n pe acest server. Datorita acestui plugin poti face bunny hop pe server")
	} else {
	//	xCoLoR(id, "!n[!veXtreamcs!n]!v Bunny hop!n este!n activat!n pe acest server. Datorita acestui plugin poti face bunny hop pe server")
	}
	return PLUGIN_HANDLED
}

stock xCoLoR(id, String[], any:...) 
{
	static szMesage[192];
	vformat(szMesage, charsmax(szMesage), String, 3);
	
	replace_all(szMesage, charsmax(szMesage), "!n", "^1");
	replace_all(szMesage, charsmax(szMesage), "!e", "^3");
	replace_all(szMesage, charsmax(szMesage), "!v", "^4");
	replace_all(szMesage, charsmax(szMesage), "!e2", "^0");
	
	static g_msg_SayText = 0;
	if(!g_msg_SayText)	g_msg_SayText = get_user_msgid("SayText");
	
	new Players[32], iNum = 1, i;

 	if(id) Players[0] = id;
	else get_players(Players, iNum, "ch");
	
	for(--iNum; iNum >= 0; iNum--) 
	{
		i = Players[iNum];
		
		message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
		write_byte(i);
		write_string(szMesage);
		message_end();
	}
}
Image
User avatar
mariusexeqt
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 199
Joined: 01 Jan 2020, 22:55
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 4 times
Been thanked: 4 times
Contact:

30 Jan 2021, 20:23

Rainq wrote:
30 Jan 2021, 19:22

Code: Select all

/*
 *
 *	Author:		homorapian
 *	Date:		14-Aug-2005 
 *
 *
 *	what it is..	It is a bunnyhop that removes the slowdown after a jump. hold it to go faster
 *
 *	Cvars:
 *			bh_enabled		1 to enable this plugin, 0 to disable.
 *			bh_autojump		If set to 1 players just need to hold down jump to bunny hop (no skill required)
 *			bh_showusage		If set to 1 it will inform joining players that bunny hopping has been enabled
 *						and how to use it if bh_autojump enabled.
 *
 *	Requirements:	amxmodx 1.01 or higher
 *
 *  ************************ I LEARNED THIS PLUGIN FROM ANOTHER Bunnyhop PLUGIN*************************************
 */

#include <amxmodx>
#include <engine>

#define	FL_WATERJUMP	(1<<11)	// popping out of the water
#define	FL_ONGROUND	(1<<9)	// not moving on the ground

public plugin_init() {
	register_plugin("Bhop", "1.0", "homorapian")
	register_cvar("sbhopper_version", "1.0", 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)		// Won't slow down after a jump

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

	if (entity_get_int(id, EV_INT_button) & 2) {	
		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)	// Jump graphics
	}
	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") ) {
	//	xCoLoR(id, "!n[!veXtreamCS!n]!v Bunny hop!n este!n activat!n pe acest server. Datorita acestui plugin poti face bunny hop pe server")
	} else {
	//	xCoLoR(id, "!n[!veXtreamcs!n]!v Bunny hop!n este!n activat!n pe acest server. Datorita acestui plugin poti face bunny hop pe server")
	}
	return PLUGIN_HANDLED
}

stock xCoLoR(id, String[], any:...) 
{
	static szMesage[192];
	vformat(szMesage, charsmax(szMesage), String, 3);
	
	replace_all(szMesage, charsmax(szMesage), "!n", "^1");
	replace_all(szMesage, charsmax(szMesage), "!e", "^3");
	replace_all(szMesage, charsmax(szMesage), "!v", "^4");
	replace_all(szMesage, charsmax(szMesage), "!e2", "^0");
	
	static g_msg_SayText = 0;
	if(!g_msg_SayText)	g_msg_SayText = get_user_msgid("SayText");
	
	new Players[32], iNum = 1, i;

 	if(id) Players[0] = id;
	else get_players(Players, iNum, "ch");
	
	for(--iNum; iNum >= 0; iNum--) 
	{
		i = Players[iNum];
		
		message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
		write_byte(i);
		write_string(szMesage);
		message_end();
	}
}
merge, mersi mult
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests