Forum




disallow f2/f3 when spectator
9 replies




player(id,"team")==3

edited 2×, last 17.01.12 01:42:45 am
1
2
3
2
3
if (player(id,"team")~=0) then -- menu stuff end
In theory, it should work.
edited 1×, last 17.01.12 08:34:21 pm
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
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
addhook("serveraction","EXPserveraction") function EXPserveraction(id,action) 	if player(id, 'health') <= 0 then return end 	if action == 1 then 		if not PLAYERS[id].Tutorial.inventory then 			message(id, "This is your inventory. You can equip or use items by clicking on them. You can press F3 to access your equipment.", "255128000") 			PLAYERS[id].Tutorial.inventory = true 		end 		inventory(id) 	elseif action == 2 then 		if not PLAYERS[id].Tutorial.inventory then 			message(id, "This is your equipment. You can unequip or use items by clicking on them.", "255128000") 			PLAYERS[id].Tutorial.inventory = true 		end 		equipment(id) 	elseif action == 3 then 		if PLAYERS[id].tmp.exhaust.use then 			return 		end 		PLAYERS[id].tmp.exhaust.use = true 		timer(CONFIG.EXHAUST.USE, "rem.useExhaust", tostring(id)) 		local itemid = PLAYERS[id].Equipment[9] 		if itemid then 			local amount, items = itemcount(id, itemid) 			message(id, "Using " .. (amount == 0 and ("the last " .. ITEMS[itemid].name) or ("one of " .. fullname(itemid, amount+1))) .. "...@C", "000255000") 			ITEMS[itemid].func[1](id, 9, itemid, true) 			if amount > 0 then 				table.remove(PLAYERS[id].Inventory, items[1]) 				PLAYERS[id].Equipment[9] = itemid 			end 		else 			message(id, "You can hold a rune and use F4 to cast it easily.", "255255255") 		end 	end end
Enjoy !


Admin/mod comment




