Forum

> > CS2D > Scripts > Unknown error lua
Forums overviewCS2D overview Scripts overviewLog in to reply

English Unknown error lua

4 replies
To the start Previous 1 Next To the start

old Unknown error lua

Leonidas12
User Off Offline

Quote
my shotgun lua is not working any shows hooks √
shows menu √
shows hooks √
buttons working ×

there is lua:
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
addhook("serveraction","_serveraction")
addhook("menu","_menu")
addhook("startround","_startround")

function _serveraction(id,action)
     menu(id,"Shotgun Pro Buy,Buy Shotgun,Buy Armor,Buy HE") end
  
function _menu(id,title,button)
          end
if title=="Shotgun Pro Buy" then
     if button==1 then
          if player(id,"money")>=2000 then
               parse("equip "..id.." 11 ")
               parse("setmoney "..id.." "..player(id,"money")-2000)
          end
     elseif button==2 then
          if player(id,"money")>=8500 then
               parse("equip "..id.." 58 ")
               parse("setmoney "..id.." "..player(id,"money")-8500)
          end
     elseif button==3 then
          if player(id,"money")>=13000 then
               parse("equip "..id.." 51 ")
               parse("setmoney "..id.." "..player(id,"money")-8500)
          end
     end
end

function _startround()
     parse("hudtxt 1 \"©255255255CT's Score "..game("score_ct").."\" 300 458")
     parse("hudtxt 2 \"©255255255T's Score "..game("score_t").."\" 200 458")
end

WHERE ERROR???

old Re: Unknown error lua

Yates
Reviewer Off Offline

Quote
1
2
function _menu(id,title,button)
 end
Did, you just end your function BEFORE it even started!?
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview