Forum

> > CS2D > Scripts > Clientdata for the new CS2D
Forums overviewCS2D overview Scripts overviewLog in to reply

English Clientdata for the new CS2D

3 replies
To the start Previous 1 Next To the start

old Clientdata for the new CS2D

Mami Tomoe
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("clientdata","RP.clientData")
function RP.clientData(id,mode,x,y)
	if mode == 2 then
		if action_f4[id]==true then
			parse("setpos "..id.." "..x.." "..y)
			action_f4[id]=false
			return
		end
		if player(id,"weapontype") == 69 then
			parse("explosion "..x.." "..y.." 32 10000000 "..id)
		end
	end
end
Can someone tell my why this script does not work on the new CS2D version? I get wrong X and Y depending on the resolution.

old Re: Clientdata for the new CS2D

Mami Tomoe
User Off Offline

Quote
The first half will teleport me when I click F4, the second half will create an explosion where I hit with a machete.

Both use X and Y from my mouse's X and Y, they will do it in a wrong X and Y if I use the non default resolution...
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview