meh Posted April 29, 2012 Posted April 29, 2012 (edited) 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: 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 May 8, 2012 by Guest
KenXeiko Posted April 29, 2012 Posted April 29, 2012 Uhm, I'm not sure I can help that point. But about /new command, I'm not totally sure. I ever try to stop votemanager, but people still can use /new command. But it only show the outputChatBox, and nothing happen after all.
Al3grab Posted April 30, 2012 Posted April 30, 2012 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 )
meh Posted May 1, 2012 Author Posted May 1, 2012 i gotta simply put it somewhere in votemanager_server.lua? ty for your help. ^^ and bump, i still need some help with votemanager's timeout.
Al3grab Posted May 1, 2012 Posted May 1, 2012 i gotta simply put it somewhere in votemanager_server.lua? yes and you can make a new resource for that.
NextGenRP Posted May 2, 2012 Posted May 2, 2012 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.
meh Posted May 2, 2012 Author Posted May 2, 2012 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?
Jaysds1 Posted May 3, 2012 Posted May 3, 2012 (edited) 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 May 7, 2012 by Guest
meh Posted May 7, 2012 Author Posted May 7, 2012 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?
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