Cerere plugins

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
.::Ken{Z}or::.
Membru, skill 0
Membru, skill 0
Posts: 13
Joined: 06 Jan 2012, 01:28
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

29 Jul 2012, 14:11

1.Primul plugins as vrea daca se poate cand sa scriu in chat /who /admins /admin sa apare gradele astea
-==Owner Root Acces==-
-==Owner==-
-==Co-Owner==-
-==Maresal==-
-==God`s==-
-==Semi-God`s==-
-==Moderator==-
-==Administrator==-
-==Helper==-
-==Slot==-
2.Iar al doila pentru aparea mesajele in chat care vreau eu parca asa se numea message_shower
krystann
Membru eXtream
Membru eXtream
Posts: 2552
Joined: 16 May 2009, 10:37
Detinator Steam: Nu
CS Status: Vine criza!
Reputatie: Fost moderator
Has thanked: 321 times
Been thanked: 141 times

29 Jul 2012, 14:54

Revin cu un edit pentru ambele pluginuri
Edit:
1.
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#define MAX_GROUPS 10
new g_groupNames[MAX_GROUPS][] = {
"-==Owner Root Acces==-",
"-==Owner==-",
"-==Co-Owner==-",
"-==Maresal==-",
"-==God`s==-",
"-==Semi-God`s==-",
"-==Moderator==-",
"-==Administrator==-",
"-==Helper==-",
"-==Slot==-"
}
new g_groupFlags[MAX_GROUPS][] = {
"abcdefghijklmnopqrstu",
"abcdefghijklmnopqrst",
"bcdefghijlmnopqrst",
"bcdefghijlmnopqrs",
"bcdefgijlmnopqr",
"bcdefgijmnop",
"bcdefgijmn",
"bcefijmn",
"bb",
"b"
}
new g_groupFlagsValue[MAX_GROUPS]
public plugin_init() {
register_plugin("Amx_knife by iNc.", "2.0", "Server Admins")
register_concmd("amx_knife", "cmdWho", 0)
for(new i = 0; i < MAX_GROUPS; i++) {
g_groupFlagsValue = read_flags(g_groupFlags)
}
}
public cmdWho(id) {
new players[32], inum, player, name[32], i, a
get_players(players, inum)
console_print(id, "Server Admins")
for(i = 0; i < MAX_GROUPS; i++) {
console_print(id, "--- [%d]%s ---", i+1, g_groupNames)
for(a = 0; a < inum; ++a) {
player = players[a]
get_user_name(player, name, 31)
if(get_user_flags(player) == g_groupFlagsValue) {
console_print(id, "%s", name)
}
}
}
console_print(id, "Server admins")
return PLUGIN_HANDLED
}

Daca nu ai pus accesele le-am pus eu cum am dorit .. si merge si copilat .

2.Messages Shower
| Afiseaza codul
#define VERSION	"2.1"

#include <amxmodx>
#include <amxmisc>

#define NUM_MESSAGES	20
#define STRING_LEN	256

static const configfile[] = "addons/amxmodx/configs/messages.ini"
new text_messages[NUM_MESSAGES][STRING_LEN]
new hud_messages[NUM_MESSAGES][4][STRING_LEN]
new hud_message_colors[NUM_MESSAGES][4][3]
new saytext_msgid

new num_hudmessages, num_textmessages, cur_hudmessage, cur_textmessage

public plugin_init()
{
	register_plugin("GHW Auto Message Displayer",VERSION,"GHW_Chronic")

	register_cvar("advertise_hud_len","120.0")
	register_cvar("advertise_text_len","200.0")
	register_cvar("advertise_hud_loc","1")

	saytext_msgid = get_user_msgid("SayText")

	read_configfile()

	if(num_hudmessages) set_task(get_cvar_float("advertise_hud_len"),"display_hudmessage",0,"",0,"b")
	if(num_textmessages) set_task(get_cvar_float("advertise_text_len"),"display_textmessage",0,"",0,"b")
}

public read_configfile()
{
	new Fsize = file_size(configfile,1)
	new read[STRING_LEN], trash
	for(new i=0;i<Fsize;i++)
	{
		read_file(configfile,i,read,STRING_LEN - 1,trash)
		if(containi(read,"Text")==0)
		{
			read_file(configfile,i+1,read,STRING_LEN - 1,trash)
			replace_all(read,STRING_LEN - 1,"[blue]","^x03")
			replace_all(read,STRING_LEN - 1,"[/blue]","^x01")
			replace_all(read,STRING_LEN - 1,"[red]","^x03")
			replace_all(read,STRING_LEN - 1,"[/red]","^x01")
			replace_all(read,STRING_LEN - 1,"[green]","^x04")
			replace_all(read,STRING_LEN - 1,"[/green]","^x01")
			replace_all(read,STRING_LEN - 1,"[Blue]","^x03")
			replace_all(read,STRING_LEN - 1,"[/Blue]","^x01")
			replace_all(read,STRING_LEN - 1,"[Red]","^x03")
			replace_all(read,STRING_LEN - 1,"[/Red]","^x01")
			replace_all(read,STRING_LEN - 1,"[Green]","^x04")
			replace_all(read,STRING_LEN - 1,"[/Green]","^x01")
			format(text_messages[num_textmessages],STRING_LEN - 1,"^x04^x01%s",read)
			num_textmessages++
		}
		else if(containi(read,"Hud")==0)
		{
			read_file(configfile,i+1,read,STRING_LEN - 1,trash)
			new j = 0, position = 0;
			while(position < strlen(read) && i<4)
			{
				while(contain(read[position]," ")==0) position++
				if(containi(read[position],"[blue]")==0)
				{
					format(hud_messages[num_hudmessages][j],STRING_LEN - 1,"%s",read[position + 6])
					position = containi(read[position],"[/blue]") + 7 + position
					trash = containi(hud_messages[num_hudmessages][j],"[/blue]")
					if(trash!=-1) hud_messages[num_hudmessages][j][trash] = 0
					else break;
					hud_message_colors[num_hudmessages][j][0] = 0
					hud_message_colors[num_hudmessages][j][1] = 0
					hud_message_colors[num_hudmessages][j][2] = 255
				}
				else if(containi(read[position],"[red]")==0)
				{
					format(hud_messages[num_hudmessages][j],STRING_LEN - 1,"%s",read[position + 5])
					position = containi(read[position],"[/red]") + 6 + position
					trash = containi(hud_messages[num_hudmessages][j],"[/red]")
					if(trash!=-1) hud_messages[num_hudmessages][j][trash] = 0
					else break;
					hud_message_colors[num_hudmessages][j][0] = 255
					hud_message_colors[num_hudmessages][j][1] = 0
					hud_message_colors[num_hudmessages][j][2] = 0
				}
				else if(containi(read[position],"[green]")==0)
				{
					format(hud_messages[num_hudmessages][j],STRING_LEN - 1,"%s",read[position + 7])
					position = containi(read[position],"[/green]") + 8 + position
					trash = containi(hud_messages[num_hudmessages][j],"[/green]")
					if(trash!=-1) hud_messages[num_hudmessages][j][trash] = 0
					else break;
					hud_message_colors[num_hudmessages][j][0] = 0
					hud_message_colors[num_hudmessages][j][1] = 255
					hud_message_colors[num_hudmessages][j][2] = 0
				}
				else if(containi(read[position],"[Yellow]")==0)
				{
					format(hud_messages[num_hudmessages][j],STRING_LEN - 1,"%s",read[position + 8])
					position = containi(read[position],"[/Yellow]") + 9 + position
					trash = containi(hud_messages[num_hudmessages][j],"[/Yellow]")
					if(trash!=-1) hud_messages[num_hudmessages][j][trash] = 0
					else break;
					hud_message_colors[num_hudmessages][j][0] = 255
					hud_message_colors[num_hudmessages][j][1] = 255
					hud_message_colors[num_hudmessages][j][2] = 0
				}
				else if(containi(read[position],"[Orange]")==0)
				{
					format(hud_messages[num_hudmessages][j],STRING_LEN - 1,"%s",read[position + 8])
					position = containi(read[position],"[/Orange]") + 9 + position
					trash = containi(hud_messages[num_hudmessages][j],"[/Orange]")
					if(trash!=-1) hud_messages[num_hudmessages][j][trash] = 0
					else break;
					hud_message_colors[num_hudmessages][j][0] = 255
					hud_message_colors[num_hudmessages][j][1] = 128
					hud_message_colors[num_hudmessages][j][2] = 64
				}
				else if(containi(read[position],"[Pink]")==0)
				{
					format(hud_messages[num_hudmessages][j],STRING_LEN - 1,"%s",read[position + 6])
					position = containi(read[position],"[/Pink]") + 7 + position
					trash = containi(hud_messages[num_hudmessages][j],"[/Pink]")
					if(trash!=-1) hud_messages[num_hudmessages][j][trash] = 0
					else break;
					hud_message_colors[num_hudmessages][j][0] = 255
					hud_message_colors[num_hudmessages][j][1] = 0
					hud_message_colors[num_hudmessages][j][2] = 128
				}
				else if(containi(read[position],"[Indigo]")==0)
				{
					format(hud_messages[num_hudmessages][j],STRING_LEN - 1,"%s",read[position + 8])
					position = containi(read[position],"[/Indigo]") + 9 + position
					trash = containi(hud_messages[num_hudmessages][j],"[/Indigo]")
					if(trash!=-1) hud_messages[num_hudmessages][j][trash] = 0
					else break;
					hud_message_colors[num_hudmessages][j][0] = 0
					hud_message_colors[num_hudmessages][j][1] = 255
					hud_message_colors[num_hudmessages][j][2] = 255
				}
				else if(containi(read[position],"[White]")==0)
				{
					format(hud_messages[num_hudmessages][j],STRING_LEN - 1,"%s",read[position + 8])
					position = containi(read[position],"[/White]") + 9 + position
					trash = containi(hud_messages[num_hudmessages][j],"[/White]")
					if(trash!=-1) hud_messages[num_hudmessages][j][trash] = 0
					else break;
					hud_message_colors[num_hudmessages][j][0] = 255
					hud_message_colors[num_hudmessages][j][1] = 255
					hud_message_colors[num_hudmessages][j][2] = 255
				}
				else if(
				containi(read[position],"[blue]")==-1 &&
				containi(read[position],"[red]")==-1 &&
				containi(read[position],"[green]")==-1 &&
				containi(read[position],"[Yellow]")==-1 &&
				containi(read[position],"[Orange]")==-1 &&
				containi(read[position],"[Pink]")==-1 &&
				containi(read[position],"[Indigo]")==-1 &&
				containi(read[position],"[White]")==-1
				)
				{
					format(hud_messages[num_hudmessages][j],STRING_LEN - 1,"%s",read[position])
					hud_message_colors[num_hudmessages][j][0] = 255
					hud_message_colors[num_hudmessages][j][1] = 255
					hud_message_colors[num_hudmessages][j][2] = 255
					position = 129
				}
				else
				{
					format(hud_messages[num_hudmessages][j],STRING_LEN - 1,"%s",read[position])
					position = containi(read[position],"[") + 9 + position
					trash = containi(hud_messages[num_hudmessages][j],"[")
					if(trash!=-1) hud_messages[num_hudmessages][j][trash] = 0
					else break;
					hud_message_colors[num_hudmessages][j][0] = 255
					hud_message_colors[num_hudmessages][j][1] = 0
					hud_message_colors[num_hudmessages][j][2] = 0
				}
				j++
			}
			format(hud_messages[num_hudmessages][1],STRING_LEN - 1,"^n%s",hud_messages[num_hudmessages][1])
			format(hud_messages[num_hudmessages][2],STRING_LEN - 1,"^n^n%s",hud_messages[num_hudmessages][2])
			format(hud_messages[num_hudmessages][3],STRING_LEN - 1,"^n^n^n%s",hud_messages[num_hudmessages][3])
			num_hudmessages++
		}
	}
}

public display_hudmessage()
{
	new Float:loc[2]
	switch(get_cvar_num("advertise_hud_loc"))
	{
		case 2: 
		{
			loc[0] = -1.0
			loc[1] = -1.0
		}
		default:
		{
			loc[0] = -1.0
			loc[1] = 0.2
		}
	}
	set_hudmessage(hud_message_colors[cur_hudmessage][0][0],hud_message_colors[cur_textmessage][0][1],hud_message_colors[cur_textmessage][0][2],loc[0],loc[1], 0, 6.0, 12.0,0.1,0.2,-1)
	show_hudmessage(0,hud_messages[cur_hudmessage][0])
	if(hud_messages[cur_hudmessage][1][2]!=0)
	{
		set_hudmessage(hud_message_colors[cur_hudmessage][1][0],hud_message_colors[cur_textmessage][1][1],hud_message_colors[cur_textmessage][1][2],loc[0],loc[1], 0, 6.0, 12.0,0.1,0.2,-1)
		show_hudmessage(0,hud_messages[cur_hudmessage][1])
	}
	if(hud_messages[cur_hudmessage][2][4]!=0)
	{
		set_hudmessage(hud_message_colors[cur_hudmessage][2][0],hud_message_colors[cur_textmessage][2][1],hud_message_colors[cur_textmessage][2][2],loc[0],loc[1], 0, 6.0, 12.0,0.1,0.2,-1)
		show_hudmessage(0,hud_messages[cur_hudmessage][2])
	}
	if(hud_messages[cur_hudmessage][3][6]!=0)
	{
		set_hudmessage(hud_message_colors[cur_hudmessage][3][0],hud_message_colors[cur_textmessage][3][1],hud_message_colors[cur_textmessage][3][2],loc[0],loc[1], 0, 6.0, 12.0,0.1,0.2,-1)
		show_hudmessage(0,hud_messages[cur_hudmessage][3])
	}
	cur_hudmessage = (cur_hudmessage + 1 ) % num_hudmessages
}

public display_textmessage()
{
	new num, players[32], player
	get_players(players,num,"ch")
	for(new i=0;i<num;i++)
	{
		player = players

		message_begin(MSG_ONE,saytext_msgid,{0,0,0},player)
		write_byte(player)
		write_string(text_messages[cur_textmessage])
		message_end()
	}
	cur_textmessage = (cur_textmessage + 1 ) % num_textmessages
}


Fisierul messages.ini il adaugi in addons/amxmodx/configs.
.::Ken{Z}or::.
Membru, skill 0
Membru, skill 0
Posts: 13
Joined: 06 Jan 2012, 01:28
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

29 Jul 2012, 15:24

Da-mi si amxx si sma ca n-am de unde sa le iau. la amandoaua
krystann
Membru eXtream
Membru eXtream
Posts: 2552
Joined: 16 May 2009, 10:37
Detinator Steam: Nu
CS Status: Vine criza!
Reputatie: Fost moderator
Has thanked: 321 times
Been thanked: 141 times

29 Jul 2012, 15:54

.::Ken{Z}or::.
Membru, skill 0
Membru, skill 0
Posts: 13
Joined: 06 Jan 2012, 01:28
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

30 Jul 2012, 00:05

Eu vrau sa scriu in chat /who /admins nu in consola
User avatar
eDyTuU
Membru, skill +1
Membru, skill +1
Posts: 121
Joined: 04 Aug 2012, 13:44
Detinator Steam: Nu
Has thanked: 8 times
Been thanked: 17 times

05 Aug 2012, 19:02

Ti`am facut eu:
1. Acesta este in MOTD.
Descarci de aici

Pui admins.sma in addons/amxmodx/scripting
Pui admins.amx in addons/amxmodx/plugins
Pui in addons/amxmodx/configs/plugins/ini urmatorul cod

Code: Select all

admins.amxx
2. Acesta este in mesaj HUD.
Descarci de aici

Pui admin2.sma in addons/amxmodx/scripting


Pui admin2.amx in addons/amxmodx/plugins
Pui in addons/amxmodx/configs/plugins/ini urmatorul cod

Code: Select all

admin2.amxx


Ai grija ti`am pus doar gradele, accesele le modifici tu din addons/amxmodx/scripting.
Daca e, pune accesele si il fac iara.
Image
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests