gema
Would you like to react to this message? Create an account in a few clicks or log in to continue.


A website for every gema-assaultcube fan
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log in  

 

 Moderator per nick system kk

Go down 
3 posters
AuthorMessage
DotA

DotA


Messages : 102
Joined/Date d'inscription : 2012-08-05

Moderator per nick system kk  Empty
PostSubject: Moderator per nick system kk    Moderator per nick system kk  EmptySat Jan 31, 2015 7:05 am

Basic system:

advantages:
Moderators do not have the admin pass.
Moderators do not vote like admin.


Code:
function is_moderator(cn)

if (getname(cn) == "Your/friends nick") then
return true
end

if (getname(cn) == "moderator 2 nickname") then
return true
end
end
---------------------------------------------------------------------------------------------------------

you can add moderators by using
if (getname(cn) == "Nickname") then
return true
end

----------------------------------------------------------------------------------------------------------


in commands ( !kick , !ban, !ext )
just add  "if is_moderator(cn) then"
like this:
Code:


["!kick"] =
  {
    { false, false, false };
            function (cn, args)
             if is_moderator(cn) then
 local name = getname(cn)
 
    local cnx = tonumber(args[1])
    if cn == nil then say("\f4Wrong cn",cn) return end
    say(string.format("\f2[SERVER INFO] \f1" .. getname(cnx) .. "\f0 is kicked by \f2" .. getname(cn) .. "\f4!"))
      disconnect(cnx, DISC_MKICK)
 say("\fR[SERVER INFO]\f1  " ..getname(acn).. "\f2 was kicked. IP:" ..getip(acn).. ".")

                    else
                       say("you are not a moderator kkkkk", cn)
  end
                   end
  };

Code:

  ["!extend"] =
     {
       { false, false, false };
    function (cn, args)
  if is_moderator(cn) then
      if #args == 1 then
        settimeleft(tonumber(args[1]))
        say("\fR [SERVER INFO] \f2 Time remaining \f0changed!")
   else
 say("you are not a moderator kkkkk", cn)
      end
    end
end
  };

and in !cmds you can add if_ismoderator(cn) then
like this :

Code:
if is_moderator(cn) then
         say("\f2MODERATOR COMMANDS: \f6| \f2!extend <minutes> \f6| \f2!k (cn) \f6| \f2!b (cn) \f6| \fP", cn)
    end


 then search for "function onPlayerConnect(cn)" and after setautoteam(false)

Code:
if is_moderator(cn) then
say("\f2 You are a moderator!  \f1Type !cmds", cn)
say ("\f2 moderator online! \f1" .. getname(cn) )
end

OBS: for caution, add a whitelist with moderators nick / ip

srry 4 my bad english
Back to top Go down
Park

Park


Messages : 272
Joined/Date d'inscription : 2011-11-04

Gema stats
farthest jump:

Moderator per nick system kk  Empty
PostSubject: Re: Moderator per nick system kk    Moderator per nick system kk  EmptySat Jan 31, 2015 12:20 pm

lol lua ac still exists?
Back to top Go down
https://t.me/joinchat/APe7MT2YpmxobCH8tg7JJw
DotA

DotA


Messages : 102
Joined/Date d'inscription : 2012-08-05

Moderator per nick system kk  Empty
PostSubject: Re: Moderator per nick system kk    Moderator per nick system kk  EmptySat Jan 31, 2015 1:08 pm

yes kk
but only at linux
Back to top Go down
Guest
Guest




Moderator per nick system kk  Empty
PostSubject: Re: Moderator per nick system kk    Moderator per nick system kk  EmptySat May 02, 2015 9:50 am

whore


Last edited by BOKABORE!!!!!!!!!!!!!!!!! on Wed Dec 30, 2015 5:35 pm; edited 1 time in total
Back to top Go down
JagArNoob!!!

JagArNoob!!!


Messages : 48
Joined/Date d'inscription : 2015-06-28
Age : 28
Location/Localisation : Rio de Janeiro - Brazil

Gema stats
farthest jump: almost 6 cubes

Moderator per nick system kk  Empty
PostSubject: Re: Moderator per nick system kk    Moderator per nick system kk  EmptyMon Jun 29, 2015 12:06 pm

I didnt understand a fuckin thing
Back to top Go down
Sponsored content





Moderator per nick system kk  Empty
PostSubject: Re: Moderator per nick system kk    Moderator per nick system kk  Empty

Back to top Go down
 
Moderator per nick system kk
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
gema :: International :: Lua-
Jump to: