Forum

> > CS2D > Scripts > Again bugs in script
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Again bugs in script

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Again bugs in script

Crash13
User Off Offline

Zitieren
Again with my prroblems. I am starter scripter, and i need some help please. Now i make a script for DEATHRUN servers. Console don't find bugs, but when i press F2 -> Admin Menu then says me: You are not authorized to enter in this menu!

Why says to me? I am admin, need to say for all players (that is not on admin list.) I made a test: enter in my server with this script, and i closed usgn, then press F2 -> Admin Menu, Menu don't appear (this work) but message aren't.

Instead to show message to them, says to me, but menu work only for admin list.

Spoiler >


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Admins = {33373}

addhook("menu","deathmen")
function deathmen(id,title,button)	
	if title == "DEATHRUN Menu" then
	if button == 2 then
	parse("equip "..id.." 34")
		elseif button == 3 then	
			for _, usgn in ipairs(Admins) do
				if player(id,"usgn") == usgn then
				menu(id,"Admin Menu,Kick,Ban")
					if player(id, 'usgn')>=1 then
						msg2(id,"©255000000You are not autorized to enter in this menu!@C")
					end		
				end	
			end
		end
	end
end
1× editiert, zuletzt 12.01.12 17:17:04

alt Re: Again bugs in script

Alistaire
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("menu","deathmen")
function deathmen(id,title,button)	
	if title == "DEATHRUN Menu" then
	if button == 2 then
		parse("equip "..id.." 34")
	elseif button == 3 then	
		for _, usgn in ipairs(Admins) do
			if player(id,"usgn") == usgn then
				menu(id,"Admin Menu,Kick,Ban")
			elseif player(id, 'usgn')>=1 then
				msg2(id,"©255000000You are not autorized to enter in this menu!@C")
			end		
		end	
	end
end

alt Re: Again bugs in script

Crash13
User Off Offline

Zitieren
user Alistaire hat geschrieben
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("menu","deathmen")
function deathmen(id,title,button)	
	if title == "DEATHRUN Menu" then
	if button == 2 then
		parse("equip "..id.." 34")
	elseif button == 3 then	
		for _, usgn in ipairs(Admins) do
			if player(id,"usgn") == usgn then
				menu(id,"Admin Menu,Kick,Ban")
			elseif player(id, 'usgn')>=1 then
				msg2(id,"©255000000You are not autorized to enter in this menu!@C")
			end		
		end	
	end
end


Thanks. But message don't appear in general (and admins, and simpler players).

alt Re: Again bugs in script

Alistaire
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("menu","deathmen")
function deathmen(id,title,button)	
	if title == "DEATHRUN Menu" then
	if button == 2 then
		parse(equip "..id.." 34)
	elseif button == 3 then	
		if player(id,"usgn") == 33373 then
			menu(id,"Admin Menu,Kick,Ban")
		else
			msg2(id,"©255000000You are not autorized to enter in this menu!@C")	
		end	
	end
end

Why the fuck did you copy like 80% of this script from other scripts.

alt Re: Again bugs in script

Crash13
User Off Offline

Zitieren
@user Alistaire: hmm.... thanks. And this is not copied from cs2d, or unreal scripts, i saw this script in cs 1.6, now i make that script in cs2d, and i make single

alt Re: Again bugs in script

EngiN33R
Moderator Off Offline

Zitieren
user Alistaire hat geschrieben
1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("menu","deathmen")
function deathmen(id,title,button)	
	if title == "DEATHRUN Menu" then
	if button == 2 then
		parse(equip "..id.." 34)
	elseif button == 3 then	
		if player(id,"usgn") == 33373 then
			menu(id,"Admin Menu,Kick,Ban")
		else
			msg2(id,"©255000000You are not autorized to enter in this menu!@C")	
		end	
	end
end


You missed one end in the end.

alt Re: Again bugs in script

Alistaire
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("menu","deathmen")
function deathmen(id,title,button)	
	if title == "DEATHRUN Menu" then
		if button == 2 then
			parse(equip "..id.." 34)
		elseif button == 3 then	
			if player(id,"usgn") == 33373 then
				menu(id,"Admin Menu,Kick,Ban")
			else
				msg2(id,"©255000000You are not autorized to enter in this menu!@C")	
			end	
		end
	end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht