Forum

> > CS2D > Scripts > unknown command
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch unknown command

12 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt unknown command

superpegamento
User Off Offline

Zitieren
to say commands unknown appears message:

MSG

Unknown or misspelled command

commands not unknown are:

!help !kick !ban !san !slap

Thanks!

alt Re: unknown command

Marcell
Super User Off Offline

Zitieren
Man.... what type of admin script is it?

Starkzz's admin script or who made it?

alt Re: unknown command

Avo
User Off Offline

Zitieren
Unrealsoftware's Official Language detected. Please proceed and try to speak in another language.

alt Re: unknown command

Yates
Reviewer Off Offline

Zitieren
What he wants is a message that appears if someone is using !<command> and it does not exist. The commands he listed are the commands he has.

English is all so very simple. Just stop posting if you have no idea what the OP is talking about.

alt Re: unknown command

superpegamento
User Off Offline

Zitieren
@user Yates:

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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
serverlist = {xxxxxx}

addhook("say" , "sayhelp")
function sayhelp(id,text)
if (text=="!help") then
msg2(id, "List for commands")
msg2(id, "!kick - kick user")
msg2(id, "!ban - ban user")
msg2(id, "!slap - slap user")
msg2(id, "!kill - kill user")
end
end

addhook("say", "cmdone")
function cmdone(id, txt)
for _, usgn in ipairs(serverlist) do
if player(id,'usgn') == usgn then
     if txt:lower():sub(1, 5) == "!kick" then
          local kickid = tonumber(txt:sub(6))
          if player(kickid, "exists") then
               parse("kick " .. kickid)
                msg("©132180000"..player(id, "name").." kicked user.")
                else
                msg("©255000000This user no exist!")
          end
     end
end
end
end

addhook("say", "cmdtwo")
function cmdtwo(id, txt)
for _, usgn in ipairs(serverlist) do
if player(id,'usgn') == usgn then
     if txt:lower():sub(1, 4) == "!ban" then
          local banid = tonumber(txt:sub(6))
          if player(banid, "exists") then
               parse("banname " .. banid)
                msg("©132180000"..player(id, "name").." ban user.")
                else
                msg("©255000000This user no exist!")
          end
     end
end
end
end

addhook("say", "cmdtree")
function cmdtree(id, txt)
for _, usgn in ipairs(serverlist) do
if player(id,'usgn') == usgn then
     if txt:lower():sub(1, 5) == "!kill" then
          local killid = tonumber(txt:sub(6))
          if player(killid, "exists") then
               parse("killplayer " .. killid)
                msg("©132180000"..player(id, "name").." kill user.")
                else
                msg("©255000000This user no exist!")
          end
     end
end
end
end

addhook("say", "cmdfour")
function cmdfour(id, txt)
for _, usgn in ipairs(serverlist) do
if player(id,'usgn') == usgn then
     if txt:lower():sub(1, 5) == "!slap" then
          local slap = tonumber(txt:sub(6))
          if player(slap, "exists") then
               parse("slap " .. slap)
                msg("©132180000"..player(id, "name").." slap a user.")
                else
                msg("©255000000This user no exist!")
          end
     end
end
end
end

alt Re: unknown command

Yates
Reviewer Off Offline

Zitieren
@user TopNotch: Another say hook wouldn't hurt in this case.

@user superpegamento:
Fixed code >

Copy/paste this into your script.

I even added some ingris in there to keep up with yours.
1× editiert, zuletzt 26.02.14 14:19:30

alt Re: unknown command

Rainoth
Moderator Off Offline

Zitieren
@user Yates:
Aren't all the commands "!cmd <id> <optional parameter>" and like that. So "text" will never be just plain "!kill" and others. That would mean that the script won't work how it's needed ?
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht