Killerbee_x. Posted February 2, 2011 Posted February 2, 2011 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' , I want an relevant answer Contact: killerbeeex (my xfire), [email protected] (my msn) Killerbee_x.
wannaknow Posted February 2, 2011 Posted February 2, 2011 (edited) 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 February 2, 2011 by Guest
Castillo Posted February 2, 2011 Posted February 2, 2011 Normal moderators group is called "Moderator" not "Moderators"
eAi Posted February 2, 2011 Posted February 2, 2011 You shouldn't be using isPlayerInACLGroup. See the yellow box on https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup
Killerbee_x. Posted February 2, 2011 Author Posted February 2, 2011 Well Guys, WannaKnow has helped me, And It seems it works ;P So, Ty all Lock?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now