English Request about script

4 replies
Goto Page
To the start Previous 1 Next To the start
14.03.13 03:57:12 pm
Up
Gajos
BANNED
Offline Off
IMG:img33.imageshack.us/img33/5236/blockn.gif

How do I change the script to:
∗ Now that is the menu:
> 1. Laser
> 2. Super Armor
° I need to make it so the menu:
> 1. Super Armor
> 2. Laser

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
35
36
37
men = {}

men.name = 'Moje menu'
men.items = {
     ['Super Armor'] = function(id) parse('setarmor '..id..' 205') end;
     ['Laser'] = function(id) parse('equip '..id..' 45') parse('setweapon '..id..' 45') end;
}

men.engine = {}
for _, i in pairs(men.items) do
     table.insert(men.engine,_)
end

addhook('serveraction','men.serveraction')
men.serveraction = function(id,key)
     if key == 1 then
          local str = men.name..','
          local num = 1
          for _, i in pairs(men.items) do
               str = str.._
               if num < #men.engine then
                    str = str..','
               end
               num = num + 1
          end
          menu(id,str)
     end
end

addhook('menu','men.menu')
men.menu = function(id,t,b)
     if t == men.name then
          if b > 0 then
               men.items[men.engine[b]](id)
          end
     end
end
edited 1×, last 14.03.13 09:41:09 pm
Banned for Hacking/Cheating in CS2D /DC
14.03.13 04:18:03 pm
Up
Alistaire
User
Offline Off
The L is before the S, there's your problem.
IMG:http://i.imgur.com/5zhwOTP.png
14.03.13 04:20:28 pm
Up
wotaan
User
Offline Off
Code:
1
2
3
4
men.items = {
     ['1.Super Armor'] = function(id) parse('setarmor '..id..' 205') end;
     ['2.Laser'] = function(id) parse('equip '..id..' 45') parse('setweapon '..id..' 45') end;
}

there is always a solution to every problem.
IMG:http://x-gameservers.net/svlist/cs2d/109.73.77.38:35115.png
IMG:http://rj.revolvermaps.com/h/b/26/91hkrxy2xvp.png
14.03.13 04:28:52 pm
Up
Alistaire
User
Offline Off
user wotaan has written:
Code:
1
2
3
4
men.items = {
     ['1.Super Armor'] = function(id) parse('setarmor '..id..' 205') end;
     ['2.Laser'] = function(id) parse('equip '..id..' 45') parse('setweapon '..id..' 45') end;
}

there is always a solution to every problem.


That is not a solution. It would look like this in the menu;

1 1.Super Armor
2 2.Laser

This is ugly. What you should do is adding things like;

Code:
1
2
3
4
men.items = {
     {name = 'Super Armor', function = yourfunctionetc},
     {name = 'Laser', function = ...}
}
IMG:http://i.imgur.com/5zhwOTP.png
14.03.13 06:21:17 pm
Up
LazyGuy
GAME BANNED
Offline Off
@user Gajos: Did you use search? then why you created a thread.
http://unrealsoftware.de/forum_posts.php?post=228906#jn

Edit: What a great message i get from @user Gajos: +1 IMG:http://img715.imageshack.us/img715/3817/screenshuq.jpg
edited 3×, last 14.03.13 07:30:26 pm
Spread My Love.... 1Love
To the start Previous 1 Next To the start