Cerere Plugin new_round_stats

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
Andre
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 12 Nov 2009, 23:18
Detinator Steam: Da
CS Status: Anii trec idealurile raman
SteamID: MrHero0
Location: Localhost
Has thanked: 2 times
Contact:

25 Sep 2010, 21:58

Salut poate cineva sa imi dea acest plugin,"new_round_stats"l-am gasit pe net dar nu merge pagina de download
Fortza Steaua
Forum:htpp://energy.tziku.ro
Image
Image
Image

Image

Image
User avatar
b[L]u
Membru, skill +1
Membru, skill +1
Posts: 314
Joined: 31 May 2010, 13:27
Detinator Steam: Nu
Has thanked: 26 times
Been thanked: 8 times

25 Sep 2010, 22:07

ia vezi
| Afiseaza codul
#include <amxmodx>

#include <amxmisc>



#define PLUGIN "Round Stats"

#define VERSION "1.0"

#define AUTHOR "Alka"



#define MAXSLOTS 32



enum Color {

        

        YELLOW = 1,

        GREEN, 

        TEAM_COLOR,

        GREY,

        RED, 

        BLUE

}



new TeamName[][] = {

        

        "",

        "TERRORIST",

        "CT",

        "SPECTATOR"

}



new bool:IsConnected[MAXSLOTS + 1];

new count_rounds = 0;

new const g_server_name[] = ""

new TeamInfo;

new SayText;

new MaxSlots;



public plugin_init() {

        

        register_plugin(PLUGIN, VERSION, AUTHOR)

        register_logevent("_round_start", 2, "1=Round_Start")

        

        TeamInfo = get_user_msgid("TeamInfo");

        SayText = get_user_msgid("SayText");

        MaxSlots = get_maxplayers();

}



public _round_start()

{

        new mapname[32]

        new players[32], num

        

        get_players(players, num)

        get_mapname(mapname,31)

        

        count_rounds ++

        

        ColorChat(0, GREEN,"^x01-<[ Round: ^x04%d^x01 begins in ^x04%s ^x01]>---<[ ^x04%s ^x01]>---<[^x04%d^x01]>-",count_rounds,g_server_name,mapname,num)

}



public ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:.)

{

        static message[256];



        switch(type)

        {

                case YELLOW:

                {

                        message[0] = 0x01;

                }

                case GREEN:

                {

                        message[0] = 0x04;

                }

                default:

                {

                        message[0] = 0x03;

                }

        }



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



        message[192] = '^0';



        new team, ColorChange, index, MSG_Type;

        

        if(!id)

        {

                index = FindPlayer();

                MSG_Type = MSG_ALL;

        

        } else {

                MSG_Type = MSG_ONE;

                index = id;

        }

        

        team = get_user_team(index);    

        ColorChange = ColorSelection(index, MSG_Type, type);



        ShowColorMessage(index, MSG_Type, message);

                

        if(ColorChange)

        {

                Team_Info(index, MSG_Type, TeamName[team]);

        }

}



ShowColorMessage(id, type, message[])

{

        message_begin(type, SayText, _, id);

        write_byte(id)          

        write_string(message);

        message_end();  

}



Team_Info(id, type, team[])

{

        message_begin(type, TeamInfo, _, id);

        write_byte(id);

        write_string(team);

        message_end();



        return 1;

}



ColorSelection(index, type, Color:Type)

{

        switch(Type)

        {

                case RED:

                {

                        return Team_Info(index, type, TeamName[1]);

                }

                case BLUE:

                {

                        return Team_Info(index, type, TeamName[2]);

                }

                case GREY:

                {

                        return Team_Info(index, type, TeamName[0]);

                }

        }



        return 0;

}



FindPlayer()

{

        new i = -1;



        while(i <= MaxSlots)

        {

                if(IsConnected[++i])

                {

                        return i;

                }

        }



        return -1;

}
Nick: MiSteR D
Image
User avatar
Andre
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 12 Nov 2009, 23:18
Detinator Steam: Da
CS Status: Anii trec idealurile raman
SteamID: MrHero0
Location: Localhost
Has thanked: 2 times
Contact:

26 Sep 2010, 09:29

Da eroare la compilare
Fortza Steaua
Forum:htpp://energy.tziku.ro
Image
Image
Image

Image

Image
User avatar
b[L]u
Membru, skill +1
Membru, skill +1
Posts: 314
Joined: 31 May 2010, 13:27
Detinator Steam: Nu
Has thanked: 26 times
Been thanked: 8 times

26 Sep 2010, 12:12

gata asta ar trebui sa mearga ;)
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Round Stats"
#define VERSION "1.0"
#define AUTHOR "Alka"

#define MAXSLOTS 32

enum Color {
	
	YELLOW = 1,
	GREEN, 
	TEAM_COLOR,
	GREY,
	RED, 
	BLUE
}

new TeamName[][] = {
	
	"",
	"TERRORIST",
	"CT",
	"SPECTATOR"
}

new bool:IsConnected[MAXSLOTS + 1];
new count_rounds = 0;
new const g_server_name[] = ""
new TeamInfo;
new SayText;
new MaxSlots;

public plugin_init() {
	
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_logevent("_round_start", 2, "1=Round_Start")
	
	TeamInfo = get_user_msgid("TeamInfo");
	SayText = get_user_msgid("SayText");
	MaxSlots = get_maxplayers();
}

public _round_start()
{
	new mapname[32]
	new players[32], num
	
	get_players(players, num)
	get_mapname(mapname,31)
	
	count_rounds ++
	
	ColorChat(0, GREEN,"^x01-<[ Round: ^x04%d^x01 begins in ^x04%s ^x01]>---<[ ^x04%s ^x01]>---<[^x04%d^x01]>-",count_rounds,g_server_name,mapname,num)
}

public ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
	static message[256];

	switch(type)
	{
		case YELLOW:
		{
			message[0] = 0x01;
		}
		case GREEN:
		{
			message[0] = 0x04;
		}
		default:
		{
			message[0] = 0x03;
		}
	}

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

	message[192] = '^0';

	new team, ColorChange, index, MSG_Type;
	
	if(!id)
	{
		index = FindPlayer();
		MSG_Type = MSG_ALL;
	
	} else {
		MSG_Type = MSG_ONE;
		index = id;
	}
	
	team = get_user_team(index);	
	ColorChange = ColorSelection(index, MSG_Type, type);

	ShowColorMessage(index, MSG_Type, message);
		
	if(ColorChange)
	{
		Team_Info(index, MSG_Type, TeamName[team]);
	}
}

ShowColorMessage(id, type, message[])
{
	message_begin(type, SayText, _, id);
	write_byte(id)		
	write_string(message);
	message_end();	
}

Team_Info(id, type, team[])
{
	message_begin(type, TeamInfo, _, id);
	write_byte(id);
	write_string(team);
	message_end();

	return 1;
}

ColorSelection(index, type, Color:Type)
{
	switch(Type)
	{
		case RED:
		{
			return Team_Info(index, type, TeamName[1]);
		}
		case BLUE:
		{
			return Team_Info(index, type, TeamName[2]);
		}
		case GREY:
		{
			return Team_Info(index, type, TeamName[0]);
		}
	}

	return 0;
}

FindPlayer()
{
	new i = -1;

	while(i <= MaxSlots)
	{
		if(IsConnected[++i])
		{
			return i;
		}
	}

	return -1;
}
Nick: MiSteR D
Image
User avatar
Andre
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 12 Nov 2009, 23:18
Detinator Steam: Da
CS Status: Anii trec idealurile raman
SteamID: MrHero0
Location: Localhost
Has thanked: 2 times
Contact:

01 Oct 2010, 19:46

Tot da eroare
Fortza Steaua
Forum:htpp://energy.tziku.ro
Image
Image
Image

Image

Image
User avatar
b[L]u
Membru, skill +1
Membru, skill +1
Posts: 314
Joined: 31 May 2010, 13:27
Detinator Steam: Nu
Has thanked: 26 times
Been thanked: 8 times

02 Oct 2010, 08:13

ba nu avea cum sa nuti mearga na uite ti l-am facut eu http://www39.zippyshare.com/v/44172294/file.html ...
Nick: MiSteR D
Image
User avatar
Andre
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 12 Nov 2009, 23:18
Detinator Steam: Da
CS Status: Anii trec idealurile raman
SteamID: MrHero0
Location: Localhost
Has thanked: 2 times
Contact:

06 Oct 2010, 21:22

Da iti multumesc mult merge
Fortza Steaua
Forum:htpp://energy.tziku.ro
Image
Image
Image

Image

Image
User avatar
b[L]u
Membru, skill +1
Membru, skill +1
Posts: 314
Joined: 31 May 2010, 13:27
Detinator Steam: Nu
Has thanked: 26 times
Been thanked: 8 times

06 Oct 2010, 21:36

apasa si tu pe buton multumesc...
Nick: MiSteR D
Image
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests