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
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
Img = {} Own = {} addhook('startround','Items_startround_hook') function Items_startround_hook() 	for j = 1,32 do 		Img[j] = 0 		for k = 1,100 do 			Own[j]['k'] = 0 		end 	end end function I_c_eD_clth(id) 	menu(id, 'eDock Clothes,Poncho|$100,Shirt|$20,Jacket|$70,Vest|$65,Anorak|$80,,,,,Close') end addhook('menu','Items_computer_hook') function Items_computer_hook(id, menu, sel) 	if (menu == 'eDock Clothes') then 		if sel == 1 then 			if player(id, 'money') >= 100 then 				parse('setmoney '..id..' '..player(id, 'money')-100) 				Own[id]['1'] = 1 			else 				msg2(id, '©255000000-Not enough money-') 			end 		end 	end end addhook('say','Clothes') function Clothes(id, txt) 	if txt == '!wear' then 		freeimage(Img[id]) 		if Own[id]['1'] == 1 then 			Img[id] = image(stpth..'eDock/Poncho.png',1,0,200+id) 		elseif Own[id]['2'] == 1 then 			Img[id] = image(stpth..'eDock/Shirt.png',1,0,200+id) 		end 		return 1 	end end
I want the Own[id]['itemid'] to be different for every player. At the moment the items are the same for everybody but the images differ.
How do I make the Own table have 2 of those fancy brackets; 1 for the player(id) and 1 for the 'itemid'?
edited 3×, last 23.01.12 01:24:44 pm