[Rezolvat] Cerere plugin: MakeTeams.

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
roberteeel
Membru eXtream
Membru eXtream
Posts: 4446
Joined: 05 Sep 2012, 10:39
Detinator Steam: Nu
Reputatie: Nick anterior: QAZW, Robert.ultrasFarul, CT 18 ROS
Restrictie schimbare nume
Fost moderator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 312 times
Been thanked: 359 times

16 Feb 2014, 19:31

Nickname: QAZW.
Numele pluginului cerut: MakeTeams.
Descriere plugin cerut: Cand un CT tasteaza comanda /maketeams, cei de la echipa T sa fie impartiti in 2 modele (numele modelelor le inlocuiesc eu). Impartirea sa fie aleatoriu facuta.
Alte informatii: Multumesc.
Last edited by roberteeel on 22 Feb 2014, 10:40, edited 1 time in total.
eXtreamSHOP
User avatar
roberteeel
Membru eXtream
Membru eXtream
Posts: 4446
Joined: 05 Sep 2012, 10:39
Detinator Steam: Nu
Reputatie: Nick anterior: QAZW, Robert.ultrasFarul, CT 18 ROS
Restrictie schimbare nume
Fost moderator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 312 times
Been thanked: 359 times

17 Feb 2014, 19:33

Sus cu el.
User avatar
Ulquiorra
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2056
Joined: 25 Jul 2010, 16: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: Scripter eXtreamCS
Nick anterior: sPuf ?, a^ml), Loca Tapioca, Askhanar
Fost Moderator ajutator
Location: Braila, Romania.
Has thanked: 214 times
Been thanked: 1131 times
Contact:

17 Feb 2014, 23:38

poti fi un pic mai explicit ?
deci cand dai /maketeams.. cei de la tero sa aiba jumate din ei un model si jumatatea cealalta alt model?
""Copilarie, iarta-ma c-am vrut sa fiu om mare.. ""
User avatar
roberteeel
Membru eXtream
Membru eXtream
Posts: 4446
Joined: 05 Sep 2012, 10:39
Detinator Steam: Nu
Reputatie: Nick anterior: QAZW, Robert.ultrasFarul, CT 18 ROS
Restrictie schimbare nume
Fost moderator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 312 times
Been thanked: 359 times

18 Feb 2014, 08:29

Askhanar wrote:poti fi un pic mai explicit ?
deci cand dai /maketeams.. cei de la tero sa aiba jumate din ei un model si jumatatea cealalta alt model?
Exact.
User avatar
Ulquiorra
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2056
Joined: 25 Jul 2010, 16: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: Scripter eXtreamCS
Nick anterior: sPuf ?, a^ml), Loca Tapioca, Askhanar
Fost Moderator ajutator
Location: Braila, Romania.
Has thanked: 214 times
Been thanked: 1131 times
Contact:

18 Feb 2014, 10:22

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

	#include < amxmodx >
	#include < cstrike >
	
	#pragma semicolon 1
	
	#define MT_ACCESS	ADMIN_SLAY
	
	new const
		PLUGIN_NAME[ ] 		= "MakeTeams",
		PLUGIN_VERSION[ ] 	= "1.0";
	
	new const g_szModels[ 2 ][ ] =
	{
		"numemodel",         //Numele primului model fara .mdl
		"numemodel2"        //Numele celui de-al doilea model fara .mdl
	};
		
		
		
public plugin_precache( )
{
	
	new szModel[ 64 ];
	for( new i = 0; i < 2; i++ )
	{
		formatex( szModel, sizeof( szModel ) -1, "models/player/%s/%s.mdl", g_szModels[ i ], g_szModels[ i ] );
		precache_model( szModel );
	}
	
}
				
public plugin_init( )
{
	
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "Askhanar" );
	
	register_clcmd( "say /maketeams", "ClCmdSayMakeTeams" );
	
	
	
	// Add your code here...
}

public ClCmdSayMakeTeams( id )
{
	if( !( get_user_flags( id ) & MT_ACCESS ) )
	{
		client_print( id, print_center, "NU ai acces la aceasta comanda!" );
		return PLUGIN_HANDLED;
	}
	
	static iPlayers[ 32 ];
	static iPlayersNum;
		
	get_players( iPlayers, iPlayersNum, "che", "TERRORIST" );
	if( !iPlayersNum )
		return PLUGIN_CONTINUE;
		
	static iPlayer, i, iModel;
	iModel = 0;
	for( i = 0; i < iPlayersNum; i++ )
	{
		iPlayer = iPlayers[ i ];
		cs_set_user_model( iPlayer, g_szModels[ iModel ] );
		
		if( ++iModel >= 2 )
			iModel = 0;
	
	}
	
	client_print( id, print_center, "Terorristii au acum modele diferite!" );
	return PLUGIN_CONTINUE;
	
}
modifici sus la MT_ACCESS ADMIN_SLAY accesul pentru comanda.. ( ADMIN_ALL e pentru toti ).

modelele le pui in folderul models/player si fiecare sa aiba cate un folder cu numele lui ex:

models/player/numemodel/numemodel.mdl .
""Copilarie, iarta-ma c-am vrut sa fiu om mare.. ""
User avatar
roberteeel
Membru eXtream
Membru eXtream
Posts: 4446
Joined: 05 Sep 2012, 10:39
Detinator Steam: Nu
Reputatie: Nick anterior: QAZW, Robert.ultrasFarul, CT 18 ROS
Restrictie schimbare nume
Fost moderator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 312 times
Been thanked: 359 times

19 Feb 2014, 20:11

E ok, doar ca e o problema...
Cand dai /maketeams, jucatorii raman cu acele costume pentru toata mapa, eu vreau sa ramana asa doar o runda, dupa sa revina doar la modelele normale.
User avatar
Ulquiorra
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2056
Joined: 25 Jul 2010, 16: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: Scripter eXtreamCS
Nick anterior: sPuf ?, a^ml), Loca Tapioca, Askhanar
Fost Moderator ajutator
Location: Braila, Romania.
Has thanked: 214 times
Been thanked: 1131 times
Contact:

19 Feb 2014, 23:52

nu ai specificat asta..
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

	#include < amxmodx >
	#include < cstrike >
	#include < hamsandwich >
	
	#pragma semicolon 1
	
	#define MT_ACCESS	ADMIN_SLAY
	
	new const
		PLUGIN_NAME[ ] 		= "MakeTeams",
		PLUGIN_VERSION[ ] 	= "1.0";
	
	new const g_szModels[ 2 ][ ] =
	{
		"numemodel",         //Numele primului model fara .mdl
		"numemodel2"        //Numele celui de-al doilea model fara .mdl
	};
		
	new bool:g_bModelChanged[ 33 ]= true;
		
public plugin_precache( )
{
	
	new szModel[ 64 ];
	for( new i = 0; i < 2; i++ )
	{
		formatex( szModel, sizeof( szModel ) -1, "models/player/%s/%s.mdl", g_szModels[ i ], g_szModels[ i ] );
		precache_model( szModel );
	}
	
}
				
public plugin_init( )
{
	
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "Askhanar" );
	
	register_clcmd( "say /maketeams", "ClCmdSayMakeTeams" );
	
	
	RegisterHam( Ham_Spawn, "player", "ham_SpawnPlayerPost", true );
	// Add your code here...
}

public client_putinserver( id )	g_bModelChanged[ id ] = false;
public client_disconnect( id )	g_bModelChanged[ id ] = false;

public ham_SpawnPlayerPost( id )
{
	if( !is_user_alive( id ) )
		return;
	
	if( g_bModelChanged[ id ] )
	{
		g_bModelChanged[ id ] = false;
		cs_reset_user_model( id );
	}
}

public ClCmdSayMakeTeams( id )
{
	if( !( get_user_flags( id ) & MT_ACCESS ) )
	{
		client_print( id, print_center, "NU ai acces la aceasta comanda!" );
		return PLUGIN_HANDLED;
	}
	
	static iPlayers[ 32 ];
	static iPlayersNum;
		
	get_players( iPlayers, iPlayersNum, "che", "TERRORIST" );
	if( !iPlayersNum )
		return PLUGIN_CONTINUE;
		
	static iPlayer, i, iModel;
	iModel = 0;
	for( i = 0; i < iPlayersNum; i++ )
	{
		iPlayer = iPlayers[ i ];
		g_bModelChanged[ iPlayer ] = true;
		
		cs_set_user_model( iPlayer, g_szModels[ iModel ] );
		
		if( ++iModel >= 2 )
			iModel = 0;
	
	}
	
	client_print( id, print_center, "Terorristii au acum modele diferite!" );
	return PLUGIN_CONTINUE;
	
}
""Copilarie, iarta-ma c-am vrut sa fiu om mare.. ""
User avatar
roberteeel
Membru eXtream
Membru eXtream
Posts: 4446
Joined: 05 Sep 2012, 10:39
Detinator Steam: Nu
Reputatie: Nick anterior: QAZW, Robert.ultrasFarul, CT 18 ROS
Restrictie schimbare nume
Fost moderator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 312 times
Been thanked: 359 times

22 Feb 2014, 21:56

E totusi o problema, cred ca ai facut ca cei de la T sa tasteze, eu vreau sa aiba acces doar cei de la CT la comanda /maketeams.
User avatar
Ulquiorra
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2056
Joined: 25 Jul 2010, 16: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: Scripter eXtreamCS
Nick anterior: sPuf ?, a^ml), Loca Tapioca, Askhanar
Fost Moderator ajutator
Location: Braila, Romania.
Has thanked: 214 times
Been thanked: 1131 times
Contact:

22 Feb 2014, 23:42

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

	#include < amxmodx >
	#include < cstrike >
	#include < hamsandwich >
	
	#pragma semicolon 1
	
	#define MT_ACCESS	ADMIN_SLAY
	
	new const
		PLUGIN_NAME[ ] 		= "MakeTeams",
		PLUGIN_VERSION[ ] 	= "1.0";
	
	new const g_szModels[ 2 ][ ] =
	{
		"numemodel",         //Numele primului model fara .mdl
		"numemodel2"        //Numele celui de-al doilea model fara .mdl
	};
		
	new bool:g_bModelChanged[ 33 ]= true;
		
public plugin_precache( )
{
	
	new szModel[ 64 ];
	for( new i = 0; i < 2; i++ )
	{
		formatex( szModel, sizeof( szModel ) -1, "models/player/%s/%s.mdl", g_szModels[ i ], g_szModels[ i ] );
		precache_model( szModel );
	}
	
}
				
public plugin_init( )
{
	
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "Askhanar" );
	
	register_clcmd( "say /maketeams", "ClCmdSayMakeTeams" );
	
	
	RegisterHam( Ham_Spawn, "player", "ham_SpawnPlayerPost", true );
	// Add your code here...
}

public client_putinserver( id )	g_bModelChanged[ id ] = false;
public client_disconnect( id )	g_bModelChanged[ id ] = false;

public ham_SpawnPlayerPost( id )
{
	if( !is_user_alive( id ) )
		return;
	
	if( g_bModelChanged[ id ] )
	{
		g_bModelChanged[ id ] = false;
		cs_reset_user_model( id );
	}
}

public ClCmdSayMakeTeams( id )
{
	if( !( get_user_flags( id ) & MT_ACCESS ) )
	{
		client_print( id, print_center, "NU ai acces la aceasta comanda!" );
		return PLUGIN_HANDLED;
	}
	
	if( cs_get_user_team( id ) != CS_TEAM_CT )
		return PLUGIN_HANDLED;
		
	static iPlayers[ 32 ];
	static iPlayersNum;
		
	get_players( iPlayers, iPlayersNum, "che", "TERRORIST" );
	if( !iPlayersNum )
		return PLUGIN_CONTINUE;
		
	static iPlayer, i, iModel;
	iModel = 0;
	for( i = 0; i < iPlayersNum; i++ )
	{
		iPlayer = iPlayers[ i ];
		g_bModelChanged[ iPlayer ] = true;
		
		cs_set_user_model( iPlayer, g_szModels[ iModel ] );
		
		if( ++iModel >= 2 )
			iModel = 0;
	
	}
	
	client_print( id, print_center, "Terorristii au acum modele diferite!" );
	return PLUGIN_CONTINUE;
	
}
""Copilarie, iarta-ma c-am vrut sa fiu om mare.. ""
User avatar
roberteeel
Membru eXtream
Membru eXtream
Posts: 4446
Joined: 05 Sep 2012, 10:39
Detinator Steam: Nu
Reputatie: Nick anterior: QAZW, Robert.ultrasFarul, CT 18 ROS
Restrictie schimbare nume
Fost moderator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 312 times
Been thanked: 359 times

23 Feb 2014, 08:35

E ok, merci!
Post Reply

Return to “Cereri”

  • Information