[AMXX] Chat Redirect 3.0

Pluginuri pentru modul AmxModX.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
C.Artur
Fost moderator
Fost moderator
Posts: 7386
Joined: 04 Oct 2013, 13:32
Detinator Steam: Da
Reputatie: Fost Super Moderator
Location: Cluj Napoca
Has thanked: 137 times
Been thanked: 99 times
Contact:

14 Dec 2013, 13:40

Nume: CHAT REDIRECT
Versiune: 3.0
Autor: xs1der

DOWNLOAD


Descriere:
Cu ajutorul acestui plugin va puteti redirectiona dupa un server pe altul printr-o simpla comanda de chat (ex: /cs)


Code: Select all

/* AMX MOD X 1.8.1 PLUGIN

      NAME: CHAT REDIRECT
      Author: xs1der

      Changelog:
           1.0 - first release
	   1.1 - some bug fixed (mut2nt)
	   1.2 - added "new const Prefix[]"
	   1.3 - rewrite plugin
	   1.4 - added two more server slots (mut2nt)
	   1.5 - added console print function
	   1.6-2.9a - major bugs fixed
	   2.9b - added 4 more server slots
	   3.0 - script rewrited (thanks Askhanar)

*/

Instalare:[/b]

Se instaleaza ca orice alt plugin,in sma modificati IP-urile si SERVERELE,apoi compilati si il adaugati pe server , good luck !
new server1[ ] = "cs.agamers.ro:27015"
new server2[ ] = "sud.agamers.ro:27015"
[/code]

2. Pentru fiecare functie "new server" exista un public denumit server1,2,3 etc. asa pentru fiecare in parte pana la 7.
Sa dam exemplu publicul pentru functia "new server1":

Cautati in SMA liniile:

Code: Select all

public Server1( id )
{
new name[32];
get_user_name( id, name, 31 );

client_print( 0, print_chat, "[CHAT REDIRECT] %s s-a redirectionat pe %s prin comanda /cs", name, server1 );

console_print( id, "Ai fost redirectionat pe serverul Counter-Strike" )
Aici editati mesajele daca doriti,asa pentru fiecare server in parte. :)

3. Selectarea comenzilor.

La inceputul pluginului observati register_clcmd:

Code: Select all

 register_clcmd( "say /cs", "Server1", 0 )
register_clcmd( "say_team /cs" , "Server1", 0 )

register_clcmd( "say /respawn" , "Server2", 0 )
register_clcmd( "say_team /respawn" , "Server2", 0 )

register_clcmd( "say /bb", "Server3", 0 )
register_clcmd( "say_team /bb" , "Server3", 0 )

     register_clcmd( "say /hns", "Server4", 0 )
     register_clcmd( "say_team /hns", "Server4", 0 )

     register_clcmd( "say /uw3", "Server5", 0 )
     register_clcmd( "say_team /uw3" , "Server5", 0 )

     register_clcmd( "say /pb", "Server6", 0 )
     register_clcmd( "say_team /pb" , "Server6", 0 )

     register_clcmd( "say /War3", "Server7", 0 )
     register_clcmd( "say_team /war3" , "Server7", 0 )
Fiecare comanda este asociala cu serverul care urmeaza dupa ea,adica pentru /cs , exista "Server1"
ATENTIE!!! Aici editati doar comanda !
- Pentru necunoscatori: Comenzile sunt acelea cu "say" in fata,adica "/cs","/bb","/respawn" etc.,le puteti schimba dupa bunul plac :)

4. Compilati pluginul si adaugati-l pe server ! Good Luck !

DOWNLOAD
Rapidserver
greehh
Membru, skill 0
Membru, skill 0
Posts: 85
Joined: 13 Oct 2012, 04:11
Detinator Steam: Da
Detinator server CS: cs.1tap.ro
SteamID: greeSpot
Location: Calarasi
Has thanked: 9 times
Been thanked: 6 times
Contact:

19 Dec 2013, 10:32

chat_redirect.sma(72) : error 017: undefined symbol "SERVER_NUM"
chat_redirect.sma(79) : error 001: expected token: ",", but found "-string-"
chat_redirect.sma(79) : warning 215: expression has no effect
chat_redirect.sma(79) : warning 215: expression has no effect
chat_redirect.sma(79) : warning 215: expression has no effect
chat_redirect.sma(79) : warning 215: expression has no effect
chat_redirect.sma(79) : warning 215: expression has no effect
chat_redirect.sma(79) : error 001: expected token: ";", but found ")"
chat_redirect.sma(79) : error 029: invalid expression, assumed zero
chat_redirect.sma(79) : fatal error 107: too many error messages on one line

Compilation aborted.
5 Errors.
Done.
cs.1tap.ro
Incepe si tu sa joci pe unul dintre cele mai bune servere de Counter-Strike 1.6 din Romania.
LordOfNothing
Membru, skill +1
Membru, skill +1
Posts: 387
Joined: 19 Jul 2013, 14:51
Detinator Steam: Nu
Reputatie: Restrictie PM
Has thanked: 11 times
Been thanked: 34 times

19 Dec 2013, 10:50

greehh wrote:chat_redirect.sma(72) : error 017: undefined symbol "SERVER_NUM"
chat_redirect.sma(79) : error 001: expected token: ",", but found "-string-"
chat_redirect.sma(79) : warning 215: expression has no effect
chat_redirect.sma(79) : warning 215: expression has no effect
chat_redirect.sma(79) : warning 215: expression has no effect
chat_redirect.sma(79) : warning 215: expression has no effect
chat_redirect.sma(79) : warning 215: expression has no effect
chat_redirect.sma(79) : error 001: expected token: ";", but found ")"
chat_redirect.sma(79) : error 029: invalid expression, assumed zero
chat_redirect.sma(79) : fatal error 107: too many error messages on one line

Compilation aborted.
5 Errors.
Done.
l-am reparat eu dar nul recomand sal folositi e o prostie
sma | Afiseaza codul
/* AMX MOD X 1.8.1 PLUGIN

      NAME: CHAT REDIRECT
      Author: xs1der

      Changelog:
           1.0 - first release
	   1.1 - some bug fixed (mut2nt)
	   1.2 - added "new const Prefix[]"
	   1.3 - rewrite plugin
	   1.4 - added two more server slots (mut2nt)
	   1.5 - added console print function
	   1.6-2.9a - major bugs fixed
	   2.9b - added 4 more server slots
	   3.0 - plugin rewrited (thanks Askhanar)

*/


#include < amxmodx >

#define SERVERS_NUM 10

enum
{
	SERVER_IP = 0,
	SERVER_NAME,
	SERVER_CMD,
	
	SERVERS
};

new g_szServers[ SERVERS_NUM ][ SERVERS ][]=
{
	{"IP1:27015","Nume Server1","/cs"},
	{"IP2:27015","Nume Server2","/respawn"},
	{"IP3:27015","Nume Server3","/pub"},
	{"IP4:27015","Nume Server4","/war3"},
	{"IP5:27015","Nume Server5","/hns"},
	{"IP6:27015","Nume Server6","/dr"},
	{"IP7:27015","Nume Server7","/pb"},
	{"IP8:27015","Nume Server8","/furien"},
	{"IP9:27015","Nume Server9","/surf"},
	{"IP10:27015","Nume Server10","/soccerjam"}
};
	


new const Prefix[] = "[CHAT REDIRECT]";



public plugin_init( )
{
        register_plugin("CHAT REDIRECT", "3.0", "xs1der");
	
        register_clcmd("say","ClCmdSayOrSayTeam");
        register_clcmd("say_team","ClCmdSayOrSayTeam");
}

public ClCmdSayOrSayTeam( id )
{
	static szArgs[192 ];
	read_args( szArgs , sizeof ( szArgs ) -1 )
	
	if(!szArgs[ 0 ] || szArgs[ 0] != '/')
	return PLUGIN_CONTINUE;
	
	remove_quotes( szArgs )
	//trim( szArgs);
	
	for( new i = 0; i < SERVERS_NUM;i++ )
	{
		if(equal( szArgs, g_szServers[ i ] [ SERVER_CMD ] , strlen( g_szServers[ i ] [ SERVER_CMD ] )))
		{
			static szName[ 32 ];
			get_user_name(id,szName,sizeof ( szName ) -1);
			
			client_print(0,print_chat, "%s %s s-a redirectionat pe %s prin comanda %s", Prefix,szName,g_szServers[ i ][ SERVER_NAME ], g_szServers[ i ][ SERVER_CMD ] );
			client_cmd(id, "echo Ai fost redirectionat catre %s !", g_szServers[ i ][ SERVER_NAME ] );
			client_cmd(id, "Connect ^"%s^"", g_szServers [ i ][ SERVER_IP ] );
			break;
		}
	}
	
	return PLUGIN_CONTINUE;
}
Post Reply

Return to “AmxModX”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests