If you look in the HL2RP files for commands, there MIGHT be an access flag like o, a, s etc.
I'm assuming o = operator, a = admin and s = superadmin.
The flag is the lowest rank that can use it, if there is no flag, everyone can use it, if it's o, all administrators + operator can use it and so on.
For example:
Code:
--[[
? 2013 CloudSixteen.com do not share, re-distribute or modify
without permission of its author ([email protected]).
--]]
local COMMAND = Clockwork.command:New("CharSetCustomClass");
COMMAND.tip = "Set a character's custom class.";
COMMAND.text = "<string Name> <string Class>";
COMMAND.access = "o";
COMMAND.arguments = 2;
-- Called when the command has been run.
function COMMAND:OnRun(player, arguments)
local target = Clockwork.player:FindByID( arguments[1] )
if (target) then
target:SetCharacterData( "customclass", arguments[2] );
Clockwork.player:NotifyAll(player:Name().." set "..target:Name().."'s custom class to "..arguments[2]..".");
else
Clockwork.player:Notify(player, arguments[1].." is not a valid character!");
end;
end;
COMMAND:Register();
The line COMMAND.access = "o"; can be changed to "a" to make it admin+, rather than operator+
Code:
--[[
? 2013 CloudSixteen.com do not share, re-distribute or modify
without permission of its author ([email protected]).
--]]
local COMMAND = Clockwork.command:New("CharSetCustomClass");
COMMAND.tip = "Set a character's custom class.";
COMMAND.text = "<string Name> <string Class>";
COMMAND.access = "a";
COMMAND.arguments = 2;
-- Called when the command has been run.
function COMMAND:OnRun(player, arguments)
local target = Clockwork.player:FindByID( arguments[1] )
if (target) then
target:SetCharacterData( "customclass", arguments[2] );
Clockwork.player:NotifyAll(player:Name().." set "..target:Name().."'s custom class to "..arguments[2]..".");
else
Clockwork.player:Notify(player, arguments[1].." is not a valid character!");
end;
end;
COMMAND:Register();