Forum

> > CS2D > Scripts > Script press 2 "e"
Forums overviewCS2D overview Scripts overviewLog in to reply

English Script press 2 "e"

8 replies
To the start Previous 1 Next To the start

old Script press 2 "e"

Bus School
User Off Offline

Quote
hi all.
i want script press 2 "e" open menu
how to work & give me script
I looked through a lot in the Forum and files
please help me,thanks you
> what i want
• press 2 "e" open menu
• menu say
> Say CTs
1- Follow me
2- You have weapons?
3- don't kill me
> Say Ts
1- Sorry
2- I no have weapons
3- please no kill me!

old Re: Script press 2 "e"

Inflexion
User Off Offline

Quote
for ppl who don't understand this:

He want's a script that when you press E 2 times, (like in Fws)

A menu appears depending on your team

for example (CT):

Follow me!
Drop!
Halt!

Good luck on making your server btw!

old Re: Script press 2 "e"

TimeQuesT
User Off Offline

Quote
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
function airray(depth)
	local l = {};
	for i = 1, depth do
		l[i] = 0;
	end

	return l;
end

aidsuser = airray(32);

addhook("use", "deinemuttarstinktnachbackfisch");

function deinemuttarstinktnachbackfisch(id)
	aidsuser[id] = aidsuser[id] + 1;
	if (aidsuser[id] >= 2) then
		menu("KOT, Backfisch, Follow me!, Drop the bass");
		aidsuser[id] = 0;
	else
		timer(100, "reset_aids", id);
	end
end

function reset_aids(id)
	id = tonumber(id);
	aidsuser[id] = 0;
end

old Re: Script press 2 "e"

Apache uwu
User Off Offline

Quote
Try this:

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
addhook("use", "_use")
addhook("menu", "_menu")

local menus = {
    {"Say Ts", "Sorry", "I no have weapons", "please no kill me!"},
    {"Say CTs", "Follow me", "You have weapons?", "don't kill me"}
}

local colors = {
    string.char(169).."255000000",
    string.char(169).."050150255",
    string.char(169).."255220000"
}

local first = {}

function _use(id)
    if first[id] == nil then
        first[id] = true
        timer(300, "resetFirst", id)
    else
        menu(id, table.concat(menus[player(id, "team")], ","))
        resetFirst(id)
    end
end

function resetFirst(id)
    first[tonumber(id)] = nil
end

function _menu(id, title, button)
    if player(id, "team") ~= 0 and
       player(id, "health") ~= 0 and
       (title == menus[1][1] or
        title == menus[2][1]) then
        msg(colors[player(id, "team")]..player(id, "name")..": "..
            colors[3]..menus[player(id, "team")][button + 1])
    end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview