mkafrin / PolyZone

PolyZone is a FiveM mod to define zones of different shapes and test whether a point is inside or outside of the zone
MIT License
202 stars 193 forks source link

QUESTION #78

Closed Exyztence closed 1 year ago

Exyztence commented 1 year ago

Hi, I am using polyzone on qb-core, and players by default have an access to command /pzcreate. How can I remove it?

mkafrin commented 1 year ago

There's many ways but probably the simplest is you can wrap everything in creation/client/commands.lua with this:

local enableCommands = false
if enableCommands then
 -- Existing code goes here
end

then just set enableCommands to true when developing locally, but leave it as false normally.

Exyztence commented 1 year ago

oh didnt think about it, easy fix, done it, thanks!

On Sun, Apr 9, 2023 at 5:39 PM mkafrin @.***> wrote:

There's many ways but probably the simplest is you can wrap everything in creation/client/commands.lua with this:

local enableCommands = falseif enableCommands then -- Existing code goes hereend

then just set enableCommands to true when developing locally, but leave it as false normally.

— Reply to this email directly, view it on GitHub https://github.com/mkafrin/PolyZone/issues/78#issuecomment-1501155906, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL2ZOMRKTY2BTJQX4GFEDA3XALJ2HANCNFSM6AAAAAAWYFNSAA . You are receiving this because you authored the thread.Message ID: @.***>