Forum

> > CS2D > Scripts > Menu Error ( Name of PLyaer )
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Menu Error ( Name of PLyaer )

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Menu Error ( Name of PLyaer )

Jhony
User Off Offline

Zitieren
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

alt Re: Menu Error ( Name of PLyaer )

Chex
User Off Offline

Zitieren
user oxytamine hat geschrieben
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?

alt Re: Menu Error ( Name of PLyaer )

Jhony
User Off Offline

Zitieren
user Chex hat geschrieben
user oxytamine hat geschrieben
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht