[Cerere]Restrictie Mesaje

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 .
TrrrQ
Fost moderator
Fost moderator
Posts: 2594
Joined: 04 Feb 2013, 00:31
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (3 luni)
Restrictie moderator!
Unban achitat (x2)
Fost moderator
Fond eXtream: 8
Has thanked: 135 times
Been thanked: 67 times
Contact:

07 Apr 2013, 02:54

pff..acum am vazut
l-am pus pe server ca pana acum era pe windows
am intrat pe server si apare ca in poza de mai sus
si am pus pe cineva sa dea retry si a scris pe chat,s-a vazut
Filme Online HD subtitrate fără reclame automate: https://filmeonline-hd.com
Prezentarea site-ului: https://www.youtube.com/watch?v=k4K3tgEkYjw
RoyalServer 2
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

07 Apr 2013, 16:45

ia vezi acum :)
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "Block Chat"
#define VERSION "1.0"


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

// --| Tag-ul mesajului din chat.
new const g_szTag[ ] = "[Tag Mesaj]";
// --| ---------------------------------

// --| Cate secunde este blocat chat`ul.
new Float:g_fBlockedSeconds = 21.0;
// --| ---------------------------------

// --| De aici e treaba mea :D.
new Float:g_fGameTime[ 33 ];

public plugin_init( )
{
	register_plugin( PLUGIN, VERSION, "Askhanar" );
	
	register_clcmd( "say","ClCmdSayOrSayTeam" );
	register_clcmd( "say_team","ClCmdSayOrSayTeam" );
	
	// Add your code here...
}

public client_connect( id )	g_fGameTime[ id ] = get_gametime( ) + g_fBlockedSeconds;
public client_disconnect( id ) 	g_fGameTime[ id ] = 0.0;

public ClCmdSayOrSayTeam( id )
{
	static Float:fGameTime;
	fGameTime = get_gametime( );
	
	if( g_fGameTime[ id ] > fGameTime )
	{
		
		ColorChat( id, RED, "^x04%s^x01 Doar ce te-ai conectat pe server, asteapta^x03 %.1f^x01 secunde !", g_szTag, g_fGameTime[ id ] - fGameTime );
		return PLUGIN_HANDLED;
	}
	
	return PLUGIN_CONTINUE;
	
}

// --| 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
TrrrQ
Fost moderator
Fost moderator
Posts: 2594
Joined: 04 Feb 2013, 00:31
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (3 luni)
Restrictie moderator!
Unban achitat (x2)
Fost moderator
Fond eXtream: 8
Has thanked: 135 times
Been thanked: 67 times
Contact:

07 Apr 2013, 20:00

nici acum
e la fel
Filme Online HD subtitrate fără reclame automate: https://filmeonline-hd.com
Prezentarea site-ului: https://www.youtube.com/watch?v=k4K3tgEkYjw
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

08 Apr 2013, 19:47

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

#include <amxmodx>

#define PLUGIN "Block Chat"
#define VERSION "1.0"


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

// --| Tag-ul mesajului din chat.
new const g_szTag[ ] = "[Tag Mesaj]";
// --| ---------------------------------

// --| Cate secunde este blocat chat`ul.
new Float:g_fBlockedSeconds = 21.0;
// --| ---------------------------------

// --| De aici e treaba mea :D.
new Float:g_fGameTime[ 33 ];

public plugin_init( )
{
	register_plugin( PLUGIN, VERSION, "Askhanar" );
	
	register_clcmd( "say","ClCmdSayOrSayTeam" );
	register_clcmd( "say_team","ClCmdSayOrSayTeam" );
	
	// Add your code here...
}

public client_connect( id )	g_fGameTime[ id ] = get_gametime( ) + g_fBlockedSeconds;
public client_disconnect( id ) 	g_fGameTime[ id ] = 0.0;

public ClCmdSayOrSayTeam( id )
{
	static Float:fGameTime;
	fGameTime = get_gametime( );
	
	if( g_fGameTime[ id ] > fGameTime )
	{
		
		ColorChat( id, RED, "^x04%s^x01 Doar ce te-ai conectat pe server, asteapta^x03 %.1f^x01 secunde !", g_szTag, g_fGameTime[ id ] - fGameTime );
		return PLUGIN_HANDLED;
	}
	
	return PLUGIN_CONTINUE;
	
}

// --| 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.
pune`l deasuprea plugin`ului de rang admin chat.
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
TrrrQ
Fost moderator
Fost moderator
Posts: 2594
Joined: 04 Feb 2013, 00:31
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (3 luni)
Restrictie moderator!
Unban achitat (x2)
Fost moderator
Fond eXtream: 8
Has thanked: 135 times
Been thanked: 67 times
Contact:

08 Apr 2013, 20:04

merge :X
mersi :*
Filme Online HD subtitrate fără reclame automate: https://filmeonline-hd.com
Prezentarea site-ului: https://www.youtube.com/watch?v=k4K3tgEkYjw
TrrrQ
Fost moderator
Fost moderator
Posts: 2594
Joined: 04 Feb 2013, 00:31
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (3 luni)
Restrictie moderator!
Unban achitat (x2)
Fost moderator
Fond eXtream: 8
Has thanked: 135 times
Been thanked: 67 times
Contact:

13 Apr 2013, 00:35

TrrrQ wrote: Iar atunci cand da voie sa scrie,sa poata trimite mesaje in chat o data la 2 secunde.Dupa ce a scris ceva in chat si a mai scris iar in primele 2 secunde sa i apara:
Culoare TEAM: Asteapta x secunde pentru a putea scrie din nou
Filme Online HD subtitrate fără reclame automate: https://filmeonline-hd.com
Prezentarea site-ului: https://www.youtube.com/watch?v=k4K3tgEkYjw
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

14 Apr 2013, 02:13

ti-l fac maine..
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
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

14 Apr 2013, 21:23

scuze de dublu post. nu merge edit :-s
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "Block Chat"
#define VERSION "1.0"


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

// --| Tag-ul mesajului din chat.
new const g_szTag[ ] = "[Tag Mesaj]";
// --| ---------------------------------

// --| Cate secunde este blocat chat`ul.
new const Float:g_fNoFloodSeconds = 2.0;
// --| ---------------------------------

// --| Cate secunde este blocat chat`ul ( x secunde de la conectare ).
new const Float:g_fBlockedSeconds = 21.0;
// --| ---------------------------------

// --| De aici e treaba mea :D.
new Float:g_fGameTime[ 33 ];
new Float:g_fGameTimeSecond[ 33 ];

public plugin_init( )
{
	register_plugin( PLUGIN, VERSION, "Askhanar" );
	
	register_clcmd( "say","ClCmdSayOrSayTeam" );
	register_clcmd( "say_team","ClCmdSayOrSayTeam" );
	
	// Add your code here...
}

public client_connect( id )
{
	g_fGameTime[ id ] = get_gametime( ) + g_fBlockedSeconds;
	g_fGameTimeSecond[ id ] = 0.0;
}

public client_disconnect( id )
{
	g_fGameTime[ id ] = 0.0;
	g_fGameTimeSecond[ id ] = 0.0;
}

public ClCmdSayOrSayTeam( id )
{
	static Float:fGameTime;
	fGameTime = get_gametime( );
	
	if( g_fGameTime[ id ] > fGameTime )
	{
		
		ColorChat( id, RED, "^x04%s^x01 Doar ce te-ai conectat pe server, asteapta^x03 %.1f^x01 secunde !", g_szTag, g_fGameTime[ id ] - fGameTime );
		return PLUGIN_HANDLED;
	}
	else if( g_fGameTimeSecond[ id ] > fGameTime )
	{
		ColorChat( id, RED, "^x04%s^x01 Asteapta^x03 %.1f^x01 secunde pentru a putea scrie din nou !", g_szTag, g_fGameTimeSecond[ id ] - fGameTime );
		return PLUGIN_HANDLED;
	}
	
	g_fGameTimeSecond[ id ] = fGameTime + g_fNoFloodSeconds;
	
	return PLUGIN_CONTINUE;
	
}

// --| 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
TrrrQ
Fost moderator
Fost moderator
Posts: 2594
Joined: 04 Feb 2013, 00:31
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (3 luni)
Restrictie moderator!
Unban achitat (x2)
Fost moderator
Fond eXtream: 8
Has thanked: 135 times
Been thanked: 67 times
Contact:

14 Apr 2013, 22:02

merge :X
te pup :* :)) :))
Mersi Mult!
Filme Online HD subtitrate fără reclame automate: https://filmeonline-hd.com
Prezentarea site-ului: https://www.youtube.com/watch?v=k4K3tgEkYjw
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests