[cerere plugin] skin la admini si vipi

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori

User avatar
Marty17
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 13 Nov 2018, 11:44
Detinator Steam: Da
CS Status: Fondator CSGO.DARKEVILS.RO
Detinator server CS: CSGO.DARKEVILS.RO
SteamID: Marty
Fond eXtream: 0
Contact:

09 Apr 2019, 14:29

Plugin Cerut:skin la admini si vipi
Descriere (adica ce face el mai exact): skin la admini si vipi
Serverul ruleaza (HLDS/ReHLDS):rehlds
Versiune AMX Mod X:1.8.2
Modul Serverului:csgo remake by nubo
sa fie ca asta, imi arata erorile
Am nevoie de acel plugin de skin la admini si vip pentru ca se reseteaza skinurile cand playeri sunt morti si skinul pe jos numai e si apare cel default
Last edited by Laurentiu P. on 13 Apr 2019, 09:47, edited 1 time in total.
eXtreamSHOP
User avatar
Rainq
Manager ZM
Manager ZM
Posts: 2604
Joined: 21 Jul 2015, 18:50
Detinator Steam: Da
CS Status: Busy
Detinator server CS: ---
Reputatie: Fost moderator
Manager ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: Bucuresti
Been thanked: 11 times
Contact:

09 Apr 2019, 21:38

poftim ultimate_who :

Code: Select all

#include <amxmodx>
#include <amxmisc>

#define PLUGIN			"ULTIMATE WHO"
#define VERSION			"1.1"
#define AUTHOR			"P.Of.Pw"

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

#define GROUPS_NAME		14
#define GROUPS_ACCESS		14

#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_meniu_ad_group_msg_bottom	"^n\wPt a esi apasati \y0 \w sau \y5"
#define who_meniu_admin_msg_bottom	"^n\wPt a esi apasati \r0 \w sau \r5"

#define	who_console_top		"=========== Admini Online ==========="
#define	who_console_bottom 	"================================"

new GroupNames[GROUPS_NAME][] = {
	"Detinatori",
	"The Global Elite",
	"Supreme Master",
	"Owneri",
	"eXtream Mod",
	"GoD",
	"Semi-GoD",
	"Master Guardian",
	"Moderatori",
	"Administratori",
	"Gold Nova",
	"Helper",
	"Admin in teste",
	"Slot"
}

new GroupFlags[GROUPS_ACCESS][] = {
	"abcdefghijklmnopqrstu",
	"abcdefghijklmnoprs",
	"bcdefghijkmnoprs",
	"bcdefghijmnoprs",
	"bcdefhijmnoprs",
	"bcdefhijmnprs",
	"bcdefhijmnps",
	"bcdefhijmn",
	"bcdefijm",
	"bcdefi",
	"bcde",
	"bcd",
	"bc",
	"b"
}

new GroupFlagsValue[GROUPS_NAME]

new who_type, who_typemeniu, who_typtable

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")
	who_typtable	= register_cvar("who_typetable","2")
}

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, who_meniu_ad_group_msg_bottom)
	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, who_meniu_admin_msg_bottom)
	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)
{
	switch(get_pcvar_num(who_typtable))
	{
		case 1: table_style_one(id)
		
		case 2: table_style_two(id)
	}
	return 0
}
table_style_one(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
}
table_style_two(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, "<html><head><title>a</title></head>")
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<br><br><center><body><table border>")
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<tr><td><h3><b><font color=^"red^">NUME</td><td></h3></b> <h3><b><font color=^"red^">ACCES</td></h3></font></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><tr><td><h4><b><font color=^"white^">%s<td></b></h4> <h4><b><font color=^"white^">%s </td></h4></font></b></center>", sName, GroupNames[p_of_pw])
			}
		}		
	}
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "</table></body></html>")
	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
}
RETRAS
Image
Leul si tigru sunt mai puternici ca lupul,dar lupul la circ nu participa.
User avatar
DanN
Membru, skill 0
Membru, skill 0
Posts: 70
Joined: 30 Sep 2017, 21:12
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Location: Resita
Has thanked: 2 times
Contact:

09 Apr 2019, 22:11

| Afiseaza codul

#include <amxmodx>
#include <amxmisc>

#define MAX_GROUPS 11

new g_groupFlagsValue[MAX_GROUPS]
new g_groupFlagsValueVIP[MAX_GROUPS]

new g_groupNames[MAX_GROUPS][] = { //aici se afla numele fiecarui grad
"[1]  => Marty    <=",
"[2]  => Fondator <=",
"[3]  => Owner <=",
"[4]  => Co-Owner <=",
"[5]  => God <=",
"[6]  => Semi-God <=",
"[7]  => Moderator <=",
"[8]  => Administrator <=",
"[9]  => Helper <=",
"[10] => V.I.P <=",
"[11] => Slot <="
}

new g_groupFlags[MAX_GROUPS][] = { //aici se afla flagurile doar pentru admine , fara flag-ul t (flag-ul t este cel mai folosit pentru VIP ACCES , eu l-am luat ca exemplu pe acesta).
    "abcdefghijklmnopqrsuv",
    "abcdefghijklmnopqrsu",
    "abcdefghijkmnopqrs",
    "abcdefgijmnopqrs",
    "bcdefgijmnopqrs",
    "bcdefgijmnopqr",
    "bcdefijmnopq",
    "bcdefijmno",
    "bcefijmno",
    "t",
    "b"
}

new g_groupFlagsVIP[MAX_GROUPS][] = { //aici este creeat grupul de flaguri pentru admine+ flagul t. vip acces
    "abcdefghijklmnopqrsuvt",
    "abcdefghijklmnopqrsut",
    "abcdefghijkmnopqrst",
    "abcdefgijmnopqrst",
    "bcdefgijmnopqrst",
    "bcdefgijmnopqrt",
    "bcdefijmnopqt",
    "bcdefijmnot",
    "bcefijmnot",
    "t",
    "b"
}

public plugin_init() {
	
	register_plugin("ultimate_who", "2.0", "CSGO.DARKEVILS.RO");
	register_clcmd("say", "cmdSay")
	register_clcmd("say_team", "cmdSay")
	
	for(new i = 0; i < MAX_GROUPS; i++) {
		g_groupFlagsValue = read_flags(g_groupFlags)
		g_groupFlagsValueVIP = read_flags(g_groupFlagsVIP)
	}

}

public cmdSay(id)
{
	new say[192]
	read_args(say,192)
	if(( containi(say, "who") != -1 ))
		set_task(1.0,"cmdWho",id)
	return PLUGIN_CONTINUE
}

public cmdWho(id) 
{
   new players[32], inum, player, name[32], i, a
   get_players(players, inum)
   console_print(id, "-------------------------------")
   console_print(id, "=========ADMINS ONLINE=========")
   console_print(id, "-------------------------------")
   for(i = 0; i < MAX_GROUPS; i++)
   {
   	console_print(id, "-%s-", g_groupNames)
	for(a = 0; a < inum; ++a)
	{
		player = players[a]
		get_user_name(player, name, 31)
		if(get_user_flags(player) == g_groupFlagsValue || get_user_flags(player) == g_groupFlagsValueVIP)
		{
			console_print(id, "%s", name);
		}
	}
}
   console_print(id, "=========CSGO.DARKEVILS.RO=========")
   console_print(id, "-------------------------------")
   client_cmd(id,"toggleconsole")
   return PLUGIN_HANDLED
}

User avatar
Marty17
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 13 Nov 2018, 11:44
Detinator Steam: Da
CS Status: Fondator CSGO.DARKEVILS.RO
Detinator server CS: CSGO.DARKEVILS.RO
SteamID: Marty
Fond eXtream: 0
Contact:

10 Apr 2019, 16:19

Nu merge cel de la DanN
ultimate_who.sma(58) : error 048: array dimensions do not match
ultimate_who.sma(59) : error 048: array dimensions do not match
ultimate_who.sma(87) : error 033: array must be indexed (variable "g_groupFlagsValue")

3 Errors.
Compilarea a esuat!
User avatar
DanN
Membru, skill 0
Membru, skill 0
Posts: 70
Joined: 30 Sep 2017, 21:12
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Location: Resita
Has thanked: 2 times
Contact:

10 Apr 2019, 20:17

se pare ca variabila I o vede ca pe italic aici pe forum astfel trebuie shimbata
| Afiseaza codul

#include <amxmodx>
#include <amxmisc>

#define MAX_GROUPS 11

new g_groupFlagsValue[MAX_GROUPS]
new g_groupFlagsValueVIP[MAX_GROUPS]

new g_groupNames[MAX_GROUPS][] = { //aici se afla numele fiecarui grad
"[1]  => Marty    <=",
"[2]  => Fondator <=",
"[3]  => Owner <=",
"[4]  => Co-Owner <=",
"[5]  => God <=",
"[6]  => Semi-God <=",
"[7]  => Moderator <=",
"[8]  => Administrator <=",
"[9]  => Helper <=",
"[10] => V.I.P <=",
"[11] => Slot <="
}

new g_groupFlags[MAX_GROUPS][] = { //aici se afla flagurile doar pentru admine , fara flag-ul t (flag-ul t este cel mai folosit pentru VIP ACCES , eu l-am luat ca exemplu pe acesta).
    "abcdefghijklmnopqrsuv",
    "abcdefghijklmnopqrsu",
    "abcdefghijkmnopqrs",
    "abcdefgijmnopqrs",
    "bcdefgijmnopqrs",
    "bcdefgijmnopqr",
    "bcdefijmnopq",
    "bcdefijmno",
    "bcefijmno",
    "t",
    "b"
}

new g_groupFlagsVIP[MAX_GROUPS][] = { //aici este creeat grupul de flaguri pentru admine+ flagul t. vip acces
    "abcdefghijklmnopqrsuvt",
    "abcdefghijklmnopqrsut",
    "abcdefghijkmnopqrst",
    "abcdefgijmnopqrst",
    "bcdefgijmnopqrst",
    "bcdefgijmnopqrt",
    "bcdefijmnopqt",
    "bcdefijmnot",
    "bcefijmnot",
    "t",
    "b"
}

public plugin_init() {
	
	register_plugin("ultimate_who", "2.0", "CSGO.DARKEVILS.RO");
	register_clcmd("say", "cmdSay")
	register_clcmd("say_team", "cmdSay")
	
	for(new z = 0; z < MAX_GROUPS; z++) {
		g_groupFlagsValue[z] = read_flags(g_groupFlags[z])
		g_groupFlagsValueVIP[z] = read_flags(g_groupFlagsVIP[z])
	}

}

public cmdSay(id)
{
	new say[192]
	read_args(say,192)
	if(( containi(say, "who") != -1 ))
		set_task(1.0,"cmdWho",id)
	return PLUGIN_CONTINUE
}

public cmdWho(id) 
{
   new players[32], inum, player, name[32], i, a
   get_players(players, inum)
   console_print(id, "-------------------------------")
   console_print(id, "=========ADMINS ONLINE=========")
   console_print(id, "-------------------------------")
   for(new z = 0; z < MAX_GROUPS; z++)
   {
   	console_print(id, "-%s-", g_groupNames)
	for(a = 0; a < inum; ++a)
	{
		player = players[a]
		get_user_name(player, name, 31)
		if(get_user_flags(player) == g_groupFlagsValue[z] || get_user_flags(player) == g_groupFlagsValueVIP[z])
		{
			console_print(id, "%s", name);
		}
	}
}
   console_print(id, "=========CSGO.DARKEVILS.RO=========")
   console_print(id, "-------------------------------")
   client_cmd(id,"toggleconsole")
   return PLUGIN_HANDLED
}


User avatar
Marty17
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 13 Nov 2018, 11:44
Detinator Steam: Da
CS Status: Fondator CSGO.DARKEVILS.RO
Detinator server CS: CSGO.DARKEVILS.RO
SteamID: Marty
Fond eXtream: 0
Contact:

11 Apr 2019, 19:05

=========ADMINS ONLINE=========
-------------------------------
-,x�P��$��[1] => Marty <=-
Marty
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
=========


asa imi arata in consola
User avatar
Rainq
Manager ZM
Manager ZM
Posts: 2604
Joined: 21 Jul 2015, 18:50
Detinator Steam: Da
CS Status: Busy
Detinator server CS: ---
Reputatie: Fost moderator
Manager ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: Bucuresti
Been thanked: 11 times
Contact:

11 Apr 2019, 19:14

Marty17 wrote:
11 Apr 2019, 19:05
=========ADMINS ONLINE=========
-------------------------------
-,x�P��$��[1] => Marty <=-
Marty
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
-,x�P��$��[1] => Marty <=-
=========


asa imi arata in consola
ala de la mine ce are de nu-l pui?spume pe el?iti editezi tu singur gradele acolo,lasa reply ca nu sti sa-l faci tu ca ti-l fac eu sherlock
RETRAS
Image
Leul si tigru sunt mai puternici ca lupul,dar lupul la circ nu participa.
User avatar
DanN
Membru, skill 0
Membru, skill 0
Posts: 70
Joined: 30 Sep 2017, 21:12
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Location: Resita
Has thanked: 2 times
Contact:

11 Apr 2019, 21:41

Imi pare rau a fost o greseala de a mea fiindca am uitat sa schimb variabila i si la afisarea gradelor in consola.
| Afiseaza codul

#include <amxmodx>
#include <amxmisc>

#define MAX_GROUPS 11

new g_groupFlagsValue[MAX_GROUPS]
new g_groupFlagsValueVIP[MAX_GROUPS]

new g_groupNames[MAX_GROUPS][] = { //aici se afla numele fiecarui grad
"[1]  => Marty    <=",
"[2]  => Fondator <=",
"[3]  => Owner <=",
"[4]  => Co-Owner <=",
"[5]  => God <=",
"[6]  => Semi-God <=",
"[7]  => Moderator <=",
"[8]  => Administrator <=",
"[9]  => Helper <=",
"[10] => V.I.P <=",
"[11] => Slot <="
}

new g_groupFlags[MAX_GROUPS][] = { //aici se afla flagurile doar pentru admine , fara flag-ul t (flag-ul t este cel mai folosit pentru VIP ACCES , eu l-am luat ca exemplu pe acesta).
    "abcdefghijklmnopqrsuv",
    "abcdefghijklmnopqrsu",
    "abcdefghijkmnopqrs",
    "abcdefgijmnopqrs",
    "bcdefgijmnopqrs",
    "bcdefgijmnopqr",
    "bcdefijmnopq",
    "bcdefijmno",
    "bcefijmno",
    "t",
    "b"
}

new g_groupFlagsVIP[MAX_GROUPS][] = { //aici este creeat grupul de flaguri pentru admine+ flagul t. vip acces
    "abcdefghijklmnopqrsuvt",
    "abcdefghijklmnopqrsut",
    "abcdefghijkmnopqrst",
    "abcdefgijmnopqrst",
    "bcdefgijmnopqrst",
    "bcdefgijmnopqrt",
    "bcdefijmnopqt",
    "bcdefijmnot",
    "bcefijmnot",
    "t",
    "b"
}

public plugin_init() {
	
	register_plugin("ultimate_who", "2.0", "CSGO.DARKEVILS.RO");
	register_clcmd("say", "cmdSay")
	register_clcmd("say_team", "cmdSay")
	
	for(new z = 0; z < MAX_GROUPS; z++) {
		g_groupFlagsValue[z] = read_flags(g_groupFlags[z])
		g_groupFlagsValueVIP[z] = read_flags(g_groupFlagsVIP[z])
	}

}

public cmdSay(id)
{
	new say[192]
	read_args(say,192)
	if(( containi(say, "who") != -1 ))
		set_task(1.0,"cmdWho",id)
	return PLUGIN_CONTINUE
}

public cmdWho(id) 
{
   new players[32], inum, player, name[32], z, a
   get_players(players, inum)
   console_print(id, "-------------------------------")
   console_print(id, "=========ADMINS ONLINE=========")
   console_print(id, "-------------------------------")
   for(z = 0; z < MAX_GROUPS; z++)
   {
   	console_print(id, "-%s-", g_groupNames[z])
	for(a = 0; a < inum; ++a)
	{
		player = players[a]
		get_user_name(player, name, 31)
		if(get_user_flags(player) == g_groupFlagsValue[z] || get_user_flags(player) == g_groupFlagsValueVIP[z])
		{
			console_print(id, "%s", name);
		}
	}
}
   console_print(id, "=========CSGO.DARKEVILS.RO=========")
   console_print(id, "-------------------------------")
   client_cmd(id,"toggleconsole")
   return PLUGIN_HANDLED
}


User avatar
Marty17
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 13 Nov 2018, 11:44
Detinator Steam: Da
CS Status: Fondator CSGO.DARKEVILS.RO
Detinator server CS: CSGO.DARKEVILS.RO
SteamID: Marty
Fond eXtream: 0
Contact:

13 Apr 2019, 16:17

Acel who de rainq.trebuie sa trec fiecare grad + vip si la who asta nu trb asa, asa o sa am multe grade
Ms dann, daca ati avea si un plugin de skin la admini, playeri si vipi sa mearga
flag la vip am t
User avatar
DanN
Membru, skill 0
Membru, skill 0
Posts: 70
Joined: 30 Sep 2017, 21:12
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Location: Resita
Has thanked: 2 times
Contact:

13 Apr 2019, 17:59

Pentru playeri pur si simplu schimbi modele din cstrike in cele din csgo, pentru admin https://gamebanana.com/gamefiles/3348
iar la vip

Code: Select all


/* Plugin generated by AMXX-Studio */ 

#include <amxmodx> 
#include <cstrike>  
#include <hamsandwich>  

#define PLUGIN "New Plug-In" 
#define AUTHOR "Constentine" 

public plugin_precache() precache_model("models/player/hatsune_miku.mdl")  
public plugin_init() RegisterHam(Ham_Spawn, "player", "player_spawn", true) 
public player_spawn(id){  
    if(get_user_flags(id) & ADMIN_LEVEL_H){ 
        cs_set_user_model(id, "hatsune_miku")  
    } 
}  

User avatar
Marty17
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 13 Nov 2018, 11:44
Detinator Steam: Da
CS Status: Fondator CSGO.DARKEVILS.RO
Detinator server CS: CSGO.DARKEVILS.RO
SteamID: Marty
Fond eXtream: 0
Contact:

14 Apr 2019, 10:33

| Afiseaza codul
#include <amxmodx>

#define MAX_GROUPS 10


new g_groupNames[MAX_GROUPS][] = { //aici se afla numele fiecarui grad
"[1]-- DetinatoR --",
"[2]-- OwneR --",
"[3]-- Co-OwneR --",
"[4]-- MaresaL --",
"[5]-- GeneraL --",
"[6]-- ColoneL --",
"[7]-- MaioR --",
"[8]-- SergenT --",
"[9]-- Slot --",
"[10]-- V.I.P --"

}

new g_groupFlags[MAX_GROUPS][] = { //aici se afla flagurile doar pentru admine , fara flag-ul t (flag-ul t este cel mai folosit pentru VIP ACCES , eu l-am luat ca exemplu pe acesta).
    "abcdefghijklmnopqrsu",
    "abcdefghijkmnopqrsu",
    "abcdefgijmnopqrsu",
    "bcdefgijmnopqrs",
    "bcdefgijmnopqr",
    "bcdefijmnopq",
    "bcdefijmno",
    "bcefijmno",
    "b",
    "t"
}

new g_groupFlagsVIP[MAX_GROUPS][] = { //aici este creeat grupul de flaguri pentru admine+ flagul t. vip acces
    "abcdefghijklmnopqrsut",
    "abcdefghijkmnopqrsut",
    "abcdefgijmnopqrsut",
    "bcdefgijmnopqrst",
    "bcdefgijmnopqrt",
    "bcdefijmnopqt",
    "bcdefijmnot",
    "bcefijmnot",
    "b",
    "t"
}

   new g_groupFlagsValue[MAX_GROUPS]
   new g_groupFlagsValueVIP[MAX_GROUPS] //am creeat un nou grup pe care pluginul trebuie sa il citeasca

public plugin_init() 
{

   register_plugin("ultimate_who", "2.0", "CS.UDP.RO")
   register_clcmd("say /who","cmdWho")

   for(new i = 0; i < MAX_GROUPS; i++) 
 {
   g_groupFlagsValue = read_flags(g_groupFlags)
   g_groupFlagsValueVIP = read_flags(g_groupFlagsVIP) //citeste flagurile adminelor + vip

 }
}

public cmdWho(id) 
{
   new players[32], inum, player, name[32], i, a
   get_players(players, inum)
   console_print(id, "-------------------------------")
   console_print(id, "=========....:::: Staff of server  ::::....=========")
   console_print(id, "-------------------------------")
   for(i = 0; i < MAX_GROUPS; i++) 
      {
   console_print(id, "-%s-", g_groupNames)
   for(a = 0; a < inum; ++a) 
        {
   player = players[a]
   get_user_name(player, name, 31)
   if(get_user_flags(player) == g_groupFlagsValue || get_user_flags(player) == g_groupFlagsValueVIP) //arata si adminii fara vip si pe cei cu vip 
           {
   console_print(id, "%s", name)
           }
        }
      }
   console_print(id, "=========CS.DARKEVILS.RO=========")
   console_print(id, "-------------------------------")
   client_cmd(id,"toggleconsole")
   return PLUGIN_HANDLED
}








Nu stiu de ce nu se compileaza acesta, ma poti ajuta la el?
User avatar
DanN
Membru, skill 0
Membru, skill 0
Posts: 70
Joined: 30 Sep 2017, 21:12
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Location: Resita
Has thanked: 2 times
Contact:

14 Apr 2019, 12:12

who.sma(58 -- 60) : error 033: array must be indexed (variable "g_groupFlagsValueVIP"

aceste erori apar din cauza ca tu nu ai indexat arrayul pentru variabila g_groupFlagsValueVIP
astfel ca pluginul sa meraga si sa nu mai ai errori trb sa faci asta.

Code: Select all

for(new i = 0; i < MAX_GROUPS; i++) 
{
    // odata ce ai creat un for cu var I automat ai facut un loop pentru verificarea gradelor
  // practic incerci sa citesti incontinu flagurile definite de tine mai sus
   g_groupFlagsValue = read_flags(g_groupFlags)
   g_groupFlagsValueVIP = read_flags(g_groupFlagsVIP) //citeste flagurile adminelor + vip
   // daca faci asa nu se va citi nimic deoarece I nostru nu apare niciunde aici. ca totul sa mearga si sa citeasca la infinit trb sa indexam variabilele
   g_groupFlagsValue[i] = read_flags(g_groupFlags[i])
  g_groupFlagsValueVIP[i] = read_flags(g_groupFlagsVIP[i]
  // astfel I definit mai sus va creste si varabilele vor testa flagurile de mai sus.
}

Code: Select all


who.sma(77) : error 033: array must be indexed (variable "g_groupFlagsValue")
aceasi problema o ai si aici
if(get_user_flags(player) == g_groupFlagsValue || get_user_flags(player) == g_groupFlagsValueVIP)
din nou tu ai o conditie pentru aceste variabile dar ele ca sa fie pe true trb sa il aibe pe i ca factor de numarare incat sa isi deie seama ce flag-uri are adminul si etc.
if(get_user_flags(player) == g_groupFlagsValue[i] || get_user_flags(player) == g_groupFlagsValueVIP[i])

Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest