English Adding Next and Previous Page

3 replies
Goto Page
To the start Previous 1 Next To the start
30.10.18 07:23:52 am
Up
Hi guys,

I want to add Next Page and previous Page in my Shop menu script , So i hope may be somebody will help me

Spoiler >


I'm not scripter that's why i can't do this, but i need this.
FRiendly boYy.
30.10.18 08:05:29 am
Up
ACROHAL
User
Offline Off
Here you have >
edited 2×, last 30.10.18 08:42:46 am
What the F.A.Q.?| zyLva okteLon ∗ faqduLLAH
30.10.18 08:10:28 am
Up
NeptooN
User
Offline Off
Try!
[code]---------------------------------------
-- Lozan123 --
---------------------------------------
ms={}

----------------------
-- Initial Setup --
----------------------
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
ms.money=initArray(32)
function ms.moneyshow(id)
parse('hudtxt2 '..id..' 10 "©255075000Points: '..ms.money[id]..' " 320 54 0')
end

----------------------
-- Shops --
----------------------
function ms.shopa(id)
menu(id,"Shop 1/2,Machine Gun|200,Deagle|100,Armor|300,M4A1|280,Laser|400,Sheild|100,Heavy Armor|100,Machete|100,Next Page")
end


----------------------
-- Shop func's --
----------------------
addhook("menu","ms.buy")
function ms.buy(id,title,sel)
if title == "Shop 1/2" then
if sel == 1 then
if ms.money[id] > 199 then
parse("equip "..id.." 90")
msg2(id,"©000255000You've buy Machine Gun!@C")
ms.money[id]=ms.money[id]-200
ms.moneyshow(id)
else
msg2(id,"©255000000You have not enough Jail Packs@C")
end
end
if sel == 2 then
if ms.money[id] > 99 then
parse("equip "..id.." 3")
msg2(id,"©000255000You've buy Deagle!@C")
ms.money[id]=ms.money[id]-100
ms.moneyshow(id)
else
msg2(id,"©255000000You have not enough Jail Packs!@C")
end
end
if sel == 3 then
if ms.money[id] > 299 then
parse("equip "..id.." 80")
msg2(id,"©000255000You've buy Armor!@C")
ms.money[id]=ms.money[id]-300
ms.moneyshow(id)
else
msg2(id,"©255000000You have not enough Jail Packs!@C")
end
end
if sel == 4 then
if ms.money[id] > 279 then
parse("equip "..id.." 32")
msg2(id,"©000255000You've buy M4A1!@C")
ms.money[id]=ms.money[id]-280
ms.moneyshow(id)
else
msg2(id,"©255000000You have not enough Jail Packs!@C")
end
end
if sel == 5 then
if ms.money[id] > 399 then
parse("equip "..id.." 45")
msg2(id,"©000255000You've buy Laser!@C")
ms.money[id]=ms.money[id]-400
ms.moneyshow(id)
else
msg2(id,"©255000000You have not enough Jail Packs!@C")
end
end
if sel == 6 then
if ms.money[id] > 149 then
parse("setarmor "..id.." 41")
msg2(id,"©000255000You've buy Tactical Sheild!@C")
ms.money[id]=ms.money[id]-150
ms.moneyshow(id)
else
msg2(id,"©255000000You have not enough money!@C")
end
end
if sel == 7 then
if ms.money[id] > 219 then
parse("setarmor "..id.." 81")
msg2(id,"©000255000You've buy Heavy Armor!@C")
ms.money[id]=ms.money[id]-220
ms.moneyshow(id)
else
msg2(id,"©255000000You have not enough money!@C")
end
end
if sel == 8 then
if ms.money[id] > 299 then
parse("setarmor "..id.." 69")
msg2(id,"©000255000You've buy Machete!@C")
ms.money[id]=ms.money[id]-300
ms.moneyshow(id)
else
msg2(id,"©255000000You have not enough money!@C")
end
end
if sel == 9 then
menu(id,"Shop 2/2,Rocket Launcher|100,Previous page")
end
end
end

addhook("menu","paget")
function paget(id,title,sel)
if title == "Shop 2/2" then
if sel == 1 then
if ms.money[id] > 319 then
parse("setarmor "..id.." 48")
msg2(id,"©000255000You've buy Rocket Launcher!@C")
ms.money[id]=ms.money[id]-320
ms.moneyshow(id)
else
msg2(id,"©255000000You have not enough money!@C")
end

elseif sel == 2 then
menu(id,"Shop 1/2,Machine Gun|200,Deagle|100,Armor|300,M4A1|280,Laser|400,Sheild|100,Heavy Armor|100,Machete|100,Next Page")
end
end
end

-----------------------
-- Serveractions --
-----------------------
addhook("serveraction","ms.action")
function ms.action(id,action)
if action == 3 then
ms.shopa(id)
end
end

------------------------
-- Kill and spawn --
------------------------
addhook("spawn","ms.spawn")
function ms.spawn(id)
ms.moneyshow(id)
end

addhook("kill","ms.kill")
function ms.kill(id)
ms.money[id]=ms.money[id]+6
ms.moneyshow(id)
end

addhook("die","ms.die")
function ms.die(id)
ms.money[id]=ms.money[id]-2
ms.moneyshow(id)
end[/code]
30.10.18 06:08:56 pm
Up
Thanks both you
FRiendly boYy.
To the start Previous 1 Next To the start