14:54:42.076 - Infinite yield possible on 'Players.chrisopdemobiel.PlayerGui.Cmdr:WaitForChild("Frame")'
14:54:42.082 - Stack Begin
14:54:42.084 - Script 'ReplicatedStorage.CmdrClient.CmdrInterface.Window', Line 21
14:54:42.085 - Stack End
Could there be a testing placefile with Cmdr installed only? The community can use it to easily test it out to determine if it’s fitting the needs of them.
Using a VuePress plugin I wrote, the API Reference section is especially beautiful and much more detailed than before. Complete with hyperlinks to Cmdr and even Roblox types!
Hello, I’ve been looking through the code and I can’t seem to find where it makes sure that the player sending the command is an Admin. (Sorry for the bump)
I had the same question when I installed cmdr. This is what worked for me.
On the server (you can get the player inside the hook with context.Executor):
local rs = game:GetService("ReplicatedStorage");
local resources = require(rs:WaitForChild("Resources"));
local cmdr = resources:LoadLibrary("Cmdr");
cmdr:RegisterDefaultCommands();
cmdr.Registry:AddHook("BeforeRun", function(context)
if (check if user isnt admin here) then
return "You're not an admin!";
end
end)
On the client:
local rs = game:GetService("ReplicatedStorage");
local resources = require(rs:WaitForChild("Resources"));
local cmdr = resources:LoadLibrary("CmdrClient");
if (check if user is admin) then
cmdr:SetActivationKeys({Enum.KeyCode.Semicolon});
else
cmdr:SetActivationKeys({});
end
A better way to disable Cmdr from being used by a non-admin is to use CmdrClient.SetEnabled. Setting the activation keys to a blank table probably isn’t a good idea.
Wow that is a lot of work, and it’s did very well, you did an awesome job, there aren’t so many admins commands setups in roblox so you did a great contribute for developers too.
Hello, to toggle the command bar you would press the activation key(s) you have set in LocalScript where you required the CmdrClient module. By default, it would be Semicolon if you copied and pasted the code on the setup guide.
The RoStrap Roblox Studio plugin does not work. It is stuck on the loading screen and will not work for anyone. (If you look on the comments of the plugin you will see)