Modificare b-hop

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

25 Jul 2014, 09:24

Deci am si eu un b-hop.amxx pe server care arata un mesaj la 30 de secunde, da doar odata acel mesaj si e colorat mesaju.Nu mai am .sma si doresc sa ii modific si eu culoarea la tag :) va las un .sma de plugin b-hop automat si as dori sa-l faceti sa dea mesaju ala dupa 30 de secunde de la conectare si sa fie colorat.Vreau sa il fixati sa dea doar un mesaj in plugin arata 2 mesaje.
| Afiseaza codul
[code]/*
 *
 *	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") ) {
		client_print(id, print_chat, "[INFO] BunnyHop este activat pe acest server, puteti sari")
	} else {
		client_print(id, print_chat, "[INFO] BunnyHop este activat pe acest server, puteti sari")
	}
	return PLUGIN_HANDLED
}
[/code]
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
RoyalServer 2
rumini_uebki
Membru, skill 0
Membru, skill 0
Posts: 49
Joined: 22 Jul 2014, 00:21
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 8 times
Contact:

25 Jul 2014, 14:18

Incearca:

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>
#include < ColorChat >

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

new g_szTag = { "BHOP" }// Tag

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_putinserver( id ) {
	set_task( 30.0, "showUsage", id );
}
public showUsage( id ) {
	new pCvarEnabled = get_cvar_num( "bh_enabled" );
	new pCvarShowUsage = get_cvar_num( "bh_showusage" );
	
	if( pCvarEnabled == 1 && pCvarShowUsage == 1)
		ColorChat( id, RED, "^1[^3%s^1] BunnyHop este^4 activat^1 pe acest server, puteti sari.", g_szTag );
	return 0;
}
:meme
Cosmin
Fost moderator
Fost moderator
Posts: 9362
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

25 Jul 2014, 14:20

adica vrei un mesaj sa il dea dupa ce playerul se conecteaza ? pur si simplu un mesaj ?
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

26 Jul 2014, 09:15

@ rumini_uebk 2 errori la compilare
Image

@ scosmynnnn, pluginu de bhop are incorporat el un mesaj dar il dă de 2 ori si nu e colorat.Eu vreau sa-l dea odata si sa fie colorat cum a facut rumini dar sa se compileze X_x .
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
w3zoo_RedX
Membru, skill +2
Membru, skill +2
Posts: 737
Joined: 21 Dec 2013, 22:16
Detinator Steam: Da
CS Status: Scripter CS.
Detinator server CS: PM.
SteamID: PM.
Location: Bucuresti sector 2
Has thanked: 45 times
Been thanked: 45 times
Contact:

26 Jul 2014, 10:37

| Afiseaza codul
#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") ) {
   ColorChat(id, GREEN,"[INFO] ^3BunnyHop ^4este activat pe acest server, puteti sari")
   }
   return PLUGIN_HANDLED
}
| Afiseaza codul
#if defined _colorchat_included
  #endinput
#endif
#define _colorchat_included

/* ColorChat Support */
#define NORMAL DontChange
#define GREEN DontChange
#define TEAM_COLOR DontChange
#define RED Red
#define BLUE Blue
#define GREY Grey
#define ColorChat client_print_color
/* ColorChat Support */

enum _:Colors {
	DontChange,
	Red,
	Blue,
	Grey
}

stock const g_szTeamName[Colors][] = 
{
	"UNASSIGNED",
	"TERRORIST",
	"CT",
	"SPECTATOR"
}

stock client_print_color(id, iColor=DontChange, const szMsg[], any:...)
{
	// check if id is different from 0
	if( id && !is_user_connected(id) )
	{
		return 0;
	}

	if( iColor > Grey )
	{
		iColor = DontChange;
	}

	new szMessage[192];
	if( iColor == DontChange )
	{
		szMessage[0] = 0x04;
	}
	else
	{
		szMessage[0] = 0x03;
	}

	new iParams = numargs();
	// Specific player code
	if(id)
	{
		if( iParams == 3 )
		{
			copy(szMessage[1], charsmax(szMessage)-1, szMsg);
		}
		else
		{
			vformat(szMessage[1], charsmax(szMessage)-1, szMsg, 4);
		}

		if( iColor )
		{
			new szTeam[11]; // store current team so we can restore it
			get_user_team(id, szTeam, charsmax(szTeam));

			// set id TeamInfo in consequence
			// so SayText msg gonna show the right color
			Send_TeamInfo(id, id, g_szTeamName[iColor]);

			// Send the message
			Send_SayText(id, id, szMessage);

			// restore TeamInfo
			Send_TeamInfo(id, id, szTeam);
		}
		else
		{
			Send_SayText(id, id, szMessage);
		}
	} 

	// Send message to all players
	else
	{
		// Figure out if at least 1 player is connected
		// so we don't send useless message if not
		// and we gonna use that player as team reference (aka SayText message sender) for color change
		new iPlayers[32], iNum;
		get_players(iPlayers, iNum, "ch");
		if( !iNum )
		{
			return 0;
		}

		new iFool = iPlayers[0];

		new iMlNumber, i, j;
		new Array:aStoreML = ArrayCreate();
		if( iParams >= 5 ) // ML can be used
		{
			for(j=4; j<iParams; j++)
			{
				// retrieve original param value and check if it's LANG_PLAYER value
				if( getarg(j) == LANG_PLAYER )
				{
					i=0;
					// as LANG_PLAYER == -1, check if next parm string is a registered language translation
					while( ( szMessage[ i ] = getarg( j + 1, i++ ) ) ) {}
					if( GetLangTransKey(szMessage) != TransKey_Bad )
					{
						// Store that arg as LANG_PLAYER so we can alter it later
						ArrayPushCell(aStoreML, j++);

						// Update ML array saire so we'll know 1st if ML is used,
						// 2nd how many args we have to alterate
						iMlNumber++;
					}
				}
			}
		}

		// If arraysize == 0, ML is not used
		// we can only send 1 MSG_BROADCAST message
		if( !iMlNumber )
		{
			if( iParams == 3 )
			{
				copy(szMessage[1], charsmax(szMessage)-1, szMsg);
			}
			else
			{
				vformat(szMessage[1], charsmax(szMessage)-1, szMsg, 4);
			}

			if( iColor )
			{
				new szTeam[11];
				get_user_team(iFool, szTeam, charsmax(szTeam));
				Send_TeamInfo(0, iFool, g_szTeamName[iColor]);
				Send_SayText(0, iFool, szMessage);
				Send_TeamInfo(0, iFool, szTeam);
			}
			else
			{
				Send_SayText(0, iFool, szMessage);
			}
		}

		// ML is used, we need to loop through all players,
		// format text and send a MSG_ONE_UNRELIABLE SayText message
		else
		{
			new szTeam[11], szFakeTeam[10];
			
			if( iColor )
			{
				get_user_team(iFool, szTeam, charsmax(szTeam));
				copy(szFakeTeam, charsmax(szFakeTeam), g_szTeamName[iColor]);
			}

			for( i = 0; i < iNum; i++ )
			{
				id = iPlayers;

				for(j=0; j<iMlNumber; j++)
				{
					// Set all LANG_PLAYER args to player index ( = id )
					// so we can format the text for that specific player
					setarg(ArrayGetCell(aStoreML, j), _, id);
				}

				// format string for specific player
				vformat(szMessage[1], charsmax(szMessage)-1, szMsg, 4);

				if( iColor )
				{
					Send_TeamInfo(id, iFool, szFakeTeam);
					Send_SayText(id, iFool, szMessage);
					Send_TeamInfo(id, iFool, szTeam);
				}
				else
				{
					Send_SayText(id, iFool, szMessage);
				}
			}
			ArrayDestroy(aStoreML);
		}
	}
	return 1;
}

stock Send_TeamInfo(iReceiver, iPlayerId, szTeam[])
{
	static iTeamInfo = 0;
	if( !iTeamInfo )
	{
		iTeamInfo = get_user_msgid("TeamInfo");
	}
	message_begin(iReceiver ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, iTeamInfo, .player=iReceiver);
	write_byte(iPlayerId);
	write_string(szTeam);
	message_end();
}

stock Send_SayText(iReceiver, iPlayerId, szMessage[])
{
	static iSayText = 0;
	if( !iSayText )
	{
		iSayText = get_user_msgid("SayText");
	}
	message_begin(iReceiver ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, iSayText, .player=iReceiver);
	write_byte(iPlayerId);
	write_string(szMessage);
	message_end();
}

stock register_dictionary_colored(const filename[])
{
	if( !register_dictionary(filename) )
	{
		return 0;
	}

	new szFileName[256];
	get_localinfo("amxx_datadir", szFileName, charsmax(szFileName));
	format(szFileName, charsmax(szFileName), "%s/lang/%s", szFileName, filename);
	new fp = fopen(szFileName, "rt");
	if( !fp )
	{
		log_amx("Failed to open %s", szFileName);
		return 0;
	}

	new szBuffer[512], szLang[3], szKey[64], szTranslation[256], TransKey:iKey;

	while( !feof(fp) )
	{
		fgets(fp, szBuffer, charsmax(szBuffer));
		trim(szBuffer);

		if( szBuffer[0] == '[' )
		{
			strtok(szBuffer[1], szLang, charsmax(szLang), szBuffer, 1, ']');
		}
		else if( szBuffer[0] )
		{
			strbreak(szBuffer, szKey, charsmax(szKey), szTranslation, charsmax(szTranslation));
			iKey = GetLangTransKey(szKey);
			if( iKey != TransKey_Bad )
			{
				while( replace(szTranslation, charsmax(szTranslation), "!g", "^4") ){}
				while( replace(szTranslation, charsmax(szTranslation), "!t", "^3") ){}
				while( replace(szTranslation, charsmax(szTranslation), "!n", "^1") ){}
				AddTranslation(szLang, iKey, szTranslation[2]);
			}
		}
	}
	
	fclose(fp);
	return 1;
}
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

26 Jul 2014, 12:22

@ w3zoo_RedX,au trecut 2 minute si mesaju acela nu a mai aparut :|
Astept sa fie incontinuare modificat.
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
w3zoo_RedX
Membru, skill +2
Membru, skill +2
Posts: 737
Joined: 21 Dec 2013, 22:16
Detinator Steam: Da
CS Status: Scripter CS.
Detinator server CS: PM.
SteamID: PM.
Location: Bucuresti sector 2
Has thanked: 45 times
Been thanked: 45 times
Contact:

26 Jul 2014, 14:58

| Afiseaza codul
#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") ) {
   ColorChat(id, GREEN,"[INFO] ^3BunnyHop ^4este activat pe acest server, puteti sari")
   }
   return PLUGIN_HANDLED
}
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

26 Jul 2014, 15:27

Da in logs errori si nu apare mesaju nici dupa 2 minute stand pe server.
Errori in logs | Afiseaza codul
[code]L 07/26/2014 - 15:26:26: Start of error session.
L 07/26/2014 - 15:26:26: Info (map "de_dust2x2") (file "addons/amxmodx/logs/error_20140726.log")
L 07/26/2014 - 15:26:26: String formatted incorrectly - parameter 3 (total 2)
L 07/26/2014 - 15:26:26: [AMXX] Displaying debug trace (plugin "b-hop.amxx")
L 07/26/2014 - 15:26:26: [AMXX] Run time error 25: parameter error 
L 07/26/2014 - 15:26:26: [AMXX]    [0] b-hop.sma::color_chat (line 62)
L 07/26/2014 - 15:26:26: [AMXX]    [1] b-hop.sma::showUsage (line 53)
[/code]
Rog daca se poate lucra pe aceasta sursa am adaugat eu un stock de culoare sa imi fie mie mai usor | Afiseaza codul
[code]#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") ) {
   color_chat(id, "^1[^4%s^1] BunnyHop este ^4activat ^1pe acest server, puteti sari")
   }
   return PLUGIN_HANDLED
}

stock color_chat(const id, const input[], any:...)
{
   new count = 1, players[32]
   static msg[191]
   vformat(msg, 190, input, 3)

   replace_all(msg, 190, ".v", "^4")
   replace_all(msg, 190, ".g", "^1")
   replace_all(msg, 190, ".e", "^3")

   if (id) players[0] = id; else get_players(players, count, "ch")
   {
      for (new i = 0; i < count; i++)
      {
         if (is_user_connected(players))
         {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players)
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}[/code]
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
w3zoo_RedX
Membru, skill +2
Membru, skill +2
Posts: 737
Joined: 21 Dec 2013, 22:16
Detinator Steam: Da
CS Status: Scripter CS.
Detinator server CS: PM.
SteamID: PM.
Location: Bucuresti sector 2
Has thanked: 45 times
Been thanked: 45 times
Contact:

26 Jul 2014, 15:34

| Afiseaza codul
#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) {
   color_chat(id, "^1[^4%s^1] BunnyHop este ^4activat ^1pe acest server, puteti sari")
   return PLUGIN_HANDLED
}

stock color_chat(const id, const input[], any:...)
{
   new count = 1, players[32]
   static msg[191]
   vformat(msg, 190, input, 3)

   replace_all(msg, 190, ".v", "^4")
   replace_all(msg, 190, ".g", "^1")
   replace_all(msg, 190, ".e", "^3")

   if (id) players[0] = id; else get_players(players, count, "ch")
   {
      for (new i = 0; i < count; i++)
      {
         if (is_user_connected(players))
         {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players)
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

26 Jul 2014, 15:41

errori logs | Afiseaza codul
[code]L 07/26/2014 - 15:40:01: Start of error session.
L 07/26/2014 - 15:40:01: Info (map "de_dust2x2") (file "addons/amxmodx/logs/error_20140726.log")
L 07/26/2014 - 15:40:01: String formatted incorrectly - parameter 3 (total 2)
L 07/26/2014 - 15:40:01: [AMXX] Displaying debug trace (plugin "b-hop.amxx")
L 07/26/2014 - 15:40:01: [AMXX] Run time error 25: parameter error 
L 07/26/2014 - 15:40:01: [AMXX]    [0] b-hop.sma::color_chat (line 57)
L 07/26/2014 - 15:40:01: [AMXX]    [1] b-hop.sma::showUsage (line 49)
[/code]
Mesaju tot nu-l arata.
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
w3zoo_RedX
Membru, skill +2
Membru, skill +2
Posts: 737
Joined: 21 Dec 2013, 22:16
Detinator Steam: Da
CS Status: Scripter CS.
Detinator server CS: PM.
SteamID: PM.
Location: Bucuresti sector 2
Has thanked: 45 times
Been thanked: 45 times
Contact:

26 Jul 2014, 15:47

| Afiseaza codul
[code]#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_putinserver(id){
   set_task(30.0, "showUsage", id)
}
public showUsage(id) {
   color(0, "^1[^4%s^1] BunnyHop este ^4activat ^1pe acest server, puteti sari")
   return PLUGIN_HANDLED
}


stock color(const id, const input[], any:...)
{
	new count = 1, players[32];
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, ".v", "^4")
	replace_all(msg, 190, ".g", "^1")
	replace_all(msg, 190, ".e", "^3")
	
	if(id) players[0] = id; else get_players(players, count, "ch")
	{
		for(new i = 0; i < count; i++)
		{
			if(is_user_connected(players))
			{
				message_begin(MSG_ONE_UNRELIABLE, g_msg_saytext, _, players)
				write_byte(players)
				write_string(msg)
				message_end()
			}
		}
	}
}[/code]
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

26 Jul 2014, 15:50

Errori la compilare.

Image
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests