Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to use any key to open PointShop #280

Merged
merged 4 commits into from
Apr 5, 2018

Conversation

damiankil1999
Copy link
Contributor

This pull request adds the ability to use any key as PS.Config.ShopKey

@@ -154,6 +154,19 @@ hook.Add('Think', 'PS_Think', function()
end
end)

-- Ability to use any button to open pointshop.
local pstoggle = false
hook.Add("Think", "PS_ToggleKey", function()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No no no. Use a key input hook.

@handsomematt
Copy link
Collaborator

Have you tested this with the PlayerButtonDown hook? @damiankil1999

If you can confirm it works without error I'll merge it in.

@damiankil1999
Copy link
Contributor Author

@handsomematt Yes i can confirm it is running without any errors, I've tested it on the latest Garry's Mod version (2018.02.26) both on single-player and multiplayer (running SRCDS for windows).

If the server owner specifies a invalid key it will not show errors, the keybinding will simply not open pointshop, however players can still open the shop with the console command or chat command. so everything keeps working as expected.

@handsomematt handsomematt merged commit 25ca32a into adamdburton:master Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants