SA-MP-Plus icon indicating copy to clipboard operation
SA-MP-Plus copied to clipboard

Possibility of key press and mouse movements being added?

Open Crayder opened this issue 8 years ago • 1 comments

Key Presses

A list of generally used keys would be scanned using GetKeyState and when their state changes call a pawn callback. (Obviously this would be much like OnPlayerKeyStateChange, but without the bitmask of keys.)

Mouse Movement

The mouse position would be repeatedly checked (every 20-50 ms if enabled?) when the mouse is enabled. When it is changed call a pawn callback. OnPlayerClick would still be called on clicks alongside this.

Crayder avatar Nov 16 '15 14:11 Crayder

I think it would be better to register a set of keys to monitor, send that to the client when they connect so the client side only sends updates for those keys. This way, large servers can ensure no data is wasted (maybe even allow changing of this key set in runtime so if a player transitions to a state where they no longer need to use a certain key, that key is never sent (such as a different sub-gamemode or mission)).

Southclaws avatar Nov 16 '15 18:11 Southclaws