Forum

> > CS2D > Scripts > Show message
Forums overviewCS2D overview Scripts overviewLog in to reply

English Show message

7 replies
To the start Previous 1 Next To the start

old Show message

Skill
User Off Offline

Quote
I need Script

Open For menu f4

√ NO KILL ME- BUTTON 1
√ PLASSE HELP ME-BUTTON 2
√ PLASSE VOTE HACKER- BUTTON 3

old Re: Show message

Masea
Super User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
addhook("serveraction","sick")
function sick(i,a)
if a == 3 then
menu(i,"Sick menu,NO KILL ME,PLASSE HELP ME,PLASSE VOTE HACKER")
end
end

addhook("menu","sicki")
function sicki(i,t,b)
if t == 'Sick menu' then
	if b == 1 then
		msg(player(i,"name")..": NO KILL ME ")
	elseif b == 2 then
		msg(player(i,"name")..": PLASSE HELP ME ")
	elseif b == 3 then
		msg(player(i,"name")..": PLASSE VOTE HACKER ")
	end
end
end

And again, your english level makes me sick.

old Re: Show message

TopNotch
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
28
29
30
31
32
messages = {"NO KILL ME", "PLASSE HELP ME", "PLASSE VOTE HACKER"}

addhook("serveraction", "_serveraction")
function _serveraction(id, action)
	if action == 3 then
		menu(id,"Say,"..messages[1]..","..messages[2]..","..messages[3])
	end
end

function teamcolor(id) -- Edit the color to your needs (after \169)
	if player(id,"team")==1 then
		return "\169200000000"
	elseif player(id,"team")==2 then
		return "\169000000200"
	elseif player(id,"team")==0 then
		return "\169255200000"
	end
end
	

addhook("menu","_menu")
function _menu(id, title, button)
	if title=="Say" then
		if button==1 then
			msg(teamcolor(id) .. player(id,"name")..": \169255220000"..messages[1])
		elseif button==2 then
			msg(teamcolor(id) .. player(id,"name")..": \169255220000"..messages[2])
		elseif button==3 then
			msg(teamcolor(id) .. player(id,"name")..": \169255220000"..messages[3])
		end
	end
end
I can't remember the original team colorcodes.

old Code

Paulo49
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
28
29
30
31
32
33
34
35
36
addhook("serveraction","example")
function example(id, act)
     if act == 3 then
          menu(id,'MSG,NO KILL ME,PLEASE HELP ME,PLEASE VOTE HACKER')
     end
end

addhook("menu","example2")
function example2(id,title,button)
     if title == "MSG" then
          if button == 1 then
              parse("say No kill me!")
          end
     end
     return 1
end

addhook("menu","example3")
function example3(id,title,button)
     if title == "MSG" then
          if button == 2 then
              parse("say Please Help me!")
          end
     end
     return 1
end

addhook("menu","example4")
function example4(id,title,button)
     if title == "MSG" then
          if button == 3 then
              parse("say Please Vote Hacker!")
          end
     end
     return 1
end

old Re: Show message

TopNotch
User Off Offline

Quote
@user Paulo49 Don't make a menu hook for every button, that's just ridiculous. Use "elseif" instead.
edited 1×, last 14.09.15 10:49:14 am
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview