[rezolvat]Plugin /who

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
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3559
Joined: 02 Apr 2012, 15:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 796 times
Been thanked: 607 times

15 Dec 2013, 15:28

Am luat si eu dupa extreamcs un plugin who care arata adminii intr-un meniu hud si arata si daca are vip sau nu adica spune Da/Nu.Asa se zice ca face el :).
Am scris toate gradele si accesele in plugin,am pus 1 grad fara vip,altu cu vip si tot asa .Flagul de la VIP e litera "t".
.sma e aici | Afiseaza codul
[code]#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Who meniu"
#define VERSION "1.0"
#define AUTHOR "Askwrite"

#define GRUPURI 20
new const TITLU[] = " \w Nume admin    \r | \w Grad \r | \w VIP ";
new const  IESIRE[] = "\yIesire.^n";
new const NOADMINS[] = "\y Nu sunt admini online.";
#pragma semicolon 1

new g_NumeGrade[ GRUPURI ][ ] = {
	
	"DETINATOR",
	"OWNER",
	"OWNER",
	"CO-OWNER",
	"CO-OWNER",
	"GOOD",
	"GOOD",
	"SEMI-GOOD",
	"SEMI-GOOD",
	"MODERATOR",
	"MODERATOR",
	"ADMINISTRATOR",
	"ADMINISTRATOR",
	"MODERATOR",
	"MODERATOR",
	"HELPER",
	"HELPER",
	"SLOT",
	"SLOT",
	"VIP"
	
};

new g_Flaguri[ GRUPURI ][ ] = {
	
 "abcdefghijklmnopqrstu",
 "abcdegfhijmnopqrs",
 "abcdegfhijmnopqrst",
 "bcdefijmnopqrs",
 "bcdefijmnopqrst",
 "bcdefijmnopqr",
 "bcdefijmnopqrt",
 "bcdefijmnopq",
 "bcdefijmnopqt",
 "bcdefijmno",
 "bcdefijmnot",
 "bcefijmno",
 "bcefijmnot",
 "bcefojm",
 "bcefojmt",
 "bcefj",
 "bcefjt",
 "b",
 "bt",
 "t"
	
};


new g_ValueFlaguri[ GRUPURI ];

public plugin_init( ) {
	
	register_plugin( PLUGIN, VERSION, AUTHOR );
	for( new i = 0 ; i < GRUPURI ; i++ ) 
		g_ValueFlaguri[ i ] = read_flags( g_Flaguri[ i ] );
	
	register_clcmd("say /who", "cmdWho");
	register_clcmd("say_team /who", "cmdWho");
	register_clcmd("say /admin", "cmdWho");
	register_clcmd("say_team /admin", "cmdWho");
	register_clcmd("say /admins", "cmdWho");
	register_clcmd("say_team /admins", "cmdWho");
	register_clcmd("say /admini", "cmdWho");
	register_clcmd("say_team /admini", "cmdWho");
	
	
}

public cmdWho( id, page ) {
	
	new MenuName[ 64 ], MenuExitKey[ 32 ];
	
	formatex( MenuName, sizeof ( MenuName ) -1, "%s",  TITLU );
	
	formatex( MenuExitKey, sizeof ( MenuExitKey ) -1, "%s",  IESIRE );
	
	new menu = menu_create(MenuName, "InchidereMeniu");   
	
	if( AdminiON(    )  )
	{
		
		for( new i = 0; i < GRUPURI; i++  )
		{
			AdaugareA( id, menu, i );
		}
	}
	else
	{
		menu_additem( menu, NOADMINS , "1", 0 );
	}
	
	menu_setprop(menu, MPROP_EXITNAME, MenuExitKey );
	
	menu_display(id, menu, page);
	
}


public InchidereMeniu(id, menu, item) {
	if(item == MENU_EXIT)
	{
		menu_destroy( menu );
		return 1;
	}
	
	new data[6], iName[64];
	new iaccess, callback;
	
	menu_item_getinfo(menu, item, iaccess, data,5, iName, 63, callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1,2,3,4,5,6,7:
		{
			menu_destroy( menu );
			return 1;
		}
	}
	
	return 0;
}

public AdaugareA( const id, const menu,  const group  ) {
	
	new AdminMenuMessage[ 32 ][ 64 ],AdminMenuKey[ 32 ][ 32 ], MenuKey = 1;
	
	static Players[ 32 ], Num, Player;
	get_players( Players, Num, "ch" );
	
	for( new x = 0 ; x < Num ; x++ )
	{   
		Player = Players[ x ];
		if( get_user_flags( Player ) == g_ValueFlaguri[ group ] )
		{
			
			formatex( AdminMenuMessage[ MenuKey ], sizeof ( AdminMenuMessage[ ] ) -1, "\w%s \y- | \w%s%s  ",
			gName( Player ), g_NumeGrade[ group ], Player == id ? "\r *" : "" );
			
			formatex( AdminMenuKey[ MenuKey ], sizeof ( AdminMenuKey[ ] ) -1, "%d", MenuKey );
			
			MenuKey++;
		}
	}
	
	for( new z = 1 ; z < MenuKey ; z++ )
	{
		
		menu_additem( menu, AdminMenuMessage[ z ], AdminMenuKey[ z ], 0 );
	}
	
}

stock bool:AdminiON(    ) {
	new bool:AGasiti = false;
	
	static Players[ 32 ], Num, Player;
	get_players( Players, Num, "ch" );
	
	for( new x = 0 ; x < Num ; x++ )
	{   
		Player = Players[ x ];
		for( new i = 0 ; i < GRUPURI ; i++ )
		{
			if( AGasiti ) break;
			if( get_user_flags( Player ) == g_ValueFlaguri[ i ] )
			{
				AGasiti = true;
			}
		}
	}
	
	return AGasiti ? true : false;
}

stock gName( id ) {
	
	new name[ 32 ];
	get_user_name( id, name, sizeof ( name ) -1 );
	
	return name;
}[/code]
Deci ce am gresit ?Ma puteti rezolva :-?
Last edited by CsN^ ;x on 17 Dec 2013, 15:41, edited 1 time in total.
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
Rapidserver
User avatar
alynut
eXtream Mod
eXtream Mod
Posts: 6942
Joined: 02 Jul 2012, 05:31
Detinator Steam: Da
CS Status: In concediu, activez mai rar .
SteamID: alynut991
Reputatie: Fost Administrator
Fost Intermediar
Location: Bucuresti
Has thanked: 159 times
Been thanked: 415 times
Contact:

15 Dec 2013, 16:01

Cineva ?
mvpdan66
Membru, skill 0
Membru, skill 0
Posts: 61
Joined: 19 Aug 2013, 18:57
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 2 times
Been thanked: 3 times
Contact:

15 Dec 2013, 17:21

"DETINATOR",
"OWNER",
"OWNER + VIP",
"CO-OWNER",
"CO-OWNER + VIP",
"GOOD",
"GOOD + VIP",
"SEMI-GOOD",
"SEMI-GOOD +VIP",
"MODERATOR",
"MODERATOR + VIP",
"ADMINISTRATOR",
"ADMINISTRATOR + VIP",
"MODERATOR",
"MODERATOR + VIP",
"HELPER",
"HELPER + VIP",
"SLOT",
"SLOT + VIP",
"VIP"

Incearca asa
Image
Image
! OFERTA ! OWNER+VIP 7 Euro | | CO-OWNER+VIP 5 Euro ! OFERTA ! + 100 ADMINE Free.
Contact Me: Ticatica14@yahoo.com And Skype: Mvpdan66 ! Da un vot http://www.resursecs.com/frags/frag.php ... R3.Cs16.RO Pentru a voota dati click pe link si dati pe Go Go GO . + ca care ma poate ajuta cu 100 voturi pe zi primeste ADMIN + VIP
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3559
Joined: 02 Apr 2012, 15:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 796 times
Been thanked: 607 times

16 Dec 2013, 15:15

mvpdan66 wrote:"DETINATOR",
"OWNER",
"OWNER + VIP",
"CO-OWNER",
"CO-OWNER + VIP",
"GOOD",
"GOOD + VIP",
"SEMI-GOOD",
"SEMI-GOOD +VIP",
"MODERATOR",
"MODERATOR + VIP",
"ADMINISTRATOR",
"ADMINISTRATOR + VIP",
"MODERATOR",
"MODERATOR + VIP",
"HELPER",
"HELPER + VIP",
"SLOT",
"SLOT + VIP",
"VIP"

Incearca asa
Scuze dar nu asa doresc ,uite cum arata el normal
Image
deci asa vreau sa apara nu sa scriu eu +VIP sa scrie Da Nu.
Cineva?
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
alynut
eXtream Mod
eXtream Mod
Posts: 6942
Joined: 02 Jul 2012, 05:31
Detinator Steam: Da
CS Status: In concediu, activez mai rar .
SteamID: alynut991
Reputatie: Fost Administrator
Fost Intermediar
Location: Bucuresti
Has thanked: 159 times
Been thanked: 415 times
Contact:

16 Dec 2013, 18:58

Nimeni ?
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3559
Joined: 02 Apr 2012, 15:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 796 times
Been thanked: 607 times

17 Dec 2013, 14:46

sus,am nevoie de el .
REZOLVAT | Afiseaza codul
[code]#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Who meniu"
#define VERSION "1.0"
#define AUTHOR "Askwrite"

#define GRUPURI 20
new const TITLU[] = " \w Nume admin    \r | \w Grad \r | \w VIP ";
new const  IESIRE[] = "\yIesire.^n";
new const NOADMINS[] = "\y Nu sunt admini online.";
#pragma semicolon 1

new g_NumeGrade[ GRUPURI ][ ] = {
	
	"DETINATOR | \rDA",
	"OWNER | \rNU",
	"OWNER | \rDA",
	"CO-OWNER | \rNU",
	"CO-OWNER | \rDA",
	"GOOD | \rNU",
	"GOOD | \rDA",
	"SEMI-GOOD | \rNU",
	"SEMI-GOOD | \rDA",
	"MODERATOR | \rNU",
	"MODERATOR | \rDA",
	"ADMINISTRATOR | \rNU",
	"ADMINISTRATOR | \rDA",
	"MODERATOR | \rNU",
	"MODERATOR | \rDA",
	"HELPER | \rNU",
	"HELPER | \rDA",
	"SLOT | \rDA",
	"SLOT | \rNU",
	"VIP | \rDA"
	
};

new g_Flaguri[ GRUPURI ][ ] = {
	
 "abcdefghijklmnopqrstu",
 "abcdegfhijmnopqrs",
 "abcdegfhijmnopqrst",
 "bcdefijmnopqrs",
 "bcdefijmnopqrst",
 "bcdefijmnopqr",
 "bcdefijmnopqrt",
 "bcdefijmnopq",
 "bcdefijmnopqt",
 "bcdefijmno",
 "bcdefijmnot",
 "bcefijmno",
 "bcefijmnot",
 "bcefojm",
 "bcefojmt",
 "bcefj",
 "bcefjt",
 "b",
 "bt",
 "t"
	
};


new g_ValueFlaguri[ GRUPURI ];

public plugin_init( ) {
	
	register_plugin( PLUGIN, VERSION, AUTHOR );
	for( new i = 0 ; i < GRUPURI ; i++ ) 
		g_ValueFlaguri[ i ] = read_flags( g_Flaguri[ i ] );
	
	register_clcmd("say /who", "cmdWho");
	register_clcmd("say_team /who", "cmdWho");
	register_clcmd("say /admin", "cmdWho");
	register_clcmd("say_team /admin", "cmdWho");
	register_clcmd("say /admins", "cmdWho");
	register_clcmd("say_team /admins", "cmdWho");
	register_clcmd("say /admini", "cmdWho");
	register_clcmd("say_team /admini", "cmdWho");
	
	
}

public cmdWho( id, page ) {
	
	new MenuName[ 64 ], MenuExitKey[ 32 ];
	
	formatex( MenuName, sizeof ( MenuName ) -1, "%s",  TITLU );
	
	formatex( MenuExitKey, sizeof ( MenuExitKey ) -1, "%s",  IESIRE );
	
	new menu = menu_create(MenuName, "InchidereMeniu");   
	
	if( AdminiON(    )  )
	{
		
		for( new i = 0; i < GRUPURI; i++  )
		{
			AdaugareA( id, menu, i );
		}
	}
	else
	{
		menu_additem( menu, NOADMINS , "1", 0 );
	}
	
	menu_setprop(menu, MPROP_EXITNAME, MenuExitKey );
	
	menu_display(id, menu, page);
	
}


public InchidereMeniu(id, menu, item) {
	if(item == MENU_EXIT)
	{
		menu_destroy( menu );
		return 1;
	}
	
	new data[6], iName[64];
	new iaccess, callback;
	
	menu_item_getinfo(menu, item, iaccess, data,5, iName, 63, callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1,2,3,4,5,6,7:
		{
			menu_destroy( menu );
			return 1;
		}
	}
	
	return 0;
}

public AdaugareA( const id, const menu,  const group  ) {
	
	new AdminMenuMessage[ 32 ][ 64 ],AdminMenuKey[ 32 ][ 32 ], MenuKey = 1;
	
	static Players[ 32 ], Num, Player;
	get_players( Players, Num, "ch" );
	
	for( new x = 0 ; x < Num ; x++ )
	{   
		Player = Players[ x ];
		if( get_user_flags( Player ) == g_ValueFlaguri[ group ] )
		{
			
			formatex( AdminMenuMessage[ MenuKey ], sizeof ( AdminMenuMessage[ ] ) -1, "\w%s \y- | \w%s%s  ",
			gName( Player ), g_NumeGrade[ group ], Player == id ? "\r *" : "" );
			
			formatex( AdminMenuKey[ MenuKey ], sizeof ( AdminMenuKey[ ] ) -1, "%d", MenuKey );
			
			MenuKey++;
		}
	}
	
	for( new z = 1 ; z < MenuKey ; z++ )
	{
		
		menu_additem( menu, AdminMenuMessage[ z ], AdminMenuKey[ z ], 0 );
	}
	
}

stock bool:AdminiON(    ) {
	new bool:AGasiti = false;
	
	static Players[ 32 ], Num, Player;
	get_players( Players, Num, "ch" );
	
	for( new x = 0 ; x < Num ; x++ )
	{   
		Player = Players[ x ];
		for( new i = 0 ; i < GRUPURI ; i++ )
		{
			if( AGasiti ) break;
			if( get_user_flags( Player ) == g_ValueFlaguri[ i ] )
			{
				AGasiti = true;
			}
		}
	}
	
	return AGasiti ? true : false;
}

stock gName( id ) {
	
	new name[ 32 ];
	get_user_name( id, name, sizeof ( name ) -1 );
	
	return name;
}[/code]
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests