English Open menu by command

30 replies
Goto Page
To the start Previous 1 2 Next To the start
04.01.14 08:53:38 am
Up
Marcell
Super User
Offline Off
Welcome!

I'would like to know how can i do that when i type !menu to chat that open a menu
like that i wanna use Engineer's Doctor Who script on my pc, but i use admin script already.. how can i change it to not open by serveraction buttons, otherwise open it by say like !tardis
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
04.01.14 09:12:47 am
Up
Mora
User
Offline Off
mm i have one,maybe it?:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
addhook("say","said")
addhook("menu","m")

function said(id,text)
     if text=="!menu" then
menu(id,"Test Menu,Equip M4A1,Machete,Snowballs")
     end
end

function m(id,title,b)
     if title=="Test Menu" then
 if b==1 then
parse("equip "..id.." 32")
 elseif b==2 then
parse("equip "..id.." 69")
 elseif b==3 then
parse("equip "..id.." 75")
     end
 end
end
05.01.14 12:34:27 pm
Up
Varna97
User
Offline Off
user Mora has written:
mm i have one,maybe it?:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
addhook("say","said")
addhook("menu","m")

function said(id,text)
     if text=="!menu" then
menu(id,"Test Menu,Equip M4A1,Machete,Snowballs")
     end
end

function m(id,title,b)
     if title=="Test Menu" then
 if b==1 then
parse("equip "..id.." 32")
 elseif b==2 then
parse("equip "..id.." 69")
 elseif b==3 then
parse("equip "..id.." 75")
     end
 end
end


Wrong ×

function m(id)
if title=="Weapons" then
if b==1 then
parse("equip "..id.." 32")
elseif b==2 then
parse("equip "..id.." 69")
elseif b==3 then
parse("equip "..id.." 75")
end
end
05.01.14 12:41:55 pm
Up
Mora
User
Offline Off
@user Varna97: you test my code?yes/not?what your skills with scripts?
CS Varna d-_-b has written:
function m(id)
if title=="Weapons" then
if b==1 then
parse("equip "..id.." 32")
elseif b==2 then
parse("equip "..id.." 69")
elseif b==3 then
parse("equip "..id.." 75")
end
end

here you will got error:
"Lua error: "end" it is expected near "if" at line 2"

@user Marcell: tell me if my work,please...
edited 1×, last 05.01.14 01:34:36 pm
05.01.14 01:35:56 pm
Up
Rainoth
Moderator
Offline Off
More >


BOBA Pycckuu : 1
Hacker : 0

He gave a normal script. Well... It could be tabbed but it's just reading it, it's executed properly anyway.

// How is he not banned yet ? It's so obvious that he's a hacker >.>
05.01.14 02:54:27 pm
Up
Mora
User
Offline Off
Ooh thank you @user Rainoth:
I see somewhere player with nickname "Varna d-_-b",and this player HACK...i think he have +1 account...huh.Maybe it @user Saski:

MULTI ACCOUNT DETECTED!!!
@user Saski:
@user Varna97:
See facebook,skype
05.01.14 03:03:49 pm
Up
Rainoth
Moderator
Offline Off
Duhh. And it's not just "Sonic Black Knight". There's many variations of that account and they all have same facebook in them. I've already reported a lot of them but he keeps creating more accounts. I've told about it to DC and he banned most of them but here's a new one... I've been refering to him as a hacker for about two-three months but nobody cares so..

// I know that he's a hacker because he used to come to my server and hack there heh. Too bad there's no such thing as reporting in-game. Well I guess a 2D indie game doesn't need so much attention so it's all good.
05.01.14 03:40:29 pm
Up
Mora
User
Offline Off
Lol,kid try scripts...failed
try multi account...failed
try hack on servers...failed
try crush servers...failed
05.01.14 11:09:47 pm
Up
Marcell
Super 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
usgn = {
r8 = {6943};        -- AdminController(s)
r7 = {};          -- SuperAdmin(s)
r5 = {};          -- Admin 5 
r4 = {};          -- Admin 4
r3 = {};          -- Admin 3
r2 = {};          -- Admin 2
r1 = {};          -- Admin 1
rH = {};          -- Admin Helper(s)
rVip = {};            -- VIP User(s)
}

function table.contains(table, element)
    for key, value in pairs(table) do
        if value == element then
            return true
        end
    end
end

     if table.contains(usgn.r8,player(id,"usgn")) then
          if team = 2 then
          return 0;
          else
          parse("maket " .. id);
          return 0;
     end
     end


wont work
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
05.01.14 11:22:52 pm
Up
Gajos
BANNED
Offline Off
if team = 2 then
to
if team == 2 then
Banned for Hacking/Cheating in CS2D /DC
05.01.14 11:36:08 pm
Up
Marcell
Super User
Offline Off
not work

Code:
1
2
3
4
5
6
7
8
9
10
if table.contains(usgn.r8,player(id,"usgn")) then
          if team = 2 then
          return 0;
          else
          if team == 2 then
          parse("maket " .. id);
          return 0;
     end
     end
end
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
06.01.14 12:52:47 am
Up
Gajos
BANNED
Offline Off
user Marcell has written:
not work

Code:
1
2
3
4
5
6
7
8
9
10
if table.contains(usgn.r8,player(id,"usgn")) then
          if team = 2 then
          return 0;
          else
          if team == 2 then
          parse("maket " .. id);
          return 0;
     end
     end
end

You are st*pid.
Banned for Hacking/Cheating in CS2D /DC
06.01.14 04:34:37 am
Up
Mora
User
Offline Off
@user Gajos: you`re snapper
@user Marcell: maybe @user Gajos: mean it:
if table.contains(usgn.r8,player(id,"usgn")) then
if team == 2 then
return 0;
else
parse("maket "..id);
return 0;
end
end
edited 1×, last 06.01.14 04:58:33 am
06.01.14 07:04:27 am
Up
Marcell
Super User
Offline Off
Not really works..

If i logged in i able to join to CT team
but if i logged out already able to join to CT...
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
06.01.14 07:12:00 am
Up
sheeL
User
Offline Off
You are searching for this?

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
addhook("team","check_me")

USGN = {
     r8 = {6943,45813};        -- AdminController(s)
     r7 = {};          -- SuperAdmin(s)
     r5 = {};          -- Admin 5 
     r4 = {};          -- Admin 4
     r3 = {};          -- Admin 3
     r2 = {};          -- Admin 2
     r1 = {};          -- Admin 1
     rH = {};          -- Admin Helper(s)
     rVip = {};            -- VIP User(s)
}

function table.contains(table, element)
    for key, value in pairs(table) do
        if value == element then
            return true
        end
    end
end

function check_me(id,team)
local USGN_id = player(id,"usgn")
     if (team==2) then
          if table.contains(USGN.r8,USGN_id) then
          return 0
     else
          parse("maket "..id);
          return 1
          end
     end
end
06.01.14 07:28:02 am
Up
Marcell
Super User
Offline Off
why you thinkin' i will add to Admin Controller team? Maybe you helped in this script, but i will not add to for it man

Anyway still able to join to CT lol
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
06.01.14 07:45:10 am
Up
Mora
User
Offline Off
admin = {6943,114940}

addhook("join","j")
function j(id,team)
for _, usgn in ipairs(admin) do
if player(id,"usgn")==usgn then
if team==2 then
return 1
else
parse("maket "..id)
end
end
end
end

LOL,f***g my code.
06.01.14 02:56:51 pm
Up
Rainoth
Moderator
Offline Off
user Marcell has written:
Anyway still able to join to CT lol


That moment when you realize how much you've failed.
Of course you'd be able to be a CT. You're included in the table --"
I just tested Sheel's code. It's working fine.
06.01.14 03:07:43 pm
Up
Marcell
Super User
Offline Off
not work with my whole script. i tested with just this one script and it worked, but with all somewhy not
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
06.01.14 03:18:32 pm
Up
Rainoth
Moderator
Offline Off
I'm afraid your reply is useless. Saying "It doesn't work" won't help us in any way to solve your problem. If it works alone but not together, you might have multiple hooks/variables, maybe wrong calls. We can only suspect/assume if you don't provide us anything.
To the start Previous 1 2 Next To the start