Jump to content

about votemanager's timeout.


meh

Recommended Posts

hi there. for some reason i can't get the votemanger to work properly. i just want to change all votes timeout from 15 to 7,

as you can see i already tried to do that in the script's settings:

d753b1733ca2t.jpg

b1b01e430dd9t.jpg

but it didn't really change anything. what's wrong? and my second question: how to disable /new command? thanx for ur advices in advance. :)

Edited by Guest
Link to comment

for the second you can use

  
addEventHandler('onPlayerSpawn',root,function() -- or any other event 
       removeCommandHandler('new') 
end ) 
  

or

  
addEventHandler('onPlayerCommand',root,function(CommandName)  
       if ( CommandName == 'new' ) then 
           cancelEvent() 
       end 
end ) 
  

Link to comment

You should be able to just go into meta.xml and find any of the timers you want to change and do it there but you can try this although i have not tested;

Find: activePoll.timeout and replace with 7 it should look something like 7 * 1000

Like i said, I haven't tested and there is probably more timers to change than that so back it up first.

Link to comment

thanx a lot. i'll try that.

added:

just checked the meta, and it looks like this already:

    "jbeta" description="Vote manager resource" type="script" version="1.1.0" /> 
    resource="helpmanager" /> 
     
    

and the time out is still 15 secs. wtf? :shock:

Link to comment

here's my votemanager meta.xml:

<meta> 
    <info author="jbeta" description="Vote manager resource" type="script" version="1.1.0" /> 
    <include resource="helpmanager" /> 
     
    <script src="votemanager_errorcodes.lua" type="server"/> 
    <script src="votemanager_server.lua" type="server"/> 
        <export function="startPoll"/> 
        <export function="stopPoll"/> 
        <export function="finishPoll"/> 
    <script src="votemanager_polls.lua" type="server"/> 
        <export function="voteMap"/> 
        <export function="voteKick"/> 
        <export function="voteBan"/> 
        <export function="voteBetweenMaps"/> 
        <export function="voteBetweenModes"/> 
    <script src="votemanager_client.lua" type="client"/> 
    <config src="help.xml" type="client" /> 
     
    <settings> 
        <setting name="*color" value="#DF6464" /> 
        <setting name="*log_votes" value="[true]" /> 
     
        <setting name="*default_timeout" value="[15]"/> 
        <setting name="*default_allowchange" value="[false]"/> 
        <setting name="*default_percentage" value="[65]"/> 
        <setting name="*default_maxnominations" value="[3]"/> 
  
        <setting name="*votemap_enabled" value="[true]"/> 
        <setting name="*votemap_timeout" value="[15]"/> 
        <setting name="*votemap_locktime" value="[120]"/> 
        <setting name="*votemap_percentage" value="[70]"/> 
        <setting name="*votemap_allowchange" value="[true]"/> 
         
        <setting name="*votemode_enabled" value="[true]"/> 
        <setting name="*votemode_timeout" value="[15]"/> 
        <setting name="*votemode_locktime" value="[120]"/> 
        <setting name="*votemode_percentage" value="[70]"/> 
        <setting name="*votemode_allowchange" value="[true]"/> 
         
        <setting name="*votekick_enabled" value="[true]"/> 
        <setting name="*votekick_timeout" value="[15]"/> 
        <setting name="*votekick_locktime" value="[120]"/> 
        <setting name="*votekick_percentage" value="[70]"/> 
        <setting name="*votekick_allowchange" value="[true]"/> 
         
        <setting name="*voteban_enabled" value="[false]"/> 
        <setting name="*voteban_timeout" value="[15]"/> 
        <setting name="*voteban_locktime" value="[120]"/> 
        <setting name="*voteban_percentage" value="[75]"/> 
        <setting name="*voteban_allowchange" value="[true]"/> 
         
        <setting name="*votekill_enabled" value="[false]"/> 
        <setting name="*votekill_timeout" value="[15]"/> 
        <setting name="*votekill_locktime" value="[120]"/> 
        <setting name="*votekill_percentage" value="[70]"/> 
        <setting name="*votekill_allowchange" value="[true]"/> 
    </settings> 
</meta> 

Edited by Guest
Link to comment
You should be able to just go into meta.xml and find any of the timers you want to change and do it there but you can try this although i have not tested;

Find: activePoll.timeout and replace with 7 it should look something like 7 * 1000

Like i said, I haven't tested and there is probably more timers to change than that so back it up first.

ty for the tip, but my votemanger's meta looks like what Jaysds1 has posted. But i managed to find a function that resembles the one you've told me about. it is in votemanager_server.lua . there're actually 2 strings that have this function: here they are:

activePoll.finishesAt = getTickCount() + activePoll.timeout  * 1000 
pollTimer = setTimer(endPoll, activePoll.timeout  * 1000, 1) 

yeah, but when i put 7 in front of "*" votemanager just stopped to work lol. so maybe anyone else has some thought on the topic?

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