Cerere modificare plugin rank csgo

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Banty
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 22 Jun 2013, 11:16
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

06 Nov 2019, 19:09

Am acest plugin gasit pe aceasta comunitate.La compilare primesc eroare.
/tmp/text9wdreR.sma(5) : fatal error 100: cannot read from file: "colorchat"

Compilation aborted.
1 Error.

Edit: Daca se poate.Rankurile sa nu se reseteza daca top15 este resetat.

Code: Select all

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "Rank CsGo"
#define VERSION "1.0.0"
#define AUTHOR "Author"


#define Silver II 200
#define Silver III 400
#define Silver IV 800
#define Silver Elite 1200
#define Silver Elite Master 1600
#define Gold Nova I 2000
#define Gold Nova II 2600
#define Gold Nova III 3200
#define Gold Nova Master 3600
#define Master Guardian I 4200
#define Master Guardian II 4800
#define Master Guardian Elite 5400
#define Distinguished Master Guardian 6200
#define Legendary Eagle 7000
#define Legendary Eagle Master 8000
#define Supreme Master First Class 9000
#define The Global Elite 10000


new KILLS[33];
new File[128];

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd ( "say", "hook_say" );
	register_event ( "DeathMsg", "eDeath", "a" );
	
	new DataDir[64]
	get_datadir(DataDir, 63)
	format(File, 127, "%s/CsGoRank.dat", DataDir)
}
public hook_say ( e_Index )
{
	static s_Said[ 192 ];
	read_args ( s_Said, charsmax ( s_Said ) );
	
	if ( equal ( s_Said, "" ) || equal (s_Said, " " ))
		return 1;
	remove_quotes ( s_Said );
	
	
	new chatreply[192]
	parse(s_Said, chatreply, 191)
			
	if (!chatreply[0])
	{
		return 1;
	}
	
	static s_Name[ 32 ];
	get_user_name ( e_Index, s_Name, 31 );
	
	if ( get_user_flags(e_Index) & ADMIN_KICK )
	{
		if ( KILLS[e_Index] < SilverII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver I^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SilverII <= KILLS[e_Index] < SilverIII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver II^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SilverIII <= KILLS[e_Index] < SilverIV )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver III^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SilverIV <= KILLS[e_Index] < SilverE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver IV^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SilverE <= KILLS[e_Index] < SilverEM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver Elite^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SilverEM <= KILLS[e_Index] < GNI )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver Elite Master^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( GNI <= KILLS[e_Index] < GNII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova I^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( GNII <= KILLS[e_Index] < GNIII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova II^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( GNIII <= KILLS[e_Index] < GNM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova III^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( GNM <= KILLS[e_Index] < MGI )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova Master^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( MGI <= KILLS[e_Index] < MGII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian I^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( MGII <= KILLS[e_Index] < MGE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian II^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( MGE <= KILLS[e_Index] < DMG )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian Elite^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( DMG <= KILLS[e_Index] < LE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Distinguished Master Guardian^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( LE <= KILLS[e_Index] < LEM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Legendary Eagle^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( LEM <= KILLS[e_Index] < SMFC )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Legendary Eagle Master^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SMFC <= KILLS[e_Index] < TGE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Supreme Master First Class^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( TGE <= KILLS[e_Index] )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4The Global Elite^1]^3%s^1:^4%s", s_Name, s_Said );
		}
	}
	else 
	{
		if ( KILLS[e_Index] < SilverII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver I^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SilverII <= KILLS[e_Index] < SilverIII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver II^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SilverIII <= KILLS[e_Index] < SilverIV )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver III^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SilverIV <= KILLS[e_Index] < SilverE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver IV^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SilverE <= KILLS[e_Index] < SilverEM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver Elite^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SilverEM <= KILLS[e_Index] < GNI )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver Elite Master^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( GNI <= KILLS[e_Index] < GNII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova I^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( GNII <= KILLS[e_Index] < GNIII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova II^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( GNIII <= KILLS[e_Index] < GNM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova III^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( GNM <= KILLS[e_Index] < MGI )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova Master^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( MGI <= KILLS[e_Index] < MGII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian I^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( MGII <= KILLS[e_Index] < MGE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian II^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( MGE <= KILLS[e_Index] < DMG )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian Elite^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( DMG <= KILLS[e_Index] < LE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Distinguished Master Guardian^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( LE <= KILLS[e_Index] < LEM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Legendary Eagle^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( LEM <= KILLS[e_Index] < SMFC )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Legendary Eagle Master^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SMFC <= KILLS[e_Index] < TGE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Supreme Master First Class^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( TGE <= KILLS[e_Index] )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4The Global Elite^1]^3%s^4:^1%s", s_Name, s_Said );
		}
	}
	return 1;
}

public eDeath ( ) 
{
	
	new iKiller = read_data ( 1 );
	new iVictim = read_data ( 2 );
	
	new weapon [ 32 ];
	read_data ( 4, weapon, sizeof ( weapon ) -1 );
	if ( iKiller == iVictim )
	{
		return 1;
	}
	if ( is_user_alive(iKiller) && is_user_connected(iKiller) )
	{
		KILLS[iKiller]++;
		SaveSts(iKiller);
	}
	return 1;
}

public client_connect(id) 
{
	LoadSts ( id );
}

public client_disconnect ( id ) 
{
	SaveSts ( id );
}

public SaveSts(id) {
	new Name[32];
	get_user_name(id, Name, 31);

	static Data[1024]
	formatex(Data, sizeof(Data) - 1, "^"%i^"", KILLS[id])
	
	new Save[512]
	format(Save, 511, "^"%s^" %s", Name, Data )
	
	new Line[128], Linie, IsPlayer = false, Arg1[32]
	
	new FileOpen = fopen(File, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)

		parse(Line, Arg1, 31)
		
		if (equali(Arg1, Name)) {
			write_file(File, Save, Linie)
			IsPlayer = true
			break
		}
		
		Linie++
	}
	fclose(FileOpen)
	if (!IsPlayer) {
		write_file(File, Save, -1)
	}
}

public LoadSts(id) {
	new Name[32];
	get_user_name(id, Name, 31);
	
	new Line[128], IsPlayer = false, Arg1[32], Arg2[32];
	
	new FileOpen = fopen(File, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)
		
		parse(Line, Arg1, 31, Arg2, 31)
		
		if (equali(Arg1, Name)) {
			KILLS[id] = str_to_num(Arg2)
			IsPlayer = true
			break
		}
	}
	fclose(FileOpen)
	
	if (!IsPlayer) {
		KILLS[id] = 0;
	}
}
Last edited by Banty on 06 Nov 2019, 19:16, edited 1 time in total.
Enix
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2556
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 37 times
Been thanked: 388 times
Contact:

06 Nov 2019, 19:12

n ai colorchat.inc
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Banty
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 22 Jun 2013, 11:16
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

06 Nov 2019, 19:17

L E V I N wrote:
06 Nov 2019, 19:12
n ai colorchat.inc
Si ce e de facut?
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2556
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 37 times
Been thanked: 388 times
Contact:

06 Nov 2019, 19:19

să l incluzi
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Banty
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 22 Jun 2013, 11:16
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

06 Nov 2019, 19:21

L E V I N wrote:
06 Nov 2019, 19:19
să l incluzi
Nu stiu cum.De asta am facut cerere aici...
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2556
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 37 times
Been thanked: 388 times
Contact:

06 Nov 2019, 19:40

faci un fișier colorchat.inc și bagi

Code: Select all

#if defined _colorchat_included
	#endinput
#endif
#define _colorchat_included

/* ColorChat Support */
#define TEAM_COLOR DontChange
#define print_team_default DontChange
#define NORMAL	DontChange
#define GREEN	DontChange
#define RED		Red
#define BLUE	Blue
#define GREY	Grey
#define ColorChat client_print_color

#define MAX_TRANSLATION_LENGTH 2048

enum {
	DontChange = 0,
	Grey = -1,//33
	Red = -2,
	Blue = -3
};

#define print_team_default  DontChange
#define print_team_grey     Grey
#define print_team_red      Red
#define print_team_blue     Blue

stock client_print_color(id, sender, const fmt[], any:...)
{
	// check if id is different from 0
	if (id && !is_user_connected(id))
	{
		return 0;
	}

	if (sender < Blue || sender > 32)
	{
		sender = DontChange;
	}
	else if (sender < DontChange)
	{
		sender = -sender + 32; // align indexes to the TeamInfo ones
	}

	static const szTeamName[][] =
	{
		"",
		"TERRORIST",
		"CT"
	};

	new szMessage[191];

	new iParams = numargs();

	// Specific player code
	if (id)
	{
		if (iParams == 3)
		{
			copy(szMessage, charsmax(szMessage), fmt); // copy so message length doesn't exceed critical 192 value
		}
		else
		{
			vformat(szMessage, charsmax(szMessage), fmt, 4);
		}

		if (sender > (32 - Grey))
		{
			if (sender > (32 - Blue))
			{
				sender = id;
			}
			else
			{
				_CC_TeamInfo(id, sender, szTeamName[sender - (32 - Grey)]);
			}
		}
		_CC_SayText(id, sender, szMessage);
	}

	// Send message to all players
	else
	{
		// Figure out if at least 1 player is connected
		// so we don't execute useless useless code if not
		new iPlayers[32], iNum;
		get_players(iPlayers, iNum, "ch");
		if (!iNum)
		{
			return 0;
		}

		new iMlNumber, i, j;
		new Array:aStoreML = ArrayCreate();
		if (iParams >= 5) // ML can be used
		{
			for (j = 3; j < iParams; j++)
			{
				// retrieve original param value and check if it's LANG_PLAYER value
				if (getarg(j) == LANG_PLAYER)
				{
					i = 0;
					// as LANG_PLAYER == -1, check if next parm string is a registered language translation
					while ((szMessage[i] = getarg(j + 1, i++))) {}
					if (GetLangTransKey(szMessage) != TransKey_Bad)
					{
						// Store that arg as LANG_PLAYER so we can alter it later
						ArrayPushCell(aStoreML, j++);

						// Update ML array saire so we'll know 1st if ML is used,
						// 2nd how many args we have to alterate
						iMlNumber++;
					}
				}
			}
		}

		// If arraysize == 0, ML is not used
		// we can only send 1 MSG_ALL message if sender != 0
		if (!iMlNumber)
		{
			if (iParams == 3)
			{
				copy(szMessage, charsmax(szMessage), fmt);
			}
			else
			{
				vformat(szMessage, charsmax(szMessage), fmt, 4);
			}
			if (0 < sender < (32 - Blue)) // if 0 is passed, need to loop
			{
				if (sender > (32 - Grey))
				{
					_CC_TeamInfo(0, sender, szTeamName[sender - (32 - Grey)]);
				}
				_CC_SayText(0, sender, szMessage);
				return 1;
			}
		}

		if (sender > (32 - Blue))
		{
			sender = 0; // use receiver index
		}

		for (--iNum; iNum >= 0; iNum--)
		{
			id = iPlayers[iNum];

			if (iMlNumber)
			{
				for (j = 0; j < iMlNumber; j++)
				{
					// Set all LANG_PLAYER args to player index ( = id )
					// so we can format the text for that specific player
					setarg(ArrayGetCell(aStoreML, j), _, id);
				}

				// format string for specific player
				vformat(szMessage, charsmax(szMessage), fmt, 4);

				/*replace_all(szMessage, charsmax(szMessage),"!g","^4")
				replace_all(szMessage, charsmax(szMessage),"!n","^1")
				replace_all(szMessage, charsmax(szMessage),"!t","^3")
				replace_all(szMessage, charsmax(szMessage),"\GRN","^4")
				replace_all(szMessage, charsmax(szMessage),"\YEL","^1")
				replace_all(szMessage, charsmax(szMessage),"\TEM","^3")*/
			}

			if (sender > (32 - Grey))
			{
				_CC_TeamInfo(id, sender, szTeamName[sender - (32 - Grey)]);
			}
			_CC_SayText(id, sender, szMessage);
		}

		ArrayDestroy(aStoreML);
	}
	return 1;
}

stock _CC_TeamInfo(iReceiver, iSender, szTeam[])
{
	static iTeamInfo = 0;
	if (!iTeamInfo)
	{
		iTeamInfo = get_user_msgid("TeamInfo");
	}
	message_begin(iReceiver ? MSG_ONE : MSG_ALL, iTeamInfo, _, iReceiver);
	write_byte(iSender);
	write_string(szTeam);
	message_end();
}

stock _CC_SayText(iReceiver, iSender, szMessage[])
{
	static iSayText = 0;
	if (!iSayText)
	{
		iSayText = get_user_msgid("SayText");
	}

	// Prevent sending format and localization strings via chat
	for (new i = 0; i < 192; i++)
	{
		if (szMessage[i] == 0) break;
		if (szMessage[i] == '%' ||
			szMessage[i] == '#')
			szMessage[i] = ' ';
	}
	
	message_begin(iReceiver ? MSG_ONE : MSG_ALL, iSayText, _, iReceiver);
	write_byte(iSender ? iSender : iReceiver);
	if (szMessage[0] > 4)
	{
		write_byte(1);
		szMessage[192 - 2 - 1] = 0;	// Two write_byte + string terminator
		write_string(szMessage);
	}
	else
	{
		szMessage[192 - 1 - 1] = 0;	// One write_byte + string terminator
		write_string(szMessage);
	}
	message_end();
}

new _translation_szBuffer[MAX_TRANSLATION_LENGTH];

stock register_dictionary_colored(const filename[])
{
	if (!register_dictionary(filename))
	{
		return 0;
	}

	new szFileName[256];
	get_localinfo("amxx_datadir", szFileName, charsmax(szFileName));
	format(szFileName, charsmax(szFileName), "%s/lang/%s", szFileName, filename);
	new fp = fopen(szFileName, "rt");
	if (!fp)
	{
		log_amx("Failed to open %s", szFileName);
		return 0;
	}

	new szLang[3], szKey[64], TransKey:iKey;

	while (!feof(fp))
	{
		fgets(fp, _translation_szBuffer, charsmax(_translation_szBuffer));
		trim(_translation_szBuffer);

		if (_translation_szBuffer[0] == '[')
		{
			strtok(_translation_szBuffer[1], szLang, charsmax(szLang), _translation_szBuffer, 1, ']');
		}
		else if (_translation_szBuffer[0])
		{
			strbreak(_translation_szBuffer, szKey, charsmax(szKey), _translation_szBuffer, charsmax(_translation_szBuffer));
			iKey = GetLangTransKey(szKey);
			if (iKey != TransKey_Bad)
			{
				replace_all(_translation_szBuffer, charsmax(_translation_szBuffer), "!g", "^4");//while() {}?
				replace_all(_translation_szBuffer, charsmax(_translation_szBuffer), "!t", "^3");
				replace_all(_translation_szBuffer, charsmax(_translation_szBuffer), "!n", "^1");
				replace_all(_translation_szBuffer, charsmax(_translation_szBuffer), "!y", "^1");
				replace_all(_translation_szBuffer, charsmax(_translation_szBuffer), "^^4", "^4");
				replace_all(_translation_szBuffer, charsmax(_translation_szBuffer), "^^3", "^3");
				replace_all(_translation_szBuffer, charsmax(_translation_szBuffer), "^^1", "^1");
				replace_all(_translation_szBuffer, charsmax(_translation_szBuffer), "^^n", "^n");
				replace_all(_translation_szBuffer, charsmax(_translation_szBuffer), "^^t", "^t");
				AddTranslation(szLang, iKey, _translation_szBuffer[2]);
			}
		}
	}

	fclose(fp);
	return 1;
}
în el, apoi fișierul îl pui în folderu ”include”
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Banty
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 22 Jun 2013, 11:16
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

06 Nov 2019, 20:15

Am facut asa.
Am creeat un fisier si am pus tot din "CODE",am salvat cu numele colorchat.inc,dar nu inteleg in ce folder sa-l pun.
Plus ca nu inteleg care-i treaba cu fiesierul daca eu trebuie sa compilezi codul.
Te rog.Lasa-mi un reply macar sa stiu daca nu vrei sa ma ajuti.
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2556
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 37 times
Been thanked: 388 times
Contact:

06 Nov 2019, 20:20

dacă nu voiam să te ajut nu răspundeam, ți am zis cum să faci
vezi cum se compilează local
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Banty
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 22 Jun 2013, 11:16
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

06 Nov 2019, 20:42

Mai ajutat cu plugiinul dar nu stiu cum sa fac..
Ca sa compilez local trebuie sa am ceva program pentru compilat si sa bag sma sau sa bag codul pe siteul ala de compilat.
M-am uitat aici tutoriale-cs/tutorial-compilare-pluginuri-t24.html
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2556
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 37 times
Been thanked: 388 times
Contact:

06 Nov 2019, 21:02

nu ți trebuie site pentru compilare, o faci local
descarci de aici http://www.amxmodx.org/downloads.php http://www.amxmodx.org/release/amxmodx- ... indows.zip & http://www.amxmodx.org/release/amxmodx- ... indows.zip le unești în dezarhivare, apoi o să vezi că ai folder /amxmodx/scripting/include aici pui colorchat.inc apoi .sma îl lași în scripting, și pornești compile.exe
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Banty
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 22 Jun 2013, 11:16
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

06 Nov 2019, 21:13

Am facut ,dar de unde iau pluginul .amxx ca sa-l bag in sv
//// rankcsgo.sma
// C:\Users\TH\Desktop\addons\amxmodx\scripting\rankcsgo.sma(283) : error 013: no entry point (no public functions)
//
// 1 Error.
// Could not locate output file compiled\rankcsgo.amx (compile failed).
//
// Compilation Time: 0.12 sec
// ----------------------------------------
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2556
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 37 times
Been thanked: 388 times
Contact:

06 Nov 2019, 21:44

nu vezi că a dat error? nu ai nici un amxx de băgat

Code: Select all

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <colorchat_lang>

#define PLUGIN "Rank CsGo"
#define VERSION "1.0.0"
#define AUTHOR "Author"


#define SilverII 200
#define SilverIII 400
#define SilverIV 800
#define SilverE 1200
#define SilverEM 1600
#define GNI 2000
#define GNII 2600
#define GNIII 3200
#define GNM 3600
#define MGI 4200
#define MGII 4800
#define MGE 5400
#define DMG 6200
#define LE 7000
#define LEM 8000
#define SMFC 9000
#define TGE 10000


new KILLS[33];
new File[128];

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd ( "say", "hook_say" );
	register_event ( "DeathMsg", "eDeath", "a" );
	
	new DataDir[64]
	get_datadir(DataDir, 63)
	format(File, 127, "%s/CsGoRank.dat", DataDir)
}
public hook_say ( e_Index )
{
	static s_Said[ 192 ];
	read_args ( s_Said, charsmax ( s_Said ) );
	
	if ( equal ( s_Said, "" ) || equal (s_Said, " " ))
		return 1;
	remove_quotes ( s_Said );
	
	
	new chatreply[192]
	parse(s_Said, chatreply, 191)
			
	if (!chatreply[0])
	{
		return 1;
	}
	
	static s_Name[ 32 ];
	get_user_name ( e_Index, s_Name, 31 );
	
	if ( get_user_flags(e_Index) & ADMIN_KICK )
	{
		if ( KILLS[e_Index] < SilverII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver I^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SilverII <= KILLS[e_Index] < SilverIII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver II^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SilverIII <= KILLS[e_Index] < SilverIV )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver III^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SilverIV <= KILLS[e_Index] < SilverE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver IV^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SilverE <= KILLS[e_Index] < SilverEM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver Elite^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SilverEM <= KILLS[e_Index] < GNI )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver Elite Master^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( GNI <= KILLS[e_Index] < GNII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova I^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( GNII <= KILLS[e_Index] < GNIII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova II^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( GNIII <= KILLS[e_Index] < GNM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova III^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( GNM <= KILLS[e_Index] < MGI )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova Master^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( MGI <= KILLS[e_Index] < MGII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian I^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( MGII <= KILLS[e_Index] < MGE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian II^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( MGE <= KILLS[e_Index] < DMG )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian Elite^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( DMG <= KILLS[e_Index] < LE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Distinguished Master Guardian^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( LE <= KILLS[e_Index] < LEM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Legendary Eagle^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( LEM <= KILLS[e_Index] < SMFC )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Legendary Eagle Master^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( SMFC <= KILLS[e_Index] < TGE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Supreme Master First Class^1]^3%s^1:^4%s", s_Name, s_Said );
		}
		else if ( TGE <= KILLS[e_Index] )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4The Global Elite^1]^3%s^1:^4%s", s_Name, s_Said );
		}
	}
	else 
	{
		if ( KILLS[e_Index] < SilverII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver I^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SilverII <= KILLS[e_Index] < SilverIII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver II^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SilverIII <= KILLS[e_Index] < SilverIV )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver III^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SilverIV <= KILLS[e_Index] < SilverE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver IV^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SilverE <= KILLS[e_Index] < SilverEM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver Elite^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SilverEM <= KILLS[e_Index] < GNI )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Silver Elite Master^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( GNI <= KILLS[e_Index] < GNII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova I^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( GNII <= KILLS[e_Index] < GNIII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova II^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( GNIII <= KILLS[e_Index] < GNM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova III^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( GNM <= KILLS[e_Index] < MGI )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Gold Nova Master^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( MGI <= KILLS[e_Index] < MGII )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian I^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( MGII <= KILLS[e_Index] < MGE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian II^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( MGE <= KILLS[e_Index] < DMG )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Master Guardian Elite^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( DMG <= KILLS[e_Index] < LE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Distinguished Master Guardian^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( LE <= KILLS[e_Index] < LEM )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Legendary Eagle^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( LEM <= KILLS[e_Index] < SMFC )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Legendary Eagle Master^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( SMFC <= KILLS[e_Index] < TGE )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4Supreme Master First Class^1]^3%s^4:^1%s", s_Name, s_Said );
		}
		else if ( TGE <= KILLS[e_Index] )
		{
			ColorChat ( 0, TEAM_COLOR, "^1[^4The Global Elite^1]^3%s^4:^1%s", s_Name, s_Said );
		}
	}
	return 1;
}

public eDeath ( ) 
{
	
	new iKiller = read_data ( 1 );
	new iVictim = read_data ( 2 );
	
	new weapon [ 32 ];
	read_data ( 4, weapon, sizeof ( weapon ) -1 );
	if ( iKiller == iVictim )
	{
		return 1;
	}
	if ( is_user_alive(iKiller) && is_user_connected(iKiller) )
	{
		KILLS[iKiller]++;
		SaveSts(iKiller);
	}
	return 1;
}

public client_connect(id) 
{
	LoadSts ( id );
}

public client_disconnect ( id ) 
{
	SaveSts ( id );
}

public SaveSts(id) {
	new Name[32];
	get_user_name(id, Name, 31);

	static Data[1024]
	formatex(Data, sizeof(Data) - 1, "^"%i^"", KILLS[id])
	
	new Save[512]
	format(Save, 511, "^"%s^" %s", Name, Data )
	
	new Line[128], Linie, IsPlayer = false, Arg1[32]
	
	new FileOpen = fopen(File, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)

		parse(Line, Arg1, 31)
		
		if (equali(Arg1, Name)) {
			write_file(File, Save, Linie)
			IsPlayer = true
			break
		}
		
		Linie++
	}
	fclose(FileOpen)
	if (!IsPlayer) {
		write_file(File, Save, -1)
	}
}

public LoadSts(id) {
	new Name[32];
	get_user_name(id, Name, 31);
	
	new Line[128], IsPlayer = false, Arg1[32], Arg2[32];
	
	new FileOpen = fopen(File, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)
		
		parse(Line, Arg1, 31, Arg2, 31)
		
		if (equali(Arg1, Name)) {
			KILLS[id] = str_to_num(Arg2)
			IsPlayer = true
			break
		}
	}
	fclose(FileOpen)
	
	if (!IsPlayer) {
		KILLS[id] = 0;
	}
}
încearcă cu sursa asta
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests