Jump to content

Help? Command


GamerDeMTA

Recommended Posts

Posted

You can stop it from the Admin Panel, Go to the Resources tap, Then search for a resource called [ votemanger ], And then double click on it, Modify settings like you wish, And it shall work .. ;D

Posted

Best thing to do is, go to yourmtaserver.conf file (located in; server/mods/deathmatch/). Scroll down to the bottom of the file and remove the line that says:

  
    "votemanager" startup="1" protected="0"/> 
  

Posted

But There Aren't Any Way To Stop It in a Game? I don't want to remove the votemanager or make votemap for admin, only command for stop it in the game, when we are playing.

Posted

use this

addEventHandler("onPlayerCommand", root, 
function(cmd) 
     if cmd == "votemap" then 
          outputChatBox ( "INFO: Comand votemap is disabled", source, 255, 69, 0 ) 
          cancelEvent() 
     end 
end) 

Posted
use this
addEventHandler("onPlayerCommand", root, 
function(cmd) 
     if cmd == "votemap" then 
          outputChatBox ( "INFO: Comand votemap is disabled", source, 255, 69, 0 ) 
          cancelEvent() 
     end 
end) 

With this setup, I've created a command you might like too;

addEventHandler("onPlayerCommand", root, 
function(cmd) 
     if cmd == "votemap" then 
        local accName = getAccountName ( getPlayerAccount ( source ) ) -- get his account name 
        if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) -- if he isn't an admin 
          outputChatBox ( "INFO: Comand votemap is disabled for normal players, please ask and admin to start a vote.", source, 255, 69, 0 ) 
          cancelEvent() 
        end 
     end 
end) 
  

Posted
addEventHandler("onPlayerCommand", root, 
function(cmd) 
     if cmd == "votemap" then 
        local accName = getAccountName ( getPlayerAccount ( source ) ) -- get his account name 
        if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- if he isn't an admin 
          outputChatBox ( "INFO: Comand votemap is disabled for normal players, please ask and admin to start a vote.", source, 255, 69, 0 ) 
          cancelEvent() 
        end 
     end 
end) 

Was missing a then at line 5 ^^ ..

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...