Forum

> > CS2D > Scripts > What my error?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch What my error?

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt What my error?

GooDCaT
User Off Offline

Zitieren
Guys, doing a script to color selection, the menu works but the color ta ta not going

Please only make one? if they can add another question on the menu as "None"
to get the color right?

Thank you Guys, I embrace

sorry for my english

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
addhook("serveraction","lol")
function lol(id,a)
if a == 1 then --F2
if player(id,"usgn")== xxxxx
     menu(id,"Settings,Red Color")
     end
     end
end

addhook("menu","lold")
function lold(id,a,b)
if a == "Settings" then
     if b == 1 then
          function totable(t,match)
          local cmd = {}
          if not match then match = "[^%s]+" end
          for word in string.gmatch(t, match) do
          table.insert(cmd, word)
          end
          return cmd
          end
          if not string.match(txt,(string.char(33))) then
          msg("©255000000"..player(id,"name").." [Admin]: "..txt)
          return 1
          end   
     end
end

alt Re: What my error?

Anti-Grav
User Off Offline

Zitieren
1
if player(id,"usgn")== xxxxx

put your usgn here

Also get the function lold out of the menu function. Put it somewhere under the code. Then use lold() to call it up.

alt Re: What my error?

EP
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
41
42
43
color={}
addhook("join","lolz")
function lolz(id)
color[id]=0
end

addhook("serveraction","lol")
function lol(id,a)
if a == 1 then --F2
if player(id,"usgn")== xxxxx then
menu(id,"Settings,Red Color,Pink color,Blue Color")
end
end
end

addhook("menu","lold")
function lold(id,a,b)
if a == "Settings" then
if b == 1 then
color[id]=1
elseif b ==2 then
color[id]=2
elseif b==3 then
color[id]=4
end
end
end

addhook("say","lola")
function lola(id,txt)
if txt ~= "rank" then
if color[id]==1 then
msg("©255000000"..player(id,"name").." [Admin]: "..txt)
return 1
     elseif color[id]==2 then
msg("©255000255"..player(id,"name").." [Admin]: "..txt)
return 1
     elseif color[id]==3 then
msg("©000000255"..player(id,"name").." [Admin]: "..txt)
return 1
end
end
end
2× editiert, zuletzt 04.01.12 20:09:02
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht