Forum

> > CS2D > Scripts > Making a menu
Forums overviewCS2D overview Scripts overviewLog in to reply

English Making a menu

3 replies
To the start Previous 1 Next To the start

old Making a menu

LeagueOfLegends
User Off Offline

Quote
Hello guys, i'm very new in scripting and i don't know how to make a little menu.
Please give me codes..

old Re: Making a menu

DC
Admin Off Offline

Quote
there a sample codes with menus.
take a look at sys/lua/samples/classes.lua for example

old Re: Making a menu

J4x
User Off Offline

Quote
well, DC samples are good, but sometimes are hard to understand by newbies (no offence), so here is a easier one:
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
-------------
Made by FN_Nemesis!
don't steal this!
--------------
addhook("spawn","shoot")
function shoot(id)
menu(id,"Choose one, Grenadier|Famas,First Recon|Ump45,Overwatch|m249,Sniper|Scout,Special ops|m4a1")
end

addhook("menu","mw2")
function mw2(id,menu,button)
if(menu=="Choose one") then
if(button==1) then
parse("strip "..id) 
parse ("setmaxhealth "..id.." 105")
parse("setarmor "..id.." 110")
parse("equip "..id.." 39")
parse("equip "..id.." 2")
parse("equip "..id.." 51")
parse("equip "..id.." 52")
end

if(button==2) then
parse("strip "..id) 
parse ("setmaxhealth "..id.." 110")
parse("setarmor "..id.." 120")
parse("equip "..id.." 24")
parse("equip "..id.." 6")
parse("equip "..id.." 51")
parse("equip "..id.." 52")
end

if(button==3) then
parse("strip "..id) 
parse ("setmaxhealth "..id.." 107")
parse("setarmor "..id.." 115")
parse("equip "..id.." 40")
parse("equip "..id.." 3")
parse("equip "..id.." 51")
parse("equip "..id.." 53")
end

if(button==4) then
parse("strip "..id) 
parse ("setmaxhealth "..id.." 80")
parse("setarmor "..id.." 150")
parse("equip "..id.." 34")
parse("equip "..id.." 1")
parse("equip "..id.." 52")
parse("equip "..id.." 53")
end

if (button==5) then
parse("strip "..id) 
parse ("setmaxhealth "..id.." 110")
parse("setarmor "..id.." 105")
parse("equip "..id.." 32")
parse("equip "..id.." 5")
parse("equip "..id.." 87")
end
end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview