Forum

> > CS2D > General > Help Me Lua
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Help Me Lua

2 replies
To the start Previous 1 Next To the start

old closed Help Me Lua

11Razor11
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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
addhook("serveraction","menuac")
addhook("menu","men")
function menuac(id,ac)
if ac==1 then
menu(id,"Razor,Drop,Ekipman,Yapimci | Kemal44")
end
function men(id,title,sel)
if (title=="Razor") then
if (sel==1) then
menu(id,"Drop System,$100,$500,$1000,$5000,$10000,$50000,$100000")
elseif (sel==2) then
menu(id,"T-Menu,Laser/$30000,Hiz/$7000,Medikit/$300,Mermi/$5000,Mermi 2/$5000,Heavy Armor/$20000,Yapimci | Razor -Hapis")
end
function men(id,title,sel)
if (title=="menü2") then
if (sel==1) then
			if rp_money[id]>= 100 then
				parse([[spawnitem 66 ]]..x..[[ ]]..y)
				rp_money[id]=rp_money[id]-100
			else
				nmn(id)
			end
 elseif (sel==2) then
			if rp_money[id]>= 500 then
				parse([[spawnitem 67 ]]..x..[[ ]]..y)
				rp_money[id]=rp_money[id]-500
			else
				nmn(id)
			end
		 elseif (sel==3) then
			if rp_money[id]>= 1000 then
				parse([[spawnitem 68 ]]..x..[[ ]]..y)
				rp_money[id]=rp_money[id]-1000
			else
				nmn(id)
			end
		elseif (sel==4) then
			if rp_money[id]>= 5000 then
				for i = 1,5 do
					parse([[spawnitem 68 ]]..x..[[ ]]..y)
					rp_money[id]=rp_money[id]-1000
				end
			else
				nmn(id)
			end
		elseif (sel==5) then
			if rp_money[id]>= 10000 then
				for i = 1,10 do
					parse([[spawnitem 68 ]]..x..[[ ]]..y)
					rp_money[id]=rp_money[id]-1000
				end
			else
				mnm(id)
			end
		elseif (sel==6) then
			if rp_money[id]>= 50000 then
				for i = 1,50 do
					parse([[spawnitem 68 ]]..x..[[ ]]..y)
					rp_money[id]=rp_money[id]-1000
				end
			else
				nmn(id)
			end
		elseif (sel==7) then
			if rp_money[id]>= 100000 then
				for i = 1,100 do
					parse([[spawnitem 68 ]]..x..[[ ]]..y)
					rp_money[id]=rp_money[id]-1000
				end
			end
			end
function men(id,title,sel)
if (title=="menü2") then
function men(id,title,sel)
if (title=="Ekipman") then
if (sel==1) then
			if rp_money[id]>=30000 then
				parse([[equip ]]..id..[[ 45]])
				rp_money[id]=rp_money[id]-30000
			end
		elseif (sel==2) then
			if rp_money[id]>=7000 then
				parse("speedmod "..id.." 50")
				rp_money[id]=rp_money[id]-7000
			end
		elseif (sel==3) then
			if rp_money[id]>=300 then
				parse([[equip ]]..id..[[ 64]])
				rp_money[id]=rp_money[id]-300
			end
		elseif (sel==4) then
			if rp_money[id]>=5000 then
				parse([[equip ]]..id..[[ 62]])
				rp_money[id]=rp_money[id]-5000
			end
		elseif (sel==5) then
			if rp_money[id]>=50000 then
				parse([[equip ]]..id..[[ 61]])
				rp_money[id]=rp_money[id]-5000
			end
			
			elseif (sel==6) then
			if rp_money[id]>=20000 then
				parse([[equip ]]..id..[[ 81]])
				rp_money[id]=rp_money[id]-20000
			end	
			
			

end
end
end
end
end
end

EROR WHERE

Admin/mod comment

use the Lua scripting question thread! /DC

old Re: Help Me Lua

Tidusz
User Off Offline

Quote
@11Razor11:

i think nothing are error yow but you are the error man ... don't edit/make script from notepad make on notepad++ v5.8

the link: http://notepad-plus-plus.org/



oh yeah if you say i wrong sorry i dosen't know contain of your script if RP i have old script did u want it ??

hmm 20% same you only need edit and change name razor again or what ever (this rp server) (now i didn't need it again i have the new)

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
addhook("serveraction","hhh")
function hhh(id,p)
if p==1 then
menu(id,"Baslik,Laser|10000tl,Portal Gun|8000tl,Super Armor|15000tl,Full HP|500tl,Speed|3000tl,Full Armor|1000tl,Max Hp 250|10000tl")
end
end

addhook("menu","hh")
function hh(id,baslik,buton)
if baslik=="Baslik" then
if buton==1 then
parse("equip "..id.." 45")
if (player(id,"money")>10000) then
parse("setmoney "..id.." "..player(id,"money")-10000)
end
elseif buton==2 then
parse("equip "..id.." 88")
if (player(id,"money")>8000) then
parse("setmoney "..id.." "..player(id,"money")-8000)
end
elseif buton==3 then
parse("equip "..id.." 83")
if (player(id,"money")>15000) then
parse("setmoney "..id.." "..player(id,"money")-15000)
end
elseif buton==4 then
parse("sethealth "..id.." "..100)
if (player(id,"money")>500) then
parse("setmoney "..id.." "..player(id,"money")-500)
end
elseif buton==5 then
parse("speedmod "..id.." "..20)
if (player(id,"money")>3000) then
parse("setmoney "..id.." "..player(id,"money")-3000)
end
elseif buton==6 then
parse("setarmor "..id.." "..100)
if (player(id,"money")>1000) then
parse("setmoney "..id.." "..player(id,"money")-1000)
end
elseif buton==7 then
parse("setmaxhealth "..id.." "..250)
if (player(id,"money")>10000) then
parse("setmoney "..id.." "..player(id,"money")-10000)
end
end
end
end
edited 6×, last 21.10.10 03:44:40 pm

old Hey

11Razor11
User Off Offline

Quote
I got it in notepad, but the error get fixed


rp lua scirpint add lua eror menu :S
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview