English Shop lua doesn't work

8 replies
Goto Page
To the start Previous 1 Next To the start
12.06.14 11:24:10 am
Up
Good day
User
Offline Off
My lua doesn't work. Pls help me.

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

Code:
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
12.06.14 11:25:46 am
Up
Yates
Reviewer
Offline Off
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.
12.06.14 11:38:47 am
Up
Mora_rus
User
Offline Off
@user Good day: for first, where you see money in cs2d that more than 16000?
Code:
1
if money[id]>=30000 then

your "end" place's is not right...
If you use "money" as hudtxt then you need array function.
12.06.14 11:41:01 am
Up
Pseudon
User
Offline Off
@user Mora_rus: On RP servers.
*Empty*
12.06.14 11:52:35 am
Up
Mora_rus
User
Offline Off
@user Pseudon: I think about...the code is not right ~99.99%
p.s- even if it not full
12.06.14 12:00:16 pm
Up
MikuAuahDark
User
Offline Off
Any errors on console?
file cs2d LuaJIT for Dedicated Server (11) JIT POWER! | Know your Lua errors! | Draw stuff at Pixelize Art --xx-- server!
12.06.14 01:15:06 pm
Up
Alpha Beta
User
Offline Off
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?
12.06.14 01:16:54 pm
Up
Xirot
User
Offline Off
Dude, this won't work lel.
You have to tell us the error in the console so we can help you..
#Discord CS2D Rework - https://discord.gg/pbhdVdj
12.06.14 01:33:39 pm
Up
Mora_rus
User
Offline Off
@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