Forum

> > CS2D > Scripts > Um can somebody help me whats wrong?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Um can somebody help me whats wrong?

1 reply
To the start Previous 1 Next To the start

old Um can somebody help me whats wrong?

pereznico123
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
addhook("serveraction", "saction")
addhook("menu","mymenu")

function saction(id, sact)
if(sact==1) then
menu(id,"Secret Shop,Items,Armors,Weapons")
end
end
end
function mymenu(id,t,b)
if t=="Secret Shop" then
if b==1 then
menu(id,"Items,Gas Grenade:500$,He:600$,Flare:9$,BITCH:99999$")
end
elseif t == "Items" then
local mon = player(id, "money")
if b==1 and mon>=500 then
parse("equip "..id.." 72")
parse("setmoney "..id.." "..mon-500)
elseif mon<500 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==2 and mon>=600 then
parse("equip "..id.." 51")
parse("setmoney "..id.." "..mon-600)
elseif mon<600 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==3 and mon>=1 then
parse("equip "..id.." 54")
parse("setmoney "..id.." "..mon-1)
elseif mon<1 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==4 and mon>=999999 then
parse("equip "..id.." 54")
parse("setmoney "..id.." "..mon-9999999)
elseif mon<99999999 then
msg("©000255255You don't have money to buy this")
end

function mymenu(id,t,b)
if t=="Secret Shop" then
if b==2 then
menu(id,"Armor,Light Armor!:500$")
end
end addhook("serveraction", "saction")
addhook("menu", "mymenu")

function saction(id, sact)
if(sact==1) then
menu(id,"Secret Shop,Items,Armors,Weapons")
end
end
end
function mymenu(id,t,b)
if t=="Secret Shop" then
if b==1 then
menu(id,"Items,Gas Grenade:500$,He:600$,Flare:9$,BITCH:99999$")
end
elseif t == "Items" then
local mon = player(id, "money")
if b==1 and mon>=500 then
parse("equip "..id.." 72")
parse("setmoney "..id.." "..mon-500)
elseif mon<500 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==2 and mon>=600 then
parse("equip "..id.." 51")
parse("setmoney "..id.." "..mon-600)
elseif mon<600 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==3 and mon>=1 then
parse("equip "..id.." 54")
parse("setmoney "..id.." "..mon-1)
elseif mon<1 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==4 and mon>=999999 then
parse("equip "..id.." 54")
parse("setmoney "..id.." "..mon-9999999)
elseif mon<99999999 then
msg("©000255255You don't have money to buy this")
end

function mymenu(id,t,b)
if t=="Secret Shop" then
if b==2 then
menu(id,"Armor,Light Armor!:500$")
end
end addhook("serveraction", "saction")
addhook("menu", "mymenu")

function saction(id, sact)
if(sact==1) then
menu(id,"Secret Shop,Items,Armors,Weapons")
end
end
end
function mymenu(id,t,b)
if t=="Secret Shop" then
if b==1 then
menu(id,"Items,Gas Grenade:500$,He:600$,Flare:9$,BITCH:99999$")
end
elseif t == "Items" then
local mon = player(id, "money")
if b==1 and mon>=500 then
parse("equip "..id.." 72")
parse("setmoney "..id.." "..mon-500)
elseif mon<500 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==2 and mon>=600 then
parse("equip "..id.." 51")
parse("setmoney "..id.." "..mon-600)
elseif mon<600 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==3 and mon>=1 then
parse("equip "..id.." 54")
parse("setmoney "..id.." "..mon-1)
elseif mon<1 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==4 and mon>=999999 then
parse("equip "..id.." 54")
parse("setmoney "..id.." "..mon-9999999)
elseif mon<99999999 then
msg("©000255255You don't have money to buy this")
end

function mymenu(id,t,b)
if t=="Secret Shop" then
if b==2 then
menu(id,"Armor,Light Armor!:500$")
end
end addhook("serveraction", "saction")
addhook("menu", "mymenu")

function saction(id, sact)
if(sact==1) then
menu(id,"Secret Shop,Items,Armors,Weapons")
end
end
end
function mymenu(id,t,b)
if t=="Secret Shop" then
if b==1 then
menu(id,"Items,Gas Grenade:500$,He:600$,Flare:9$,BITCH:99999$")
end
elseif t == "Items" then
local mon = player(id, "money")
if b==1 and mon>=500 then
parse("equip "..id.." 72")
parse("setmoney "..id.." "..mon-500)
elseif mon<500 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==2 and mon>=600 then
parse("equip "..id.." 51")
parse("setmoney "..id.." "..mon-600)
elseif mon<600 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==3 and mon>=1 then
parse("equip "..id.." 54")
parse("setmoney "..id.." "..mon-1)
elseif mon<1 then
msg("©000255255You don't have money to buy this")
end

local mon = player(id, "money")
if b==4 and mon>=999999 then
parse("equip "..id.." 54")
parse("setmoney "..id.." "..mon-9999999)
elseif mon<99999999 then
msg("©000255255You don't have money to buy this")
end

function mymenu(id,t,b)
if t=="Secret Shop" then
if b==2 then
menu(id,"Armor,Light Armor!:500$")
end
end

old Re: Um can somebody help me whats wrong?

Banaan
User Off Offline

Quote
Oh geez people start tabbing your code -.-

Huge indentation fail. Read your console output and for God's sake indent your code! It will fix all of those ******* 'end' problems.

People who don't tab shouldn't be allowed to try to write code...

1
2
3
4
5
function saction(id, sact)
	if sact == 1 then
		menu(id, "Secret shop blah blah blah")
	end
end

There you go, you had an end too much. Great work -.-
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview