Forum

> > CS2D > Scripts > Shop lua doesn't work
Forums overviewCS2D overview Scripts overviewLog in to reply

English Shop lua doesn't work

8 replies
To the start Previous 1 Next To the start

old Shop lua doesn't work

Good day
User Off Offline

Quote
My lua doesn't work. Pls help me.

After loading the server does not work, and after a while begins to work

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
addhook("menu","aus_menu3")
function aus_menu3(id,t,b)
          if(t == "Drug store") then
                    if(b == 1) then
                         if money[id]>=30000 then
                         parse("speedmod "..id.." 50")
                         money[id]=money[id]-30000
               else
          nope(id)
               end
                    elseif(b == 2) then
                    if money[id]>=90000 then
                         parse("speedmod "..id.." 100")
                         money[id]=money[id]-90000
               else
          nope(id)
               end
                    elseif(b == 4) then
                    if money[id]>=5000 then
                         parse("setmaxhealth "..id.." 150")
                         money[id]=money[id]-5000
               else
          nope(id)
               end
                    elseif(b == 5) then
                    if money[id]>=15000 then
                         parse("setmaxhealth "..id.." 250")
                         money[id]=money[id]-15000
               else
          nope(id)
                    end

                    end
          end
edited 2×, last 12.06.14 12:04:08 pm

old Re: Shop lua doesn't work

Yates
Reviewer Off Offline

Quote
Use
[code]<Your shit code>
[/code] tags. Tab all of it CORRECTLY and tell us why it doesn't fucking work and what doesn't work. No one will bother to help you otherwise.

old Re: Shop lua doesn't work

Mora
User Off Offline

Quote
@user Good day: for first, where you see money in cs2d that more than 16000?
1
if money[id]>=30000 then
your "end" place's is not right...
If you use "money" as hudtxt then you need array function.

old Re: Shop lua doesn't work

Alpha Beta
User Off Offline

Quote
What is this code supposed to do?
Why don't you tab it properly?
What does nope(id) do?
Why do you have 30000 money?

old Re: Shop lua doesn't work

Mora
User Off Offline

Quote
@user Xirot: errors? lol, this is not even full script.(If you wanna, just launch this script and see errors)
As someone said is like RP.
@user Good day: wait, i will help you:
this script full? or not?
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview