GetMouseY and GetMouse X Error

hello

i want to use this https://wiki.garrysmod.com/page/CUserCmd/GetMouseX
but when i use this it make me “that attempt to call method ‘GetMouseY’ (a nil value)”

thank you for your future help

You are probably trying to use it on CMoveData. Post your code.



	if self.Owner:GetMouseY() or self.Owner:GetMouseX() then
	end

You must be using the function on CUserCMD object, not a Player object.

how can i do that can you post a exemple pls if it does not bother you

Your move hook should have an argument like “cmd” or something.



	if cmd:GetMouseY() or cmd:GetMouseX() then
	end


thank you it works

Then mark the thread solved