Forum

> > CS2D > Scripts > disallow f2/f3 when spectator
Forums overviewCS2D overview Scripts overviewLog in to reply

English disallow f2/f3 when spectator

9 replies
To the start Previous 1 Next To the start

old disallow f2/f3 when spectator

Kantos
BANNED Off Offline

Quote
how can i make what when u are on spec mode u cannot open f2 f3 menu ?

Admin/mod comment

"how can i make" = worst title possible. the title should contain the actual question. fixed. do it better next time!

old Re: disallow f2/f3 when spectator

Kantos
BANNED Off Offline

Quote
i checked is == 0 i make it to 3 try nothink chached then i make back to 0 and thats on tibia i want make like ON CZ script u cannot open menu when u in spec or /kill mode and srr for my english
edited 2×, last 17.01.12 01:42:45 am

old thx

Kantos
BANNED Off Offline

Quote
can u tell me in what lua put it in tibia ?:d srr for enlish bad
edited 1×, last 17.01.12 08:34:21 pm

old Re: disallow f2/f3 when spectator

MikuAuahDark
User Off Offline

Quote
ooo you want put it at tibia? ok, find this, "addhook("serveraction","EXPserveraction")"(without quotes) and put it there, don't forgot add 1 end at end of script

old Re: disallow f2/f3 when spectator

KenVo
User Off Offline

Quote
Replace this with your server action hook at line 269 (if your hooks.lua is unedited)
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
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 !
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview