when i press f2 the menu opens all ok. but it don't work.(when i press teleport yellew nothing happens)
THIS IS MY COMPLETE SCRIPT!
Console says
1
LUA ERROR: maps/propnic_happytown_b0.1.0.lua:78: unfinished string near '")'
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
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
ddhook("serveraction" , "sa")
function sa(id,action)
if action==1 then
menu(id,"Main Menu,Extra Shop|Shop,Teleport|Teleports,Extra|+bonus")
end
end
addhook("menu" , "menu_1")
function menu_1(id, title, button)
if (title=="Main Menu") then
if button==1 then
menu(id,"Extra Shop,Deagle|650$,M3|1700$,AK47|2500$")
end
if button==2 then
menu(id,"Teleport,Teleport green|2,000$,Teleport yellow|2,000$")
end
end
if (title=="Buy weapon") then
if button==1 then
if (player(id,"money")>=2000) then
parse("setpos "..id.." 400 2608 ")
parse("setmoney "..id.." "..player(id,"money")-2000)
msg2(id,"©000255000You Teleported for 2,000$ !!!")
else
msg2(id,"©000255000Not enough money !")
end
end
if button==2 then
if (player(id,"money")>=2000) then
parse("setpos "..id.." 1904 2064 ")
parse("setmoney "..id.." "..player(id,"money")-2000)
msg2(id,"©000255000You Teleported for 2,000$ !!!")
else
msg2(id,"©000255000Not enough money !")
end
end
if button==3 then
if (player(id,"money")>=2500) then
parse("equip "..id.." 30 ")
parse("setmoney "..id.." "..player(id,"money")-2500)
parse("setweapon "..id.." 30 ")
msg2(id,"©000255000You buy a AK-47 for 2500$ !!!")
else
msg2(id,"©000255000Not enough money !")
end
end
end
if (title=="Extra|+bonus") then
if button==1 then
if (player(id,"money")>=300) then
parse("equip "..id.." 64 ")
parse("setmoney "..id.." "..player(id,"money")-300)
msg2(id,"©000255000You buy a Medikit for 300$ !!!")
else
msg2(id,"©000255000Not enough money !")
end
end
if button==2 then
if (player(id,"money")>=650) then
parse("equip "..id.." 57 ")
parse("setmoney "..id.." "..player(id,"money")-650)
msg2(id,"©000255000You buy a Kevlar for 650$ !!!")
else
msg2(id,"©000255000Not enough money !")
end
end
end
end
addhook("startround",start.round")
function start.round()
parse('hudtxt2 '..id..' 41 "©000255000Text" 240 5')
end
edited 17×, last 10.05.11 02:50:39 pm
help me with my lua script
1 
Offline