rang admin chat

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
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

07 Jan 2014, 15:57

Am si eu un plugin pentru rang la adminii dar apare si la jucatorii rang si nu doresc .
Adica apare [jucator mort] si [jucator] si nu vreau ,acest plugin are ghostchat si doresc sa ramana ,decat pentru playerii sa nu mai apara nimica sa fie ca inaite si sa fie doar pentru adminii.
Credeti ca se poate las sursa mai jos.
sursa | Afiseaza codul
[code]/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < cstrike >

#define PLUGIN "Rang Admin Chat Fixed"
#define VERSION "1.0.1"

#pragma semicolon 1

#define	MAX_GROUPS	12 

// --| CC_ColorChat.
enum Color
{
	NORMAL = 1, 		// Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
	GREEN, 			// Culoare Verde.
	TEAM_COLOR, 		// Culoare Rosu, Albastru, Gri.
	GREY, 			// Culoarea Gri.
	RED, 			// Culoarea Rosu.
	BLUE, 			// Culoarea Albastru.
};

new TeamName[  ][  ] = 
{
	"",
	"TERRORIST",
	"CT",
	"SPECTATOR"
};
// --| CC_ColorChat.


new g_szGroups[ MAX_GROUPS ][ ] =
{
   "DETINATOR",
   "OWNER",
   "MODERATOR",
   "ADMINISTRATOR",
   "HELPER",
   "SLOT*",
   "SLOT",
   "VIP-G1",
   "VIP-G2",
   "VIP-G3",
   "VIP-G4",
   "VIP-G5"
   
};

new g_szGroupsFlags[ MAX_GROUPS ][ ] =
{
	"abcdefghijklmnopqrstu",
	"abcdefgijmnopqrs",
	"bcdefijmnopq",
	"bcdefijmno",
	"bcdefijm",
	"bi",
	"b",
	"bci", 
	"bcdei", 
	"bcdefji", 
	"bcdefij", 
	"abcdefghijlmnopqrstu"
};

new g_iGroupsFlagsValues[ MAX_GROUPS ];

public plugin_init( )
{
	//Plugin original creat de Ex3cuTioN ( pluginuri-extream/rangadminchat-t81702.html )!
	register_plugin( PLUGIN, VERSION, "Askhanar" );
	
	
	register_clcmd("say","HookClCmdSay");
	register_clcmd("say_team","HookClCmdSayTeam");
	
	for( new i = 0; i < MAX_GROUPS; i++ )
		g_iGroupsFlagsValues[ i ] = read_flags( g_szGroupsFlags[ i ] );
		
	// Add your code here...
}


public HookClCmdSay( id )
{
	
	if( is_user_bot( id ) )
		return PLUGIN_CONTINUE;
	
	static szChat[ 192 ];
	read_args( szChat, sizeof( szChat ) - 1 );
	remove_quotes( szChat );
	
	if( equali( szChat,"" ) )
		return PLUGIN_CONTINUE;
	
	static szName[ 32 ];
	get_user_name( id, szName, sizeof ( szName ) -1 );
		
	if( is_user_admin( id ) )
	{

		for( new i = 0; i < MAX_GROUPS; i++ )
		{
			
			if( get_user_flags( id ) == g_iGroupsFlagsValues[ i ] )
			{
				
				switch( cs_get_user_team( id ) )
				{
					case CS_TEAM_T:		ColorChat( 0, RED,"^x03[^x04%s^x03] %s^x01: %s", g_szGroups[ i ], szName, szChat );
					case CS_TEAM_CT:	ColorChat( 0, BLUE,"^x03[^x04%s^x03] %s^x01: %s", g_szGroups[ i ], szName, szChat );
					case CS_TEAM_SPECTATOR:	ColorChat( 0, GREY,"^x03[^x04%s^x03] %s^x01: %s", g_szGroups[ i ], szName, szChat );
				}
				
				break;
			}
		}
	}
	
	else
	{
		
		switch( cs_get_user_team( id ) )
		{
			case CS_TEAM_T:		ColorChat( 0, RED,"^x03[^x01Jucator%s^x03] %s^x01: %s", is_user_alive( id ) ? "" : " Mort", szName, szChat );
			case CS_TEAM_CT:	ColorChat( 0, BLUE,"^x03[^x01Jucator%s^x03] %s^x01: %s", is_user_alive( id ) ? "" : " Mort", szName, szChat );
			case CS_TEAM_SPECTATOR:	ColorChat( 0, GREY,"^x03[^x01Jucator^x03] %s^x01: %s", szName, szChat );
		}
		
	}
	
	
	return PLUGIN_HANDLED_MAIN;
}

public HookClCmdSayTeam( id )
{
	
	if( is_user_bot( id ) )
		return PLUGIN_CONTINUE;
	
	static szChat[ 192 ];
	read_args( szChat, sizeof( szChat ) - 1 );
	remove_quotes( szChat );
	
	if( equali( szChat,"" ) )
		return PLUGIN_CONTINUE;
	
	static szName[ 32 ];
	get_user_name( id, szName, sizeof ( szName ) -1 );
	
	static iPlayers[ 32 ];
	static iPlayersNum;
	
	get_players( iPlayers, iPlayersNum, "ch" );
	if( !iPlayersNum )
		return PLUGIN_CONTINUE;
					
	static iPlayer, i;
	iPlayer = -1; i = 0;
	
	if( is_user_admin( id ) )
	{
		static x; x = 0;
		
		for( x = 0; x < MAX_GROUPS; x++ )
		{
			
			if( get_user_flags( id ) == g_iGroupsFlagsValues[ x ] )
			{	
				
				for( i = 0; i < iPlayersNum; i++ )
				{
					
					iPlayer = iPlayers[ i ];
		
					if( cs_get_user_team( id ) == cs_get_user_team( iPlayer ) )
					{
						switch( cs_get_user_team( id ) )
						{
							case CS_TEAM_T:		ColorChat( iPlayer, RED, "^x03[Tero] [^x04%s^x03] %s^x01: %s", g_szGroups[ x ], szName, szChat );
							case CS_TEAM_CT:	ColorChat( iPlayer, BLUE, "^x03[CT] [^x04%s^x03] %s^x01: %s", g_szGroups[ x ], szName, szChat );
							case CS_TEAM_SPECTATOR:	ColorChat( iPlayer, GREY, "^x03[Spec] [^x04%s^x03] %s", g_szGroups[ x ], szName, szChat );
						}
					}
				}
				
				break;
			}
		}
	}
	
	else
	{
			
		for( i = 0; i < iPlayersNum; i++ )
		{
			
			iPlayer = iPlayers[ i ];

			if( cs_get_user_team( id ) == cs_get_user_team( iPlayer ) )
			{
				switch( cs_get_user_team( id ) )
				{
					case CS_TEAM_T:		ColorChat( iPlayer, RED, "^x03[Tero] [^x01Jucator%s^x03] %s^x01: %s", is_user_alive( id ) ? "" : " Mort", szName, szChat );
					case CS_TEAM_CT:	ColorChat( iPlayer, BLUE, "^x03[CT] [^x01Jucator%s^x03] %s^x01: %s", is_user_alive( id ) ? "" : " Mort", szName, szChat );
					case CS_TEAM_SPECTATOR:	ColorChat( iPlayer, GREY, "^x03[Spec] [^x01Jucator^x03] %s^x01: %s", szName, szChat );
				}
			}
		}
	}
				
	return PLUGIN_HANDLED_MAIN;
}

// From amxmisc.inc
stock is_user_admin( id )
{
	new __flags=get_user_flags(id);
	return (__flags>0 && !(__flags&ADMIN_USER));
}
// -----------------------


// --| CC_ColorChat.
ColorChat(  id, Color:iType, const msg[  ], { Float, Sql, Result, _}:...  )
{
	
	// Daca nu se afla nici un jucator pe server oprim TOT. Altfel dam de erori..
	if( !get_playersnum( ) ) return;
	
	new szMessage[ 256 ];

	switch( iType )
	{
		 // Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
		case NORMAL:	szMessage[ 0 ] = 0x01;
		
		// Culoare Verde.
		case GREEN:	szMessage[ 0 ] = 0x04;
		
		// Alb, Rosu, Albastru.
		default: 	szMessage[ 0 ] = 0x03;
	}

	vformat(  szMessage[ 1 ], 251, msg, 4  );

	// Ne asiguram ca mesajul nu este mai lung de 192 de caractere.Altfel pica server-ul.
	szMessage[ 192 ] = '^0';
	

	new iTeam, iColorChange, iPlayerIndex, MSG_Type;
	
	if( id )
	{
		MSG_Type  =  MSG_ONE_UNRELIABLE;
		iPlayerIndex  =  id;
	}
	else
	{
		iPlayerIndex  =  CC_FindPlayer(  );
		MSG_Type = MSG_ALL;
	}
	
	iTeam  =  get_user_team( iPlayerIndex );
	iColorChange  =  CC_ColorSelection(  iPlayerIndex,  MSG_Type, iType);

	CC_ShowColorMessage(  iPlayerIndex, MSG_Type, szMessage  );
		
	if(  iColorChange  )	CC_Team_Info(  iPlayerIndex, MSG_Type,  TeamName[ iTeam ]  );

}

CC_ShowColorMessage(  id, const iType, const szMessage[  ]  )
{
	
	static bool:bSayTextUsed;
	static iMsgSayText;
	
	if(  !bSayTextUsed  )
	{
		iMsgSayText  =  get_user_msgid( "SayText" );
		bSayTextUsed  =  true;
	}
	
	message_begin( iType, iMsgSayText, _, id  );
	write_byte(  id  );		
	write_string(  szMessage  );
	message_end(  );
}

CC_Team_Info( id, const iType, const szTeam[  ] )
{
	static bool:bTeamInfoUsed;
	static iMsgTeamInfo;
	if(  !bTeamInfoUsed  )
	{
		iMsgTeamInfo  =  get_user_msgid( "TeamInfo" );
		bTeamInfoUsed  =  true;
	}
	
	message_begin( iType, iMsgTeamInfo, _, id  );
	write_byte(  id  );
	write_string(  szTeam  );
	message_end(  );

	return 1;
}

CC_ColorSelection(  id, const iType, Color:iColorType)
{
	switch(  iColorType  )
	{
		
		case RED:	return CC_Team_Info(  id, iType, TeamName[ 1 ]  );
		case BLUE:	return CC_Team_Info(  id, iType, TeamName[ 2 ]  );
		case GREY:	return CC_Team_Info(  id, iType, TeamName[ 0 ]  );

	}

	return 0;
}

CC_FindPlayer(  )
{
	new iMaxPlayers  =  get_maxplayers(  );
	
	for( new i = 1; i <= iMaxPlayers; i++ )
		if(  is_user_connected( i )  )
			return i;
	
	return -1;
}
// --| CC_ColorChat.
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{ rtf1 ansi deff0{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard lang1033 f0 fs16 n par }
*/[/code]
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
RoyalServer 2
User avatar
Truth*
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 766
Joined: 11 Oct 2013, 11:08
Detinator Steam: Da
SteamID: Ezeru
Reputatie: Fost moderator ajutator
Membru Club eXtreamCS (4 luni)
Nume anterior: HyperioN.
Scripter eXtreamCS
0.2 / 3
Fond eXtream: 0
Location: Sibiu
Has thanked: 44 times
Been thanked: 122 times

07 Jan 2014, 17:49

Poftim :
SMA | Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < cstrike >

#define PLUGIN "Rang Admin Chat Fixed"
#define VERSION "1.0.1"

#pragma semicolon 1

#define   MAX_GROUPS   12 

// --| CC_ColorChat.
enum Color
{
   NORMAL = 1,       // Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
   GREEN,          // Culoare Verde.
   TEAM_COLOR,       // Culoare Rosu, Albastru, Gri.
   GREY,          // Culoarea Gri.
   RED,          // Culoarea Rosu.
   BLUE,          // Culoarea Albastru.
};

new TeamName[  ][  ] = 
{
   "",
   "TERRORIST",
   "CT",
   "SPECTATOR"
};
// --| CC_ColorChat.


new g_szGroups[ MAX_GROUPS ][ ] =
{
   "DETINATOR",
   "OWNER",
   "MODERATOR",
   "ADMINISTRATOR",
   "HELPER",
   "SLOT*",
   "SLOT",
   "VIP-G1",
   "VIP-G2",
   "VIP-G3",
   "VIP-G4",
   "VIP-G5"
   
};

new g_szGroupsFlags[ MAX_GROUPS ][ ] =
{
   "abcdefghijklmnopqrstu",
   "abcdefgijmnopqrs",
   "bcdefijmnopq",
   "bcdefijmno",
   "bcdefijm",
   "bi",
   "b",
   "bci", 
   "bcdei", 
   "bcdefji", 
   "bcdefij", 
   "abcdefghijlmnopqrstu"
};

new g_iGroupsFlagsValues[ MAX_GROUPS ];

public plugin_init( )
{
   //Plugin original creat de Ex3cuTioN ( pluginuri-extream/rangadminchat-t81702.html )!
   register_plugin( PLUGIN, VERSION, "Askhanar" );
   
   
   register_clcmd("say","HookClCmdSay");
   register_clcmd("say_team","HookClCmdSayTeam");
   
   for( new i = 0; i < MAX_GROUPS; i++ )
      g_iGroupsFlagsValues[ i ] = read_flags( g_szGroupsFlags[ i ] );
      
   // Add your code here...
}


public HookClCmdSay( id )
{
   
   if( is_user_bot( id ) )
      return PLUGIN_CONTINUE;
   
   static szChat[ 192 ];
   read_args( szChat, sizeof( szChat ) - 1 );
   remove_quotes( szChat );
   
   if( equali( szChat,"" ) )
      return PLUGIN_CONTINUE;
   
   static szName[ 32 ];
   get_user_name( id, szName, sizeof ( szName ) -1 );
      
   if( is_user_admin( id ) )
   {

      for( new i = 0; i < MAX_GROUPS; i++ )
      {
         
         if( get_user_flags( id ) == g_iGroupsFlagsValues[ i ] )
         {
            
            switch( cs_get_user_team( id ) )
            {
               case CS_TEAM_T:      ColorChat( 0, RED,"^x03[^x04%s^x03] %s^x01: %s", g_szGroups[ i ], szName, szChat );
               case CS_TEAM_CT:   ColorChat( 0, BLUE,"^x03[^x04%s^x03] %s^x01: %s", g_szGroups[ i ], szName, szChat );
               case CS_TEAM_SPECTATOR:   ColorChat( 0, GREY,"^x03[^x04%s^x03] %s^x01: %s", g_szGroups[ i ], szName, szChat );
            }
            
            break;
         }
      }
   }  
   return PLUGIN_HANDLED_MAIN;
}

public HookClCmdSayTeam( id )
{
   
   if( is_user_bot( id ) )
      return PLUGIN_CONTINUE;
   
   static szChat[ 192 ];
   read_args( szChat, sizeof( szChat ) - 1 );
   remove_quotes( szChat );
   
   if( equali( szChat,"" ) )
      return PLUGIN_CONTINUE;
   
   static szName[ 32 ];
   get_user_name( id, szName, sizeof ( szName ) -1 );
   
   static iPlayers[ 32 ];
   static iPlayersNum;
   
   get_players( iPlayers, iPlayersNum, "ch" );
   if( !iPlayersNum )
      return PLUGIN_CONTINUE;
               
   static iPlayer, i;
   iPlayer = -1; i = 0;
   
   if( is_user_admin( id ) )
   {
      static x; x = 0;
      
      for( x = 0; x < MAX_GROUPS; x++ )
      {
         
         if( get_user_flags( id ) == g_iGroupsFlagsValues[ x ] )
         {   
            
            for( i = 0; i < iPlayersNum; i++ )
            {
               
               iPlayer = iPlayers[ i ];
      
               if( cs_get_user_team( id ) == cs_get_user_team( iPlayer ) )
               {
                  switch( cs_get_user_team( id ) )
                  {
                     case CS_TEAM_T:      ColorChat( iPlayer, RED, "^x03[Tero] [^x04%s^x03] %s^x01: %s", g_szGroups[ x ], szName, szChat );
                     case CS_TEAM_CT:   ColorChat( iPlayer, BLUE, "^x03[CT] [^x04%s^x03] %s^x01: %s", g_szGroups[ x ], szName, szChat );
                     case CS_TEAM_SPECTATOR:   ColorChat( iPlayer, GREY, "^x03[Spec] [^x04%s^x03] %s", g_szGroups[ x ], szName, szChat );
                  }
               }
            }
            
            break;
         }
      }
   }
 
   return PLUGIN_HANDLED_MAIN;
}

// From amxmisc.inc
stock is_user_admin( id )
{
   new __flags=get_user_flags(id);
   return (__flags>0 && !(__flags&ADMIN_USER));
}
// -----------------------


// --| CC_ColorChat.
ColorChat(  id, Color:iType, const msg[  ], { Float, Sql, Result, _}:...  )
{
   
   // Daca nu se afla nici un jucator pe server oprim TOT. Altfel dam de erori..
   if( !get_playersnum( ) ) return;
   
   new szMessage[ 256 ];

   switch( iType )
   {
       // Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
      case NORMAL:   szMessage[ 0 ] = 0x01;
      
      // Culoare Verde.
      case GREEN:   szMessage[ 0 ] = 0x04;
      
      // Alb, Rosu, Albastru.
      default:    szMessage[ 0 ] = 0x03;
   }

   vformat(  szMessage[ 1 ], 251, msg, 4  );

   // Ne asiguram ca mesajul nu este mai lung de 192 de caractere.Altfel pica server-ul.
   szMessage[ 192 ] = '^0';
   

   new iTeam, iColorChange, iPlayerIndex, MSG_Type;
   
   if( id )
   {
      MSG_Type  =  MSG_ONE_UNRELIABLE;
      iPlayerIndex  =  id;
   }
   else
   {
      iPlayerIndex  =  CC_FindPlayer(  );
      MSG_Type = MSG_ALL;
   }
   
   iTeam  =  get_user_team( iPlayerIndex );
   iColorChange  =  CC_ColorSelection(  iPlayerIndex,  MSG_Type, iType);

   CC_ShowColorMessage(  iPlayerIndex, MSG_Type, szMessage  );
      
   if(  iColorChange  )   CC_Team_Info(  iPlayerIndex, MSG_Type,  TeamName[ iTeam ]  );

}

CC_ShowColorMessage(  id, const iType, const szMessage[  ]  )
{
   
   static bool:bSayTextUsed;
   static iMsgSayText;
   
   if(  !bSayTextUsed  )
   {
      iMsgSayText  =  get_user_msgid( "SayText" );
      bSayTextUsed  =  true;
   }
   
   message_begin( iType, iMsgSayText, _, id  );
   write_byte(  id  );      
   write_string(  szMessage  );
   message_end(  );
}

CC_Team_Info( id, const iType, const szTeam[  ] )
{
   static bool:bTeamInfoUsed;
   static iMsgTeamInfo;
   if(  !bTeamInfoUsed  )
   {
      iMsgTeamInfo  =  get_user_msgid( "TeamInfo" );
      bTeamInfoUsed  =  true;
   }
   
   message_begin( iType, iMsgTeamInfo, _, id  );
   write_byte(  id  );
   write_string(  szTeam  );
   message_end(  );

   return 1;
}

CC_ColorSelection(  id, const iType, Color:iColorType)
{
   switch(  iColorType  )
   {
      
      case RED:   return CC_Team_Info(  id, iType, TeamName[ 1 ]  );
      case BLUE:   return CC_Team_Info(  id, iType, TeamName[ 2 ]  );
      case GREY:   return CC_Team_Info(  id, iType, TeamName[ 0 ]  );

   }

   return 0;
}

CC_FindPlayer(  )
{
   new iMaxPlayers  =  get_maxplayers(  );
   
   for( new i = 1; i <= iMaxPlayers; i++ )
      if(  is_user_connected( i )  )
         return i;
   
   return -1;
}
// --| CC_ColorChat.
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{ rtf1 ansi deff0{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard lang1033 f0 fs16 n par }
*/
P.S.: Netestat = Nu am avut timp să mă uit atent peste cod. Deci ceea ce am scris este posibil să fie greşit sau să aibă erori.

If i helped you and you wanna thank me, you can donate at this link : here
This will motivate me to help you in the future.
[If you want a private plugin send me a PM.(No complex plugins please, I am a student and I don't have the time to make those)]
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

07 Jan 2014, 18:32

Daca bag pluginu ala nu mai vorbeste nimeni :| doar adminii pot scrie pe chat restu de playerii nu pot .
O rezolvare :-/
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
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

07 Jan 2014, 20:31

Survivor,trebuie adaugat argumentul si la playerii normal si trebuie sa le pui tu prefixul. ( *dead*/*alive* )
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

08 Jan 2014, 14:11

scosmynnnn wrote:Survivor,trebuie adaugat argumentul si la playerii normal si trebuie sa le pui tu prefixul. ( *dead*/*alive* )
Pai daca nu folosesc acest plugin nu apare nimica la playerii ..Eu vreau decat la adminii sa apara tag-uriile.
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
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

09 Jan 2014, 15:03

Cineva?
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
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

10 Jan 2014, 13:53

Sus ma poate ajuta si pe mine cineva :| ...
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
Ulquiorra
Fost moderator
Fost moderator
Posts: 2053
Joined: 25 Jul 2010, 17:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Fost Scripter eXtreamCS
Fost Moderator ajutator
Nick anterior: Askhanar
Location: Braila, Romania.
Has thanked: 215 times
Been thanked: 1132 times

10 Jan 2014, 15:14

deci la admini sa fie exact asa cum e si doar la playeri sa nu mai apara nimic in fata numelui si sa apara direct numele.. fie el mort sau viu ?
Caut o persoana dedicata care se pricepe si stie ce face.
Vreau sa creeze si sa se ocupe de administrarea unui server de MU, da e vorba de vechiul joc..ma gandesc undeva la un season 3 ep1/2.

O sa achizitionez un domeniu .ro.
Totodata sponsorizez absolut orice este necesar.
Ma puteti contacta prin: http://solo.to/stfrzv
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

10 Jan 2014, 15:15

Askhanar wrote:deci la admini sa fie exact asa cum e si doar la playeri sa nu mai apara nimic in fata numelui si sa apara direct numele.. fie el mort sau viu ?
Da man .
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
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

10 Jan 2014, 15:27

| Afiseaza codul
#include <amxmodx>

public plugin_init()
{
	register_plugin("Tag","1.0","C0sm1N");
	register_clcmd("say","cmdSay");
	register_clcmd("say_team","cmdSay");
}
public cmdSay(id)
{
	new szSaid[192],szName[35];
	
	read_args( szSaid, sizeof( szSaid ) -1 )
	
	get_user_name(id, szName, 34)
	
	remove_quotes( szSaid )

	if(is_user_alive(id))
	{
		color(0, "!team %s :!y %s",szName,szSaid)
		return 1
	}
	else
	{
		color(0, "!team %s :!y %s",szName,szSaid)
		return 1
	}
	return 1;
}
stock color(const id, const input[], any:...)
{
    new count = 1, players[32]
    static msg[191]
    vformat(msg, 190, input, 3)
    
    replace_all(msg, 190, "!g", "^4")
    replace_all(msg, 190, "!y", "^1")
    replace_all(msg, 190, "!team", "^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();
            }
        }
    }
}

Asta vrei tu defapt ?
trebuie pus primu'l in lista ca sa mearga (banuiesc) .
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

10 Jan 2014, 15:38

Nu cosmin,eu vreau acel plugin :| doar ca sa fie tagurii doar pentru adminii si la jucatorii sa fie normal.
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
Ulquiorra
Fost moderator
Fost moderator
Posts: 2053
Joined: 25 Jul 2010, 17:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Fost Scripter eXtreamCS
Fost Moderator ajutator
Nick anterior: Askhanar
Location: Braila, Romania.
Has thanked: 215 times
Been thanked: 1132 times

10 Jan 2014, 17:09

Try..
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < cstrike >

#define PLUGIN "Rang Admin Chat Fixed"
#define VERSION "1.0.1"

#pragma semicolon 1

#define	MAX_GROUPS	12


// --| CC_ColorChat.
enum Color
{
	NORMAL = 1, 		// Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
	GREEN, 			// Culoare Verde.
	TEAM_COLOR, 		// Culoare Rosu, Albastru, Gri.
	GREY, 			// Culoarea Gri.
	RED, 			// Culoarea Rosu.
	BLUE, 			// Culoarea Albastru.
};

new TeamName[  ][  ] = 
{
	"",
	"TERRORIST",
	"CT",
	"SPECTATOR"
};
// --| CC_ColorChat.


new g_szGroups[ MAX_GROUPS ][ ] =
{
	"DETINATOR",
	"OWNER",
	"MODERATOR",
	"ADMINISTRATOR",
	"HELPER",
	"SLOT*",
	"SLOT",
	"VIP-G1",
	"VIP-G2",
	"VIP-G3",
	"VIP-G4",
	"VIP-G5"

};

new g_szGroupsFlags[ MAX_GROUPS ][ ] =
{
	"abcdefghijklmnopqrstu",
	"abcdefgijmnopqrs",
	"bcdefijmnopq",
	"bcdefijmno",
	"bcdefijm",
	"bi",
	"b",
	"bci", 
	"bcdei", 
	"bcdefji", 
	"bcdefij", 
	"abcdefghijlmnopqrstu"
};

new g_iGroupsFlagsValues[ MAX_GROUPS ];

public plugin_init( )
{
	//Plugin original creat de Ex3cuTioN ( http://www.extreamcs.com/forum/pluginur ... 81702.html )!
	register_plugin( PLUGIN, VERSION, "Askhanar" );
	
	
	register_clcmd("say","HookClCmdSay");
	register_clcmd("say_team","HookClCmdSayTeam");
	
	for( new i = 0; i < MAX_GROUPS; i++ )
		g_iGroupsFlagsValues[ i ] = read_flags( g_szGroupsFlags[ i ] );
		
	// Add your code here...
}


public HookClCmdSay( id )
{
	
	if( is_user_bot( id ) )
		return PLUGIN_CONTINUE;
	
	static szChat[ 192 ];
	read_args( szChat, sizeof( szChat ) - 1 );
	remove_quotes( szChat );
	
	if( equali( szChat,"" ) )
		return PLUGIN_CONTINUE;
	
	static szName[ 32 ];
	get_user_name( id, szName, sizeof ( szName ) -1 );
		
	if( is_user_admin( id ) )
	{

		for( new i = 0; i < MAX_GROUPS; i++ )
		{
			
			if( get_user_flags( id ) == g_iGroupsFlagsValues[ i ] )
			{
				
				switch( cs_get_user_team( id ) )
				{
					case CS_TEAM_T:		ColorChat( 0, RED,"^x04[%s]^x03 %s^x01: %s", g_szGroups[ i ], szName, szChat );
					case CS_TEAM_CT:	ColorChat( 0, BLUE,"^x04[%s]^x03 %s^x01: %s", g_szGroups[ i ], szName, szChat );
					case CS_TEAM_SPECTATOR:	ColorChat( 0, GREY,"^x04[%s]^x03 %s^x01: %s", g_szGroups[ i ], szName, szChat );
				}
				
				break;
			}
		}
	}
	
	else
	{
		
		switch( cs_get_user_team( id ) )
		{
			case CS_TEAM_T:		ColorChat( 0, RED,"^x03 %s^x01: %s", szName, szChat );
			case CS_TEAM_CT:	ColorChat( 0, BLUE,"^x03 %s^x01: %s", szName, szChat );
			case CS_TEAM_SPECTATOR:	ColorChat( 0, GREY,"^x03 %s^x01: %s", szName, szChat );
		}
		
	}
	
	
	return PLUGIN_HANDLED_MAIN;
}

public HookClCmdSayTeam( id )
{
	
	if( is_user_bot( id ) )
		return PLUGIN_CONTINUE;
	
	static szChat[ 192 ];
	read_args( szChat, sizeof( szChat ) - 1 );
	remove_quotes( szChat );
	
	if( equali( szChat,"" ) )
		return PLUGIN_CONTINUE;
	
	static szName[ 32 ];
	get_user_name( id, szName, sizeof ( szName ) -1 );
	
	static iPlayers[ 32 ];
	static iPlayersNum;
	
	get_players( iPlayers, iPlayersNum, "ch" );
	if( !iPlayersNum )
		return PLUGIN_CONTINUE;
					
	static iPlayer, i;
	iPlayer = -1; i = 0;
	
	if( is_user_admin( id ) )
	{
		static x; x = 0;
		
		for( x = 0; x < MAX_GROUPS; x++ )
		{
			
			if( get_user_flags( id ) == g_iGroupsFlagsValues[ x ] )
			{	
				
				for( i = 0; i < iPlayersNum; i++ )
				{
					
					iPlayer = iPlayers[ i ];
		
					if( cs_get_user_team( id ) == cs_get_user_team( iPlayer ) )
					{
						switch( cs_get_user_team( id ) )
						{
							case CS_TEAM_T:		ColorChat( iPlayer, RED, "^x04[%s] ^x03(Terrorist) %s^x01: %s", g_szGroups[ x ], szName, szChat );
							case CS_TEAM_CT:	ColorChat( iPlayer, BLUE, "^x04[%s] ^x03(Counter-Terrorist) %s^x01: %s", g_szGroups[ x ], szName, szChat );
							case CS_TEAM_SPECTATOR:	ColorChat( iPlayer, GREY, "^x04[%s] ^x03(Spectator) %s^x01: %s", g_szGroups[ x ], szName, szChat );
						}
					}
				}
				
				break;
			}
		}
	}
	
	else
	{
			
		for( i = 0; i < iPlayersNum; i++ )
		{
			
			iPlayer = iPlayers[ i ];

			if( cs_get_user_team( id ) == cs_get_user_team( iPlayer ) )
			{
				switch( cs_get_user_team( id ) )
				{
					case CS_TEAM_T:		ColorChat( iPlayer, RED, "^x03(Terrorist)%%s^x01: %s", szName, szChat );
					case CS_TEAM_CT:	ColorChat( iPlayer, BLUE, "^x03(Counter-Terrorist)%%s^x01: %s", szName, szChat );
					case CS_TEAM_SPECTATOR:	ColorChat( iPlayer, GREY, "^x03(Spectator) %s^x01: %s", szName, szChat );
				}
			}
		}
	}
				
	return PLUGIN_HANDLED_MAIN;
}

// From amxmisc.inc
stock is_user_admin( id )
{
	new __flags=get_user_flags(id);
	return (__flags>0 && !(__flags&ADMIN_USER));
}
// -----------------------


// --| CC_ColorChat.
ColorChat(  id, Color:iType, const msg[  ], { Float, Sql, Result, _}:...  )
{
	
	// Daca nu se afla nici un jucator pe server oprim TOT. Altfel dam de erori..
	if( !get_playersnum( ) ) return;
	
	new szMessage[ 256 ];

	switch( iType )
	{
		 // Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
		case NORMAL:	szMessage[ 0 ] = 0x01;
		
		// Culoare Verde.
		case GREEN:	szMessage[ 0 ] = 0x04;
		
		// Alb, Rosu, Albastru.
		default: 	szMessage[ 0 ] = 0x03;
	}

	vformat(  szMessage[ 1 ], 251, msg, 4  );

	// Ne asiguram ca mesajul nu este mai lung de 192 de caractere.Altfel pica server-ul.
	szMessage[ 192 ] = '^0';
	

	new iTeam, iColorChange, iPlayerIndex, MSG_Type;
	
	if( id )
	{
		MSG_Type  =  MSG_ONE_UNRELIABLE;
		iPlayerIndex  =  id;
	}
	else
	{
		iPlayerIndex  =  CC_FindPlayer(  );
		MSG_Type = MSG_ALL;
	}
	
	iTeam  =  get_user_team( iPlayerIndex );
	iColorChange  =  CC_ColorSelection(  iPlayerIndex,  MSG_Type, iType);

	CC_ShowColorMessage(  iPlayerIndex, MSG_Type, szMessage  );
		
	if(  iColorChange  )	CC_Team_Info(  iPlayerIndex, MSG_Type,  TeamName[ iTeam ]  );

}

CC_ShowColorMessage(  id, const iType, const szMessage[  ]  )
{
	
	static bool:bSayTextUsed;
	static iMsgSayText;
	
	if(  !bSayTextUsed  )
	{
		iMsgSayText  =  get_user_msgid( "SayText" );
		bSayTextUsed  =  true;
	}
	
	message_begin( iType, iMsgSayText, _, id  );
	write_byte(  id  );		
	write_string(  szMessage  );
	message_end(  );
}

CC_Team_Info( id, const iType, const szTeam[  ] )
{
	static bool:bTeamInfoUsed;
	static iMsgTeamInfo;
	if(  !bTeamInfoUsed  )
	{
		iMsgTeamInfo  =  get_user_msgid( "TeamInfo" );
		bTeamInfoUsed  =  true;
	}
	
	message_begin( iType, iMsgTeamInfo, _, id  );
	write_byte(  id  );
	write_string(  szTeam  );
	message_end(  );

	return 1;
}

CC_ColorSelection(  id, const iType, Color:iColorType)
{
	switch(  iColorType  )
	{
		
		case RED:	return CC_Team_Info(  id, iType, TeamName[ 1 ]  );
		case BLUE:	return CC_Team_Info(  id, iType, TeamName[ 2 ]  );
		case GREY:	return CC_Team_Info(  id, iType, TeamName[ 0 ]  );

	}

	return 0;
}

CC_FindPlayer(  )
{
	new iMaxPlayers  =  get_maxplayers(  );
	
	for( new i = 1; i <= iMaxPlayers; i++ )
		if(  is_user_connected( i )  )
			return i;
	
	return -1;
}
// --| CC_ColorChat.
Caut o persoana dedicata care se pricepe si stie ce face.
Vreau sa creeze si sa se ocupe de administrarea unui server de MU, da e vorba de vechiul joc..ma gandesc undeva la un season 3 ep1/2.

O sa achizitionez un domeniu .ro.
Totodata sponsorizez absolut orice este necesar.
Ma puteti contacta prin: http://solo.to/stfrzv
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 21 guests