[REZOLVAT] [Cerere plugin]-Grade CSGO

In acest subforum puteţi cere un plugin pentru server .
Locked
User avatar
De3y.
Membru
Membru
Posts: 3
Joined: 6 years ago
Has thanked: 0
Been thanked: 0
Status: Offline

6 years ago

Plugin cerut :Rang-uri ca in CSGO.
Serverul pentru care doresc pluginul : Sunt de pe alt server.. dar nu il scriu ca sa nu fac reclama.
Alte detalii tehnice despre plugin : [Please login or register to view this link] --> inspiratie, este unu pe net .. dar ala cand il pun la un momendat incepe sa aiba lag server-ul, am scos amxxx si am vazut ca este de el
Silver 2 250
Silver 3 350
etc ..
Din 100 in 100
P.S:Rang-ul sa creasca, daca pe numele Amm@ ai facut 250 de fraguri in TOTAL sa iti dea Silver 2.
User avatar
Aneimar
Fondator
Fondator
Posts: 1901
Joined: 8 years ago
Location: RO - DE
Has thanked: 0
Been thanked: 11 times
Zodiac:
Age: 28
Contact:
Status: Offline
Romania

6 years ago

Nu trebuia model , dar infine .
Incearca

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 "KrAzZzY"


#define SilverII 250
#define SilverIII 350
#define SilverIV 450
#define SilverE 550
#define SilverEM 650
#define GNI 750
#define GNII 850
#define GNIII 950
#define GNM 1050
#define MGI 1150
#define MGII 1250
#define MGE 1350
#define DMG 1450
#define LE 1550
#define LEM 1650
#define SMFC 1750
#define TGE 1850


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;
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
*/
Image


|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|

|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|

|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|
User avatar
De3y.
Membru
Membru
Posts: 3
Joined: 6 years ago
Has thanked: 0
Been thanked: 0
Status: Offline

6 years ago

Il voi incerca, sa nu inchizi topicu.
EDIT:L-ai luat de net si l-ai pus aici ..
Asta este cel de care ziceam la precizari daca ai citit.
User avatar
Aneimar
Fondator
Fondator
Posts: 1901
Joined: 8 years ago
Location: RO - DE
Has thanked: 0
Been thanked: 11 times
Zodiac:
Age: 28
Contact:
Status: Offline
Romania

6 years ago

De3y. wrote:Il voi incerca, sa nu inchizi topicu.
EDIT:L-ai luat de net si l-ai pus aici ..
Asta este cel de care ziceam la precizari daca ai citit.

Vrei ceva unic ? vino cu server-ul in comunitate .
Noi acuma te putem ajuta doar sa editezi un plugin sau sa iti cautam plugin-ul pe net unde tu nu ai reusit .
Image


|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|

|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|

|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|
User avatar
De3y.
Membru
Membru
Posts: 3
Joined: 6 years ago
Has thanked: 0
Been thanked: 0
Status: Offline

6 years ago

Daca am ajuns sa facem asa ceva .. sincer rusine.
Locked

Return to “Cerere Plugin”