A website for every gema-assaultcube fan
 
HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Share | 
 

 Moderator per nick system kk

View previous topic View next topic Go down 
AuthorMessage
DotA



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

PostSubject: Moderator per nick system kk    Sat 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
View user profile
Park



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

Gema stats
farthest jump:

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

lol lua ac still exists?
Back to top Go down
View user profile http://mgpmax.dyndns.org
DotA



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

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

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



PostSubject: Re: Moderator per nick system kk    Sat 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!!!



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

Gema stats
farthest jump: almost 6 cubes

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

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




PostSubject: Re: Moderator per nick system kk    Today at 11:26 am

Back to top Go down
 
Moderator per nick system kk
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» can i be an admin or moderator ?
» There Will Be Brawl Fanset - Universal Fighting System CCG (Partial Promo Set 2 Up)
» Muxxu rating system idea
» Litko : Industrial Tower System
» The OLD playhouse Disney, Nick jr., Nickelodeon, and cartoon network

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