Jump to content

Nextmap


Killerbee_x.

Recommended Posts

hey Guys

Some months ago I had made a server, With a normal ACL only changed for 3 different levels;

- Moderator

- SuperModerator

- Admin

The command 'nextmap' works on the aclGroup 'Admin' and 'SuperModerator', But not on 'Moderator'.

After a few weeks I got some question from my moderators, They wanted to have the ability to use the command 'nextmap'

I've tried to add at the FTP (internet one), to put it as a command 'command.nextmap'

But it still didn't work, I've been thinkin' and thinkin' But it didn't work..

So Now my question is;

How Can I Enable 'Nextmap' at the ACL of 'Moderators'?

Ps. My ScriptingSkills are so bad I dont want to have an answer like 'Script it' :P, I want an relevant answer

Contact: killerbeeex (my xfire), [email protected] (my msn)

Killerbee_x.

Link to comment

To edit this go to your race resource

Open the file racevoting_server.lua

Then search for this:

addCommandHandler('nextmap', 

Then edit the whole function to this:

addCommandHandler('nextmap', 
    function( player, command, ... ) 
        local query = #{...}>0 and table.concat({...},' ') or nil 
        if not query then 
            if g_ForcedNextMap then 
                outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) 
            else 
                outputRace( 'Next map is not set', player ) 
            end 
            return 
        end 
        local admin = false 
        if isPlayerInACLGroup(player, g_GameOptions.admingroup) or isPlayerInACLGroup(player, "Moderator") then 
            admin = true 
        end 
        if not _TESTING and admin == false then 
            return 
        end 
        local map, errormsg = findMap( query ) 
        if not map then 
            outputRace( errormsg, player ) 
            return 
        end 
        if g_ForcedNextMap == map then 
            outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) 
            return 
        end 
        g_ForcedNextMap = map 
        outputChatBox('Next map set to ' .. getMapName( g_ForcedNextMap ) .. ' by ' .. getPlayerName( player ), g_Root, 0, 240, 0) 
    end 
) 

After this reload the race resource, and even Moderators can use the command

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...