Player_transfer

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
mast3rwap
Membru, skill +1
Membru, skill +1
Posts: 324
Joined: 11 Feb 2012, 21:32
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: da
SteamID: berlo1990
Location: italia
Has thanked: 30 times
Been thanked: 5 times
Contact:

31 Dec 2013, 01:28

Salut,am urmatorul cod:
| Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < cstrike >

#define PLUGIN "Transfer T/CT/SPEC"
#define VERSION "1.0"
#define AUTHOR "UspStyLe"
#define TAG	"TRANSFER"

public plugin_init ( ) {
    register_plugin ( PLUGIN, VERSION, AUTHOR );
    register_concmd ( "amx_t", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Teroristi" );
    register_concmd ( "amx_ct", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Counter-Teroristi" );
    register_concmd ( "amx_spec", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Spectatori" );
}

public swap_team ( id, level, cid ) {
    if( ! cmd_access ( id, level, cid, 2 ) )
        return PLUGIN_HANDLED;
    
    new szArg[ 10 ], target[ 32 ], szPlayerName[ 32 ], szAdminName[ 32 ];
    
    read_argv( 0, szArg, 9 );
    read_argv( 1, target, 31 );
    
    new player = cmd_target ( id, target, 11 );
    
    if( ! player ) 
        return PLUGIN_HANDLED;
    
    get_user_name ( player, szPlayerName, 31 );
    get_user_name ( id, szAdminName, 31 );
    
    switch ( szArg[ 4 ] ) {
        case 't': 
        {
            user_silentkill ( player );
            cs_set_user_team ( player, 1 );
			xColor ( id, "!nAdmin !t[!g%s!t]!n transfera pe !t[!g%s!t]!n la echipa !t[!gT!t]!n.", szAdminName, szPlayerName );
        }
        
        
        case 'c': 
        {
            user_silentkill ( player );
            cs_set_user_team ( player, 2 );
			xColor ( id, "!nAdmin !t[!g%s!t]!n transfera pe !t[!g%s!t]!n la echipa !t[!gCT!t]!n.", szAdminName, szPlayerName );
        }
        
        case 's': 
        {
            user_silentkill ( player );
            cs_set_user_team ( player, 3 );
			xColor ( id, "!nAdmin !t[!g%s!t]!n transfera pe !t[!g%s!t]!n la !t[!gSPEC!t]!n.", szAdminName, szPlayerName );
        }
        
    }
    
    return PLUGIN_CONTINUE;
}
 stock xColor(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[320], msg2[320]
	vformat(msg, 190, input, 3)
	format(msg2, 190, "^3[^4%s^3] %s",TAG,msg)
	replace_all(msg2, 190, "!g", "^4")
	replace_all(msg2, 190, "!n", "^1")
	replace_all(msg2, 190, "!t", "^3")
	replace_all(msg2, 190, "!t2", "^0")
	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(msg2)
			message_end()
		}
	}
}


As dori sa ii adaugati si comenzile in chat pentru admini gen : /ct nume /t nume /spec nume
mersi
Rapidserver
Loupu.
Membru, skill 0
Membru, skill 0
Posts: 12
Joined: 12 Aug 2013, 11:06
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 3 times
Contact:

31 Dec 2013, 01:51

Incearca asta :
| Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < cstrike >

#define PLUGIN "Transfer T/CT/SPEC"
#define VERSION "1.0"
#define AUTHOR "UspStyLe"
#define TAG	"TRANSFER"

public plugin_init ( ) {
    register_plugin ( PLUGIN, VERSION, AUTHOR );
    register_concmd ( "amx_t", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Teroristi" );
    register_concmd ( "amx_ct", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Counter-Teroristi" );
    register_concmd ( "amx_spec", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Spectatori" );
    register_clcmd ( "/t", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Teroristi" );
    register_clcmd ( "/ct", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Counter-Teroristi" );
    register_clcmd ( "/spec", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Spectatori" );
}

public swap_team ( id, level, cid ) {
    if( ! cmd_access ( id, level, cid, 2 ) )
        return PLUGIN_HANDLED;
    
    new szArg[ 10 ], target[ 32 ], szPlayerName[ 32 ], szAdminName[ 32 ];
    
    read_argv( 0, szArg, 9 );
    read_argv( 1, target, 31 );
    
    new player = cmd_target ( id, target, 11 );
    
    if( ! player ) 
        return PLUGIN_HANDLED;
    
    get_user_name ( player, szPlayerName, 31 );
    get_user_name ( id, szAdminName, 31 );
    
    switch ( szArg[ 4 ] ) {
        case 't': 
        {
            user_silentkill ( player );
            cs_set_user_team ( player, 1 );
			xColor ( id, "!nAdmin !t[!g%s!t]!n transfera pe !t[!g%s!t]!n la echipa !t[!gT!t]!n.", szAdminName, szPlayerName );
        }
        
        
        case 'c': 
        {
            user_silentkill ( player );
            cs_set_user_team ( player, 2 );
			xColor ( id, "!nAdmin !t[!g%s!t]!n transfera pe !t[!g%s!t]!n la echipa !t[!gCT!t]!n.", szAdminName, szPlayerName );
        }
        
        case 's': 
        {
            user_silentkill ( player );
            cs_set_user_team ( player, 3 );
			xColor ( id, "!nAdmin !t[!g%s!t]!n transfera pe !t[!g%s!t]!n la !t[!gSPEC!t]!n.", szAdminName, szPlayerName );
        }
        
    }
    
    return PLUGIN_CONTINUE;
}
 stock xColor(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[320], msg2[320]
	vformat(msg, 190, input, 3)
	format(msg2, 190, "^3[^4%s^3] %s",TAG,msg)
	replace_all(msg2, 190, "!g", "^4")
	replace_all(msg2, 190, "!n", "^1")
	replace_all(msg2, 190, "!t", "^3")
	replace_all(msg2, 190, "!t2", "^0")
	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(msg2)
			message_end()
		}
	}
}


Apropo , ai un server pe linux unde pot testa un plugin?
mast3rwap
Membru, skill +1
Membru, skill +1
Posts: 324
Joined: 11 Feb 2012, 21:32
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: da
SteamID: berlo1990
Location: italia
Has thanked: 30 times
Been thanked: 5 times
Contact:

31 Dec 2013, 13:54

Nu merg comenzile in chat,doar in consola,nu am server
Loupu.
Membru, skill 0
Membru, skill 0
Posts: 12
Joined: 12 Aug 2013, 11:06
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 3 times
Contact:

31 Dec 2013, 14:35

http://fbx.ro/oizar0p70mshbkge
Incearca asta , l-am modificat eu putin , dar trebuie sa mearga, testat!
mast3rwap
Membru, skill +1
Membru, skill +1
Posts: 324
Joined: 11 Feb 2012, 21:32
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: da
SteamID: berlo1990
Location: italia
Has thanked: 30 times
Been thanked: 5 times
Contact:

01 Jan 2014, 14:31

Pune pe alt site de upload,nu pot descarca de acolo
User avatar
pcpalex
Membru, skill 0
Membru, skill 0
Posts: 39
Joined: 12 Aug 2011, 17:31
Detinator Steam: Da
CS Status: Help the Needy
Detinator server CS: Da
Been thanked: 4 times
Contact:

04 Jan 2014, 23:49

Daca nu gasesti un raspuns care sa te multumeasca ,poti face o cerere aici , te ajut cu cea mai mare placere.
Last edited by h4wk on 05 Jan 2014, 10:45, edited 1 time in total.
Reason: Ai primit avertisment pentru reclama !
ieVen
Membru, skill 0
Membru, skill 0
Posts: 4
Joined: 01 Jan 2014, 02:44
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

06 Jan 2014, 14:55

revin cu edit
User avatar
h4wk
Fost moderator
Fost moderator
Posts: 3806
Joined: 22 Sep 2009, 12:10
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Nume anterior : DaZ , zimpe , Dan eXtream
Location: Iasi
Has thanked: 305 times
Been thanked: 320 times
Contact:

09 Jan 2014, 14:55

Mutat @Modificari pluginuri

PS :[/b] Postati in categoria potrivita - "Modificari necesare ale pluginurilor".

Code: Select all

"Daca ai culoare nu inseamna ca esti mai presus ca un utilizator. Culoare e un fel de "rasplata" pentru ca te implici in "ridicarea" acestei comunitati.
Unii nu realizeaza ca daca ai culoare nu inseamna ca esti smecher." -- by Alexey
:troll :troll

Spui ceva,dar faci altceva !
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests