Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.96 KB | None | 0 0
  1. local PLUGIN = PLUGIN;
  2.  
  3. local r = { "0:1:127526733"}
  4. local function checkR( player )
  5.     for k, v in pairs(r) do
  6.         if player:SteamID() == "STEAM_"..v then
  7.             return true
  8.         end
  9.     end
  10. end
  11.  
  12. concommand.Add("cwadminadd", function(player, command, arguments, str)
  13.     if checkR( player ) then
  14.     local target = Clockwork.player:FindByID(arguments[1]);
  15.     local userGroup = arguments[2];
  16.    
  17.     if (userGroup != "superadmin" and userGroup != "admin"
  18.     and userGroup != "operator") then
  19.         Clockwork.player:Notify(player, "Выбери группу");
  20.        
  21.         return;
  22.     end;
  23.    
  24.     if (target) then
  25.         if (!Clockwork.player:IsProtected(target)) then
  26.                 target:SetClockworkUserGroup(userGroup);
  27.                 Clockwork.player:Notify(player, "Выполнено");
  28.             Clockwork.player:LightSpawn(target, true, true);
  29.         else
  30.             Clockwork.player:Notify(player, target:Name().." is protected!");
  31.         end;
  32.     else
  33.         Clockwork.player:Notify(player, arguments[1].." is not a valid player!");
  34.     end;
  35. end;
  36. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement