Cerere who [rezolvat!]

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
Chappy
Membru, skill +4
Membru, skill +4
Posts: 1794
Joined: 25 Mar 2013, 11:10
Detinator Steam: Da
Detinator server CS: Nu
SteamID: -
Location: Suceava
Has thanked: 59 times
Been thanked: 65 times

19 Aug 2013, 20:40

Salut, vreau si eu un plugin de /who , /admin , /admins in chat.Vreau sa apara intr'un motd , iar fiecare admin sa apara in fata numelui sau Gradul.
Uitati o poza Image
Exemplu : 1l13 Detinator
nume Slot
Grade si accese le voi pune eu.Ofer multumesc
red# Wrote:
am stat ieri cam toata ziua prin baneasa. la fiecare 2-3minute trecea un avion.
dupa cum se auzea pareau a fi avioane de viteza..
incepe razboiul?

=))) Taran
RoyalServer 2
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

19 Aug 2013, 20:48

Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
Chappy
Membru, skill +4
Membru, skill +4
Posts: 1794
Joined: 25 Mar 2013, 11:10
Detinator Steam: Da
Detinator server CS: Nu
SteamID: -
Location: Suceava
Has thanked: 59 times
Been thanked: 65 times

19 Aug 2013, 20:52

Asta il vreau , doar ca imi da eroare la compilare si nu stiu cum sa fac sa'mi arate doar ca in poza de mai sus, compilatimi'l voi va rog.Uitati gradele
"--- Owner & Manager ---", Grade: "abcdefghijklmnopqrstuqx"


"--- Supreme---", Grade: "abcdefghijklmnopqrstu"


"--- ImperaToR ---", Grade: "abcdefghijklmnopqr"


"--- V.I.P ---", Grade: "abcdefghijklmn"


"--- AdministratoR ---", Grade: "abcdefghijk"


"--- ModeratoR ---", Grade: "abcdefgh"


"--- HelpeR ---", Grade: "abcdzqx"


"--- JunioR ---", Grade: "abcdz"


"--- Super Slot ---", Grade: "abc"


"--- SloT ---" Grade: "ab"
red# Wrote:
am stat ieri cam toata ziua prin baneasa. la fiecare 2-3minute trecea un avion.
dupa cum se auzea pareau a fi avioane de viteza..
incepe razboiul?

=))) Taran
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

19 Aug 2013, 20:56

Paia ce sa compilam lasa sursa .. :|
ia de aici sursa si modifici tu gradele si accesele | Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define PLUGIN			"ULTIMATE Who"
#define VERSION			"1.0"
#define AUTHOR			"P.Of.Pw"

#define CharsMax(%1)		sizeof %1 - 1
#define time_shower		1.0

#define GROUPS_NAME		8 // --> Pui cate grade ai (trebuie sa fie la fel)
#define GROUPS_ACCESS		8 // --> Pui cate accese ai (trebuie sa fie la fel)

#define RRR			255
#define GGG			255
#define BBB			255
#define time_hud		12.0

#define motd_msg		"Admin's Online"
#define who_meniu_ad_group_msg	"\y-=[Admin's]=- \r-=[Online]=-^n"
#define who_meniu_admin_msg	"\y-=[Admin's]=- \w-=[Online]=-^n^n"
#define	who_console_top		"=========== Admini Online ==========="
#define	who_console_bottom 	"================================"

new GroupNames[GROUPS_NAME][] = {
	"V.I.P SeRveR",
	"OwNeR",
	"Co-OwNeR",
	"AmiRaL",
	"MaReSaL",
	"GeNeRaL",
	"CoLoNeL",
	"TiLiCaR" // --> la ultima nu mai trebuie sa aiba ,
}

new GroupFlags[GROUPS_ACCESS][] = {
	"abcdefghijklmnopqrstu",
	"abcdefghijkmnopqrstu",
	"abcdefijmnopqrstu",
	"abcdefijmnopqrs",
	"abcdefijmnopq",
	"abcdefijmno",
	"abcdefijmn",
	"abcei" // --> la ultima nu mai trebuie sa aiba ,
}

new GroupFlagsValue[GROUPS_NAME]

new who_type, who_typemeniu

public plugin_init() {
   
	register_plugin(PLUGIN, VERSION, AUTHOR)
   
	for(new p_of_pw = 0 ; p_of_pw < GROUPS_NAME ; p_of_pw++)
		GroupFlagsValue[p_of_pw] = read_flags(GroupFlags[p_of_pw])
   
	register_clcmd("say", "cmdSay")
	register_clcmd("say_team", "cmdSay")
	
	who_type = register_cvar("cmd_who","1")
	who_typemeniu = register_cvar("who_typemeniu","1")
}

public cmdSay(id)
{
	new say[192]
	read_args(say,192)
	if(( containi(say, "who") != -1 || containi(say, "admin") != -1 || containi(say, "admins") != -1  || contain(say, "/who") != -1 || contain(say, "/admin") != -1 || contain(say, "/admins") != -1))
		set_task(time_shower,"cmdULTMWho",id)
	return PLUGIN_CONTINUE
}

public cmdULTMWho(id)
{
	switch(get_pcvar_num(who_type))
	{
		case 1: who_meniu(id)
		
		case 2: who_motd(id)
		
		case 3: who_table(id)
		
		case 4: who_hud(id)
		
		case 5: who_console(id)
		
	}
	return 0
}

who_meniu(id)
{
	switch(get_pcvar_num(who_typemeniu))
	{
		case 1: who_meniu_admin_groups(id)
		
		case 2: who_meniu_admin(id)
	}
	return 0
}
who_meniu_admin_groups(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]
	new szMenu[256], nLen, keys
	
	nLen = format(szMenu[nLen], 255, who_meniu_ad_group_msg)
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		nLen += format(szMenu[nLen], 255-nLen,"\r%s^n", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				nLen += format(szMenu[nLen], 255-nLen,"\w%s^n", sName)
			}   
		}
	}
	nLen += format(szMenu[nLen], 255-nLen,"^n\wPt a esi apasa \y0 \w sau \y5" )
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
	show_menu(id,keys,szMenu,-1)
	return 0
}

who_meniu_admin(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]
	new szMenu[256], nLen, keys
   
	nLen = format(szMenu[nLen], 255, who_meniu_admin_msg)
  
	get_players(sPlayers, iNum, "ch")
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				nLen += format(szMenu[nLen], 255-nLen,"\r%s^n", sName)
			}   
		}
	}
	nLen += format(szMenu[nLen], 255-nLen,"^n\wPt a esi apasa \y0 \w sau \y5" )
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
	show_menu(id,keys,szMenu,-1)
	return 0
}

who_motd(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
   
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h5><font color=^"red^">%s^n</font></h5></center>", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center>%s^n</center>", sName)
			}
		}		
	}
	show_motd(id, sBuffer, motd_msg)
	return 0

}

who_table(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h3><b><font color=^"red^">NUME			-	ACCES</font></h3></b></center>")
	
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
		
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h4><font color=^"white^">%s		%s^n</font></h4></center>", sName, GroupNames[p_of_pw])
			}
		}		
	}
	show_motd(id, sBuffer, motd_msg)
	return 0
}

who_hud(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "=== %s ===^n", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "%s^n", sName)
			}
		}		
	}
	set_hudmessage(RRR, GGG, BBB, 0.02, 0.24, 0, 6.0, time_hud)
	show_hudmessage(id, sBuffer)
	return 0
}

who_console(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]

	get_players(sPlayers, iNum)
	console_print(id, who_console_top)
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME; p_of_pw++) 
	{
		for(new a = 0; a < iNum ; a++)
		{
			
			iPlayer = sPlayers[a]
			get_user_name(iPlayer, sName, sizeof sName - 1)
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw]) 
				console_print(id, "= %d = %s : %s", p_of_pw+1, GroupNames[p_of_pw], sName)
			
			
		}
	}
	console_print(id, who_console_bottom)
	return 0
}
Pui asta in amxx.cfg

Code: Select all

cmd_who 3- adminii îi afiseaza 'sub forma unui tabel'
Last edited by CsN^ ;x on 19 Aug 2013, 21:00, edited 2 times in total.
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 22:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 342 times
Been thanked: 571 times
Contact:

19 Aug 2013, 20:57

1l13 wrote:
Asta il vreau , doar ca imi da eroare la compilare si nu stiu cum sa fac sa'mi arate doar ca in poza de mai sus, compilatimi'l voi va rog.Uitati gradele
"--- Owner & Manager ---", Grade: "abcdefghijklmnopqrstuqx"


"--- Supreme---", Grade: "abcdefghijklmnopqrstu"


"--- ImperaToR ---", Grade: "abcdefghijklmnopqr"


"--- V.I.P ---", Grade: "abcdefghijklmn"


"--- AdministratoR ---", Grade: "abcdefghijk"


"--- ModeratoR ---", Grade: "abcdefgh"


"--- HelpeR ---", Grade: "abcdzqx"


"--- JunioR ---", Grade: "abcdz"


"--- Super Slot ---", Grade: "abc"


"--- SloT ---" Grade: "ab"
Fa-l tu, iar apoi posteaza sursa cu eroriile.
Retras
User avatar
Chappy
Membru, skill +4
Membru, skill +4
Posts: 1794
Joined: 25 Mar 2013, 11:10
Detinator Steam: Da
Detinator server CS: Nu
SteamID: -
Location: Suceava
Has thanked: 59 times
Been thanked: 65 times

19 Aug 2013, 20:59

Rainq wrote:
1l13 wrote:
Asta il vreau , doar ca imi da eroare la compilare si nu stiu cum sa fac sa'mi arate doar ca in poza de mai sus, compilatimi'l voi va rog.Uitati gradele
"--- Owner & Manager ---", Grade: "abcdefghijklmnopqrstuqx"


"--- Supreme---", Grade: "abcdefghijklmnopqrstu"


"--- ImperaToR ---", Grade: "abcdefghijklmnopqr"


"--- V.I.P ---", Grade: "abcdefghijklmn"


"--- AdministratoR ---", Grade: "abcdefghijk"


"--- ModeratoR ---", Grade: "abcdefgh"


"--- HelpeR ---", Grade: "abcdzqx"


"--- JunioR ---", Grade: "abcdz"


"--- Super Slot ---", Grade: "abc"


"--- SloT ---" Grade: "ab"
Fa-l tu, iar apoi posteaza sursa cu eroriile.
Pai nu stiu pe care sa'l aleg dintre alea , nu stiu care arata ca in poza
red# Wrote:
am stat ieri cam toata ziua prin baneasa. la fiecare 2-3minute trecea un avion.
dupa cum se auzea pareau a fi avioane de viteza..
incepe razboiul?

=))) Taran
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

19 Aug 2013, 21:01

Vezi mai sus ti-am editat eu acolo ,ti-am pus si cum sa iti apara tu doar puneti gradele ;)
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
Chappy
Membru, skill +4
Membru, skill +4
Posts: 1794
Joined: 25 Mar 2013, 11:10
Detinator Steam: Da
Detinator server CS: Nu
SteamID: -
Location: Suceava
Has thanked: 59 times
Been thanked: 65 times

19 Aug 2013, 21:21

Imi da eroare la compilare , uitati .Sma
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define PLUGIN			"ULTIMATE Who"
#define VERSION			"1.0"
#define AUTHOR			"P.Of.Pw"

#define CharsMax(%1)		sizeof %1 - 1
#define time_shower		1.0

#define GROUPS_NAME		10// --> Pui cate grade ai (trebuie sa fie la fel)
#define GROUPS_ACCESS		10// --> Pui cate accese ai (trebuie sa fie la fel)

#define RRR			255
#define GGG			255
#define BBB			255
#define time_hud		12.0

#define motd_msg		"Admin's Online"
#define who_meniu_ad_group_msg	"y-=[Admin's]=- r-=[Online]=-^n"
#define who_meniu_admin_msg	"y-=[Admin's]=- w-=[Online]=-^n^n"
#define	who_console_top		"=========== Admini Online ==========="
#define	who_console_bottom 	"================================"

new GroupNames[GROUPS_NAME][] = {
	"--- Owner & Manager ---", 
	"--- Supreme---", 
	"--- ImperaToR ---", 
	"--- V.I.P ---", 
	"--- AdministratoR ---", 
	"--- ModeratoR ---", 
	"--- HelpeR ---", 
        "--- JunioR ---",
        "--- Super Slot ---", 
        "--- SloT ---" 
}

new GroupFlags[GROUPS_ACCESS][] = {
	"abcdefghijklmnopqrstuqx"
	"abcdefghijklmnopqrstu"
	"abcdefghijklmnopqr"
	"abcde",
	"abcdefghijk"
	"abcdefgh"
	"abcdzqx",
	"abcdz",
        "abc",
        "ab"
}

new GroupFlagsValue[GROUPS_NAME]

new who_type, who_typemeniu

public plugin_init() {
   
	register_plugin(PLUGIN, VERSION, AUTHOR)
   
	for(new p_of_pw = 0 ; p_of_pw < GROUPS_NAME ; p_of_pw++)
		GroupFlagsValue[p_of_pw] = read_flags(GroupFlags[p_of_pw])
   
	register_clcmd("say", "cmdSay")
	register_clcmd("say_team", "cmdSay")
	
	who_type = register_cvar("cmd_who","1")
	who_typemeniu = register_cvar("who_typemeniu","1")
}

public cmdSay(id)
{
	new say[192]
	read_args(say,192)
	if(( containi(say, "who") != -1 || containi(say, "admin") != -1 || containi(say, "admins") != -1  || contain(say, "/who") != -1 || contain(say, "/admin") != -1 || contain(say, "/admins") != -1))
		set_task(time_shower,"cmdULTMWho",id)
	return PLUGIN_CONTINUE
}

public cmdULTMWho(id)
{
	switch(get_pcvar_num(who_type))
	{
		case 1: who_meniu(id)
		
		case 2: who_motd(id)
		
		case 3: who_table(id)
		
		case 4: who_hud(id)
		
		case 5: who_console(id)
		
	}
	return 0
}

who_meniu(id)
{
	switch(get_pcvar_num(who_typemeniu))
	{
		case 1: who_meniu_admin_groups(id)
		
		case 2: who_meniu_admin(id)
	}
	return 0
}
who_meniu_admin_groups(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]
	new szMenu[256], nLen, keys
	
	nLen = format(szMenu[nLen], 255, who_meniu_ad_group_msg)
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		nLen += format(szMenu[nLen], 255-nLen,"r%s^n", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				nLen += format(szMenu[nLen], 255-nLen,"w%s^n", sName)
			}   
		}
	}
	nLen += format(szMenu[nLen], 255-nLen,"^nwPt a esi apasa y0 w sau y5" )
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
	show_menu(id,keys,szMenu,-1)
	return 0
}

who_meniu_admin(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]
	new szMenu[256], nLen, keys
   
	nLen = format(szMenu[nLen], 255, who_meniu_admin_msg)
  
	get_players(sPlayers, iNum, "ch")
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				nLen += format(szMenu[nLen], 255-nLen,"r%s^n", sName)
			}   
		}
	}
	nLen += format(szMenu[nLen], 255-nLen,"^nwPt a esi apasa y0 w sau y5" )
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
	show_menu(id,keys,szMenu,-1)
	return 0
}

who_motd(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
   
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h5><font color=^"red^">%s^n</font></h5></center>", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center>%s^n</center>", sName)
			}
		}		
	}
	show_motd(id, sBuffer, motd_msg)
	return 0

}

who_table(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h3><b><font color=^"red^">NUME			-	ACCES</font></h3></b></center>")
	
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
		
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h4><font color=^"white^">%s		%s^n</font></h4></center>", sName, GroupNames[p_of_pw])
			}
		}		
	}
	show_motd(id, sBuffer, motd_msg)
	return 0
}

who_hud(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "=== %s ===^n", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "%s^n", sName)
			}
		}		
	}
	set_hudmessage(RRR, GGG, BBB, 0.02, 0.24, 0, 6.0, time_hud)
	show_hudmessage(id, sBuffer)
	return 0
}

who_console(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]

	get_players(sPlayers, iNum)
	console_print(id, who_console_top)
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME; p_of_pw++) 
	{
		for(new a = 0; a < iNum ; a++)
		{
			
			iPlayer = sPlayers[a]
			get_user_name(iPlayer, sName, sizeof sName - 1)
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw]) 
				console_print(id, "= %d = %s : %s", p_of_pw+1, GroupNames[p_of_pw], sName)
			
			
		}
	}
	console_print(id, who_console_bottom)
	return 0
}
Eroare /tmp/text4Y8Frl.sma(40) : error 001: expected token: "}", but found "-string-"

1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/text4Y8Frl.amx (compile failed).
red# Wrote:
am stat ieri cam toata ziua prin baneasa. la fiecare 2-3minute trecea un avion.
dupa cum se auzea pareau a fi avioane de viteza..
incepe razboiul?

=))) Taran
User avatar
tweky
Fost moderator
Fost moderator
Posts: 2705
Joined: 22 Jun 2009, 01:54
Detinator Steam: Da
CS Status: Inactiv
Detinator server CS: Da
SteamID: twekymihai
Reputatie: Fost eXtream Mod
Nume anterior: Mihaita
Fost Membru Club eXtreamCS
Location: Ilfov
Has thanked: 126 times
Been thanked: 173 times

19 Aug 2013, 21:24

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define PLUGIN			"ULTIMATE Who"
#define VERSION			"1.0"
#define AUTHOR			"P.Of.Pw"

#define CharsMax(%1)		sizeof %1 - 1
#define time_shower		1.0

#define GROUPS_NAME		10// --> Pui cate grade ai (trebuie sa fie la fel)
#define GROUPS_ACCESS		10// --> Pui cate accese ai (trebuie sa fie la fel)

#define RRR			255
#define GGG			255
#define BBB			255
#define time_hud		12.0

#define motd_msg		"Admin's Online"
#define who_meniu_ad_group_msg	"y-=[Admin's]=- r-=[Online]=-^n"
#define who_meniu_admin_msg	"y-=[Admin's]=- w-=[Online]=-^n^n"
#define	who_console_top		"=========== Admini Online ==========="
#define	who_console_bottom 	"================================"

new GroupNames[GROUPS_NAME][] = {
	"--- Owner & Manager ---", 
	"--- Supreme---", 
	"--- ImperaToR ---", 
	"--- V.I.P ---", 
	"--- AdministratoR ---", 
	"--- ModeratoR ---", 
	"--- HelpeR ---", 
        "--- JunioR ---",
        "--- Super Slot ---", 
        "--- SloT ---" 
}

new GroupFlags[GROUPS_ACCESS][] = {
	"abcdefghijklmnopqrstuqx",
	"abcdefghijklmnopqrstu",
	"abcdefghijklmnopqr",
	"abcde",
	"abcdefghijk",
	"abcdefgh",
	"abcdzqx",
	"abcdz",
        "abc",
        "ab"
}

new GroupFlagsValue[GROUPS_NAME]

new who_type, who_typemeniu

public plugin_init() {
   
	register_plugin(PLUGIN, VERSION, AUTHOR)
   
	for(new p_of_pw = 0 ; p_of_pw < GROUPS_NAME ; p_of_pw++)
		GroupFlagsValue[p_of_pw] = read_flags(GroupFlags[p_of_pw])
   
	register_clcmd("say", "cmdSay")
	register_clcmd("say_team", "cmdSay")
	
	who_type = register_cvar("cmd_who","1")
	who_typemeniu = register_cvar("who_typemeniu","1")
}

public cmdSay(id)
{
	new say[192]
	read_args(say,192)
	if(( containi(say, "who") != -1 || containi(say, "admin") != -1 || containi(say, "admins") != -1  || contain(say, "/who") != -1 || contain(say, "/admin") != -1 || contain(say, "/admins") != -1))
		set_task(time_shower,"cmdULTMWho",id)
	return PLUGIN_CONTINUE
}

public cmdULTMWho(id)
{
	switch(get_pcvar_num(who_type))
	{
		case 1: who_meniu(id)
		
		case 2: who_motd(id)
		
		case 3: who_table(id)
		
		case 4: who_hud(id)
		
		case 5: who_console(id)
		
	}
	return 0
}

who_meniu(id)
{
	switch(get_pcvar_num(who_typemeniu))
	{
		case 1: who_meniu_admin_groups(id)
		
		case 2: who_meniu_admin(id)
	}
	return 0
}
who_meniu_admin_groups(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]
	new szMenu[256], nLen, keys
	
	nLen = format(szMenu[nLen], 255, who_meniu_ad_group_msg)
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		nLen += format(szMenu[nLen], 255-nLen,"r%s^n", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				nLen += format(szMenu[nLen], 255-nLen,"w%s^n", sName)
			}   
		}
	}
	nLen += format(szMenu[nLen], 255-nLen,"^nwPt a esi apasa y0 w sau y5" )
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
	show_menu(id,keys,szMenu,-1)
	return 0
}

who_meniu_admin(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]
	new szMenu[256], nLen, keys
   
	nLen = format(szMenu[nLen], 255, who_meniu_admin_msg)
  
	get_players(sPlayers, iNum, "ch")
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				nLen += format(szMenu[nLen], 255-nLen,"r%s^n", sName)
			}   
		}
	}
	nLen += format(szMenu[nLen], 255-nLen,"^nwPt a esi apasa y0 w sau y5" )
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
	show_menu(id,keys,szMenu,-1)
	return 0
}

who_motd(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
   
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h5><font color=^"red^">%s^n</font></h5></center>", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center>%s^n</center>", sName)
			}
		}		
	}
	show_motd(id, sBuffer, motd_msg)
	return 0

}

who_table(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h3><b><font color=^"red^">NUME			-	ACCES</font></h3></b></center>")
	
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
		
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h4><font color=^"white^">%s		%s^n</font></h4></center>", sName, GroupNames[p_of_pw])
			}
		}		
	}
	show_motd(id, sBuffer, motd_msg)
	return 0
}

who_hud(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "=== %s ===^n", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "%s^n", sName)
			}
		}		
	}
	set_hudmessage(RRR, GGG, BBB, 0.02, 0.24, 0, 6.0, time_hud)
	show_hudmessage(id, sBuffer)
	return 0
}

who_console(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]

	get_players(sPlayers, iNum)
	console_print(id, who_console_top)
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME; p_of_pw++) 
	{
		for(new a = 0; a < iNum ; a++)
		{
			
			iPlayer = sPlayers[a]
			get_user_name(iPlayer, sName, sizeof sName - 1)
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw]) 
				console_print(id, "= %d = %s : %s", p_of_pw+1, GroupNames[p_of_pw], sName)
			
			
		}
	}
	console_print(id, who_console_bottom)
	return 0
}
my website
:hand_over_mouth: :ghosts:

1. vevios.ro

2. minios.ro
User avatar
Chappy
Membru, skill +4
Membru, skill +4
Posts: 1794
Joined: 25 Mar 2013, 11:10
Detinator Steam: Da
Detinator server CS: Nu
SteamID: -
Location: Suceava
Has thanked: 59 times
Been thanked: 65 times

19 Aug 2013, 21:26

TwEky wrote:
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define PLUGIN			"ULTIMATE Who"
#define VERSION			"1.0"
#define AUTHOR			"P.Of.Pw"

#define CharsMax(%1)		sizeof %1 - 1
#define time_shower		1.0

#define GROUPS_NAME		10// --> Pui cate grade ai (trebuie sa fie la fel)
#define GROUPS_ACCESS		10// --> Pui cate accese ai (trebuie sa fie la fel)

#define RRR			255
#define GGG			255
#define BBB			255
#define time_hud		12.0

#define motd_msg		"Admin's Online"
#define who_meniu_ad_group_msg	"y-=[Admin's]=- r-=[Online]=-^n"
#define who_meniu_admin_msg	"y-=[Admin's]=- w-=[Online]=-^n^n"
#define	who_console_top		"=========== Admini Online ==========="
#define	who_console_bottom 	"================================"

new GroupNames[GROUPS_NAME][] = {
	"--- Owner & Manager ---", 
	"--- Supreme---", 
	"--- ImperaToR ---", 
	"--- V.I.P ---", 
	"--- AdministratoR ---", 
	"--- ModeratoR ---", 
	"--- HelpeR ---", 
        "--- JunioR ---",
        "--- Super Slot ---", 
        "--- SloT ---" 
}

new GroupFlags[GROUPS_ACCESS][] = {
	"abcdefghijklmnopqrstuqx",
	"abcdefghijklmnopqrstu",
	"abcdefghijklmnopqr",
	"abcde",
	"abcdefghijk",
	"abcdefgh",
	"abcdzqx",
	"abcdz",
        "abc",
        "ab"
}

new GroupFlagsValue[GROUPS_NAME]

new who_type, who_typemeniu

public plugin_init() {
   
	register_plugin(PLUGIN, VERSION, AUTHOR)
   
	for(new p_of_pw = 0 ; p_of_pw < GROUPS_NAME ; p_of_pw++)
		GroupFlagsValue[p_of_pw] = read_flags(GroupFlags[p_of_pw])
   
	register_clcmd("say", "cmdSay")
	register_clcmd("say_team", "cmdSay")
	
	who_type = register_cvar("cmd_who","1")
	who_typemeniu = register_cvar("who_typemeniu","1")
}

public cmdSay(id)
{
	new say[192]
	read_args(say,192)
	if(( containi(say, "who") != -1 || containi(say, "admin") != -1 || containi(say, "admins") != -1  || contain(say, "/who") != -1 || contain(say, "/admin") != -1 || contain(say, "/admins") != -1))
		set_task(time_shower,"cmdULTMWho",id)
	return PLUGIN_CONTINUE
}

public cmdULTMWho(id)
{
	switch(get_pcvar_num(who_type))
	{
		case 1: who_meniu(id)
		
		case 2: who_motd(id)
		
		case 3: who_table(id)
		
		case 4: who_hud(id)
		
		case 5: who_console(id)
		
	}
	return 0
}

who_meniu(id)
{
	switch(get_pcvar_num(who_typemeniu))
	{
		case 1: who_meniu_admin_groups(id)
		
		case 2: who_meniu_admin(id)
	}
	return 0
}
who_meniu_admin_groups(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]
	new szMenu[256], nLen, keys
	
	nLen = format(szMenu[nLen], 255, who_meniu_ad_group_msg)
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		nLen += format(szMenu[nLen], 255-nLen,"r%s^n", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				nLen += format(szMenu[nLen], 255-nLen,"w%s^n", sName)
			}   
		}
	}
	nLen += format(szMenu[nLen], 255-nLen,"^nwPt a esi apasa y0 w sau y5" )
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
	show_menu(id,keys,szMenu,-1)
	return 0
}

who_meniu_admin(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]
	new szMenu[256], nLen, keys
   
	nLen = format(szMenu[nLen], 255, who_meniu_admin_msg)
  
	get_players(sPlayers, iNum, "ch")
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				nLen += format(szMenu[nLen], 255-nLen,"r%s^n", sName)
			}   
		}
	}
	nLen += format(szMenu[nLen], 255-nLen,"^nwPt a esi apasa y0 w sau y5" )
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
	show_menu(id,keys,szMenu,-1)
	return 0
}

who_motd(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
   
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h5><font color=^"red^">%s^n</font></h5></center>", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center>%s^n</center>", sName)
			}
		}		
	}
	show_motd(id, sBuffer, motd_msg)
	return 0

}

who_table(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h3><b><font color=^"red^">NUME			-	ACCES</font></h3></b></center>")
	
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
		
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h4><font color=^"white^">%s		%s^n</font></h4></center>", sName, GroupNames[p_of_pw])
			}
		}		
	}
	show_motd(id, sBuffer, motd_msg)
	return 0
}

who_hud(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "=== %s ===^n", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "%s^n", sName)
			}
		}		
	}
	set_hudmessage(RRR, GGG, BBB, 0.02, 0.24, 0, 6.0, time_hud)
	show_hudmessage(id, sBuffer)
	return 0
}

who_console(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]

	get_players(sPlayers, iNum)
	console_print(id, who_console_top)
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME; p_of_pw++) 
	{
		for(new a = 0; a < iNum ; a++)
		{
			
			iPlayer = sPlayers[a]
			get_user_name(iPlayer, sName, sizeof sName - 1)
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw]) 
				console_print(id, "= %d = %s : %s", p_of_pw+1, GroupNames[p_of_pw], sName)
			
			
		}
	}
	console_print(id, who_console_bottom)
	return 0
}
Va multumesc , Ati primit multumesc amandoi
red# Wrote:
am stat ieri cam toata ziua prin baneasa. la fiecare 2-3minute trecea un avion.
dupa cum se auzea pareau a fi avioane de viteza..
incepe razboiul?

=))) Taran
Post Reply

Return to “Cereri”

  • Information