Forum

> > CS2D > Scripts > Adding Next and Previous Page
Forums overviewCS2D overview Scripts overviewLog in to reply

English Adding Next and Previous Page

3 replies
To the start Previous 1 Next To the start

old Adding Next and Previous Page

Man Of Steel
User Off Offline

Quote
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.

old Re: Adding Next and Previous Page

j0kER aR
User Off Offline

Quote
Here you have >
edited 2×, last 30.10.18 08:42:46 am

old Re: Adding Next and Previous Page

NeptooN
User Off Offline

Quote
Try!
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
---------------------------------------
-- 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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview