cato-a / CoDaM_MiscMod

Official MiscMod for CoDaM in Call of Duty 1.1
BSD 3-Clause "New" or "Revised" License
15 stars 5 forks source link

commands usable without user/group #20

Closed raphael12333 closed 11 months ago

raphael12333 commented 11 months ago

i didn't notice any issue i've been able to use commands only by setting perms to the default group, without needing to create any group neither user, like this:

set scr_mm_commands "1"
set scr_mm_groups ""
set scr_mm_perms_default "*"

i didn't add the code from https://github.com/cato-a/CoDaM_MiscMod/issues/19#issuecomment-1812544542 not to make any collision with your file

thank you very much

raphael12333 commented 11 months ago

for information i see i need to keep default defined in scr_mm_groups not to get the "No such command..." error when using my custom command (made with the CoDaM_CustomCommands repo)

cato-a commented 11 months ago

That is because the group must be "defined" before it's overridden.

https://github.com/cato-a/CoDaM_MiscMod/blob/0dcee77651f6218f8e942556b18d0ca7da72787b/___CoDaM_MiscMod/codam/_mm_commands.gsc#L12-L18

In CustomCommands I guess you could override like with this:

https://github.com/cato-a/CoDaM_MiscMod/blob/0dcee77651f6218f8e942556b18d0ca7da72787b/___CoDaM_MiscMod/codam/_mm_commands.gsc#L34-L35