Key swap.

Hey, I’m working on a gamemode that positions the camera at the side of the player and map. Like a 2D3D game.

Part of my gamemode uses the A and D keys to rotate the character and move it forward.

So if I press A my character would turn left and walk forward instead of moving to my left. Is there anyway possible on how I could stop it from using the original key and going with my method?

(I’m sorry if this thread is confusing)

[editline]04:23PM[/editline]

Can someone please help me?

**[Gamemode.CreateMove

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.CreateMove)**
**[CUserCmd.GetButtons

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=CUserCmd.GetButtons)**

If you want to know if a button is pressed do this:
[lua]
if ucmd:GetButtons() & IN_WHATEVER != 0 then

//IN_WHATEVER is pressed

end
[/lua]