Forum

> > CS2D > Scripts > unknown command
Forums overviewCS2D overview Scripts overviewLog in to reply

English unknown command

12 replies
To the start Previous 1 Next To the start

old unknown command

superpegamento
User Off Offline

Quote
to say commands unknown appears message:

MSG

Unknown or misspelled command

commands not unknown are:

!help !kick !ban !san !slap

Thanks!

old Re: unknown command

Marcell
Super User Off Offline

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

Starkzz's admin script or who made it?

old Re: unknown command

Avo
User Off Offline

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

old Re: unknown command

Yates
Reviewer Off Offline

Quote
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.

old Re: unknown command

superpegamento
User Off Offline

Quote
@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

old Re: unknown command

Yates
Reviewer Off Offline

Quote
@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.
edited 1×, last 26.02.14 02:19:30 pm

old Re: unknown command

Rainoth
Moderator Off Offline

Quote
@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 ?
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview