Forum

> > CS2D > Scripts > I search this lua
Forums overviewCS2D overview Scripts overviewLog in to reply

English I search this lua

7 replies
To the start Previous 1 Next To the start

old Re: I search this lua

Alistaire
User Off Offline

Quote
There's no click hook, but you can use an attack hook and current mouse position on screen to make it look like you can click stuff.

old Re: I search this lua

Apache uwu
User Off Offline

Quote
cs2d lua hook always,cs2d lua hook clientdata,cs2d lua hook attack,cs2d lua hook menu,cs2d lua cmd reqcld,cs2d lua cmd menu

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
addhook("always","_always")
addhook("clientdata","_clientdata")
addhook("attack","_attack")
addhook("menu","_menu")

mouse={}

function _always()
	reqcld(0,0)
end

function _clientdata(id,mode,data1,data2)
	if mode==0 then
		mouse[id]={data1,data2}
	end
end

function _attack(id)
	if mouse[id][d1]>0 and mouse[id][1]<300 then
		if mouse[id][2]>0 and mouse[id][2]<300 then
			menu(id,"My Menu,Button 1,Button 2")
		end
	end
end

function _menu(id,title,button)
	if title=="My Menu" then
		if button==1 then
			msg2(id,"You pressed button 1.")
		elseif button==2 then
			msg2(id,"You pressed button 2.")
		elseif button==0 then
			msg2(id,"You pressed cancel.")
		end
	end
end

old Re: I search this lua

Trali
User Off Offline

Quote
Where is Lua Makers?
Engin33r??Katemire(have bug)??
edited 1×, last 19.04.12 07:48:38 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview