English Menu Error ( Name of PLyaer )

3 replies
Goto Page
To the start Previous 1 Next To the start
26.03.12 10:49:51 pm
Up
Jhony
User
Offline Off
Code:
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
26.03.12 10:51:32 pm
Up
oxytamine
User
Offline Off
As long as I can understand you, you want menu to show players on the server. Why don't you use tab button?
26.03.12 10:52:49 pm
Up
Chex
User
Offline Off
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?
Who needs a sig?
27.03.12 12:26:58 am
Up
Jhony
User
Offline Off
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 ....
Code:
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