My problem is : I don't get any weapons and don't lose money. Everything else in my script works fine but this doesn't
Spoiler
addhook("use","gunbuy")
function gunbuy(id,event,data,x,y)
if (x == 33 and y == 34) then
menu(id,"zderite kod joa,mashinka|1.200,noobumparica|2.000,pasteta|300,TRPGD|16.000,motorni dildo|5.000,snajper-man|10.000,HAX !")
elseif (x == 30 and y == 28) then
menu(id,"struja 4,ukljuci|2000 €")
elseif (x == 36 and y == 40) then
menu(id,"struja 3,ukljuci|2000 €")
elseif (x == 39 and y == 31) then
menu(id,"struja 2,ukljuci|2000 €")
elseif (x == 27 and y == 37) then
menu(id,"struja 1,ukljuci|2000 €")
end
end
addhook("menu","gunbuymenu")
function gunbuymenu(id,title,key)
if (title == "struja 4") then
if (key == 1) then
local money = player(id,"money")
if money>1999 then
parse("setmoney "..id.." "..(player(id,"money") - 2000))
parse("trigger pwr4")
parse("trigger pwrdelay4")
end
end
end
function gunbuymenu(id,title,key)
if (title == "struja 3") then
if (key == 1) then
local money = player(id,"money")
if money>1999 then
parse("setmoney "..id.." "..(player(id,"money") - 2000))
parse("trigger pwr3")
parse("trigger pwrdelay3")
end
end
end
function gunbuymenu(id,title,key)
if (title == "struja 2") then
if (key == 1) then
local money = player(id,"money")
if money>1999 then
parse("setmoney "..id.." "..(player(id,"money") - 2000))
parse("trigger pwr2")
parse("trigger pwrdelay2")
end
end
end
function gunbuymenu(id,title,key)
if (title == "struja 1") then
if (key == 1) then
local money = player(id,"money")
if money>1999 then
parse("setmoney "..id.." "..(player(id,"money") - 2000))
parse("trigger pwr1")
parse("trigger pwrdelay1")
end
end
end
if (title == "zderite kod joa") then
if (key == 1) then
local money = player(id,"money")
if money>1199 then
parse("setmoney "..id.." "..(player(id,"money") - 1199))
parse("equip "..id.." 30")
end
end
end
if (title == "zderite kod joa") then
if (key == 2) then
local money = player(id,"money")
if money>1999 then
parse("setmoney "..id.." "..(player(id,"money") - 2000))
parse("equip "..id.." 10")
end
end
end
if (title == "zderite kod joa") then
if (key == 3) then
local money = player(id,"money")
if money>299 then
parse("setmoney "..id.." "..(player(id,"money") - 300))
parse("equip "..id.." 77")
end
end
end
if (title == "zderite kod joa") then
if (key == 4) then
local money = player(id,"money")
if money>15999 then
parse("setmoney "..id.." "..(player(id,"money") - 16000))
parse("equip "..id.." 47")
end
end
end
if (title == "zderite kod joa") then
if (key == 5) then
local money = player(id,"money")
if money>4999 then
parse("setmoney "..id.." "..(player(id,"money") - 5000))
parse("equip "..id.." 85")
end
end
end
if (title == "zderite kod joa") then
if (key == 6) then
local money = player(id,"money")
if money>9999 then
parse("setmoney "..id.." "..(player(id,"money") - 10000))
parse("equip "..id.." 35")
end
end
end
if (title == "zderite kod joa") then
if (key == 7) then
menu(id,"zderite kod joa,mashinka|1.200 €,noobumparica|2.000 €,pasteta|300 €,TRPGD|16.000 €,motorni dildo|5.000 €,snajper-man|10.000 €,HAX !")
end
end
end
end
end
end
function gunbuy(id,event,data,x,y)
if (x == 33 and y == 34) then
menu(id,"zderite kod joa,mashinka|1.200,noobumparica|2.000,pasteta|300,TRPGD|16.000,motorni dildo|5.000,snajper-man|10.000,HAX !")
elseif (x == 30 and y == 28) then
menu(id,"struja 4,ukljuci|2000 €")
elseif (x == 36 and y == 40) then
menu(id,"struja 3,ukljuci|2000 €")
elseif (x == 39 and y == 31) then
menu(id,"struja 2,ukljuci|2000 €")
elseif (x == 27 and y == 37) then
menu(id,"struja 1,ukljuci|2000 €")
end
end
addhook("menu","gunbuymenu")
function gunbuymenu(id,title,key)
if (title == "struja 4") then
if (key == 1) then
local money = player(id,"money")
if money>1999 then
parse("setmoney "..id.." "..(player(id,"money") - 2000))
parse("trigger pwr4")
parse("trigger pwrdelay4")
end
end
end
function gunbuymenu(id,title,key)
if (title == "struja 3") then
if (key == 1) then
local money = player(id,"money")
if money>1999 then
parse("setmoney "..id.." "..(player(id,"money") - 2000))
parse("trigger pwr3")
parse("trigger pwrdelay3")
end
end
end
function gunbuymenu(id,title,key)
if (title == "struja 2") then
if (key == 1) then
local money = player(id,"money")
if money>1999 then
parse("setmoney "..id.." "..(player(id,"money") - 2000))
parse("trigger pwr2")
parse("trigger pwrdelay2")
end
end
end
function gunbuymenu(id,title,key)
if (title == "struja 1") then
if (key == 1) then
local money = player(id,"money")
if money>1999 then
parse("setmoney "..id.." "..(player(id,"money") - 2000))
parse("trigger pwr1")
parse("trigger pwrdelay1")
end
end
end
if (title == "zderite kod joa") then
if (key == 1) then
local money = player(id,"money")
if money>1199 then
parse("setmoney "..id.." "..(player(id,"money") - 1199))
parse("equip "..id.." 30")
end
end
end
if (title == "zderite kod joa") then
if (key == 2) then
local money = player(id,"money")
if money>1999 then
parse("setmoney "..id.." "..(player(id,"money") - 2000))
parse("equip "..id.." 10")
end
end
end
if (title == "zderite kod joa") then
if (key == 3) then
local money = player(id,"money")
if money>299 then
parse("setmoney "..id.." "..(player(id,"money") - 300))
parse("equip "..id.." 77")
end
end
end
if (title == "zderite kod joa") then
if (key == 4) then
local money = player(id,"money")
if money>15999 then
parse("setmoney "..id.." "..(player(id,"money") - 16000))
parse("equip "..id.." 47")
end
end
end
if (title == "zderite kod joa") then
if (key == 5) then
local money = player(id,"money")
if money>4999 then
parse("setmoney "..id.." "..(player(id,"money") - 5000))
parse("equip "..id.." 85")
end
end
end
if (title == "zderite kod joa") then
if (key == 6) then
local money = player(id,"money")
if money>9999 then
parse("setmoney "..id.." "..(player(id,"money") - 10000))
parse("equip "..id.." 35")
end
end
end
if (title == "zderite kod joa") then
if (key == 7) then
menu(id,"zderite kod joa,mashinka|1.200 €,noobumparica|2.000 €,pasteta|300 €,TRPGD|16.000 €,motorni dildo|5.000 €,snajper-man|10.000 €,HAX !")
end
end
end
end
end
end