Forum

> > CS2D > Scripts > Find player who alt-attacked.
Forums overviewCS2D overview Scripts overviewLog in to reply

English Find player who alt-attacked.

1 reply
To the start Previous 1 Next To the start

old Re: Find player who alt-attacked.

Bowlinghead
User Off Offline

Quote
Once you got the player id, you can use cs2d lua cmd player for the rest:
1
2
3
4
5
6
7
8
9
addhook("attack2","youAreHigh")
function youAreHigh(id, mode)
	local x = player(id,"x")
	local y = player(id,"y")
	local name = player(id,"name")
	local team = player(id,"team")
	local wpn = player(id,"weapontype")
	msg(name.." wanted to test his new "..wpn..". Hopefully he doesnt kill any "..team.." on "..x.." / "..y)
end

"how do I check what player clicked?" You mean which player actually clicked mouse2? By the id in the parameter (cs2d lua hook attack2 )
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview