Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Reborn ClientAdmin and Mefy Mods

  1. #1

    Question Reborn ClientAdmin and Mefy Mods

    I like ClientAdmin AccessLevels System it's safe, but there is no AccessLevel for cvars of Mefy Mod extended gametypes.
    In fact, it is necessary to give access to the commands (roundlimit, sv_maplist, among others).

    ¿There is a way to give access or include these mentioned commands?

  2. #2

    Default

    if you add the rights 4096 he will able to set any cvar on the server including the mefy ones.

  3. #3

    Default

    Yes, but it's a lot of power for a client admin that I just want to change the map and rotation

  4. #4

    Default

    tt
    Last edited by Slimbips {sfx}; June 12th, 2019 at 08:48 AM.

  5. #5
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,498

    Default

    You can use scmd + a simple isadmin check. Inside scmd add any custom command you want.

  6. #6

    Default

    Well, it's simple system and simple logic, if something seems not "doable" it's not doable.
    Write yourself script using scmd event, check if command sender is admin, and if he does, overwrite cvar value with one he sent with command.

    EDIT: lol, RyBack was faster, big minds think similarly. >: D
    Feel like talking to me? DM me on:
    a) Facebook
    b) Discord tag: Criminal#9220

    Although above thing is clear invitation to conversation, I won't write for you mods outside of x-null, so please, don't PM me if you do so only to request this.

  7. #7

    Talking

    well, taking into account the suggestion of Ryback and Criminal and investigating, get to this:

    Code:
    main: 
    
    if(level.clientrcon == 1)
      {end}
    level.clientrcon = 1
    	
    local.result = registerev "servercommand" global/servercommandhandler.scr::servercommand
    
    end
    
    servercommand local.player local.command local.args:
    	
    	local.ccmd = ad_g_extgametype::ad_sv_maplist::ad_roundlimit::ad_force
    	local.cmds = g_extgametype::sv_maplist::roundlimit::force
    
    	for (local.i = 1; local.i <= 4; local.i++)		
    	  if ((local.player isadmin) && (local.command == local.ccmd[i]))
    	    stuffsrv (local.cmds[i]+ " " + local.args)		
    end
    can correct me please, how and where the script runs so that it works correctly.
    Last edited by feralv; June 12th, 2019 at 01:42 AM.

  8. #8
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,498

    Default

    Quote Originally Posted by feralv View Post
    well, taking into account the suggestion of Ryback and Criminal and investigating, get to this:

    HTML Code:
    main: 
    
    if(level.clientrcon == 1)
      {end}
    level.clientrcon = 1
        
    local.result = registerev "servercommand" global/servercommandhandler.scr::servercommand
    
    end
    
    servercommand local.player local.command local.args:
        
        local.ccmd = ad_g_extgametype::ad_sv_maplist::ad_roundlimit::ad_force
        local.cmds = g_extgametype::sv_maplist::roundlimit::force
    
        for (local.i = 1; local.i <= 4; local.i++)        
          if ((local.player isadmin) && (local.command == local.ccmd[i]))
            stuffsrv (local.cmds[i]+ " " + local.args)        
    end
    can correct me please, how and where the script runs so that it works correctly.
    HTML Code:
    main: 
    
    if(level.clientrcon == 1)
      {end}
    level.clientrcon = 1
        
    local.result = registerev "servercommand" global/servercommandhandler.scr::servercommand
    
    end
    
    servercommand local.player local.command local.args:
        if !(local.player isadmin)
           end
        local.ccmd = ad_g_extgametype::ad_sv_maplist::ad_roundlimit::ad_force
        local.cmds = g_extgametype::sv_maplist::roundlimit::force
    
        for (local.i = 1; local.i <= 4; local.i++)        
            if (local.command == local.ccmd[i])
           {
                 stuffsrv (local.cmds[i]+ " " + local.args)       
                end
           }
    end
    put it in global/servercommandhandler.scr and exec global/servercommandhandler.scr from dmprecache.
    you might want to add some sorta permission system too.

  9. #9
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,231

    Default

    You can ask people to send additional auth token - simple string together with command, as one of it arguments. Based on that token you can grant different privileges to different sets of commands and this way create more fine-grained permissions.
    Then you give selected tokens to selected people, granting them those privileges.

  10. #10

    Default

    Thanks for the Ryback correction, Razo [R] apiD is a good idea.
    But for some reason it is not working, I have no conflicts with other mods because I am doing tests with original server files version 3.5.1.

    Any observation or suggestion.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •