Forum

> > CS2D > Scripts > Menu Error ( Name of PLyaer )
Forums overviewCS2D overview Scripts overviewLog in to reply

English Menu Error ( Name of PLyaer )

3 replies
To the start Previous 1 Next To the start

old Menu Error ( Name of PLyaer )

Jhony
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
admin = {xxxxx}

function isAdmin(id)
	for _, usgn in ipairs(admin) do
		if player(id,'usgn')== usgn then
			return true
		end
	end
	return false
end

addhook("serveraction","action")
function action(id,act)
if isAdmin(id) then
if act == 1 then -- F2
menu(id,"Discipline,Slow HP")
end
end
end

addhook("menu","action1")
function action1(id,tittle,button)
if tittle == "Discipline" then
if button == 1 then
for pl = 1,32 do
menu(id,"Change,"..player(pl,"name")..","..player(pl,"name").."")
end
end
end

addhook("menu","action2")
function action2(id,tittle,button)
if tittle == "Change" then
if button == 1 then
parse("setmaxhealth "..id.." 1 ")
elseif button == 2 then
parse("setmaxhealth "..id.." 1 ")
end
end
end

look


Want it in Menu
Appear the name of players on server
Only My Name Appears
What is my mistake
help

old Re: Menu Error ( Name of PLyaer )

Chex
User Off Offline

Quote
user oxytamine has written
As long as I can understand you, you want menu to show players on the server. Why don't you use tab button?


Maybe he wants to print it for logs or something?

old Re: Menu Error ( Name of PLyaer )

Jhony
User Off Offline

Quote
user Chex has written
user oxytamine has written
As long as I can understand you, you want menu to show players on the server. Why don't you use tab button?


Maybe he wants to print it for logs or something?


no no ....
1
2
3
4
5
6
7
8
9
10
addhook("menu","action2")
function action2(id,tittle,button)
if tittle == "Change" then
if button == 1 then
parse("setmaxhealth "..id.." 1 ")
elseif button == 2 then
parse("setmaxhealth "..id.." 1 ")
end
end
end

I edit it to people's lives
See the script
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview