Ulysses Stuff > Ulysses Release Archives
Automatic Votemap
DrTight:
This is my full automatic votemap system.
You can add maps to a pool which are used for votes.
Its very usefull, if you want a mapcycle where the players can choose the nextmap.
It works like the Metamod addon for TF2 or Css
Ulx is required to run this module.
Extract the lua to your ulx/lua/modules folder and extract the mapcycle.txt to your data folder.
Restart the server.
Have fun
DrTight
benbrooks:
When you say 'ulx/lua/modules', well, There isn't one.
There are however these;
'ulx/lua/ULib/modules'
'ulx/lua/ulx/modules'
I suspect that it's ulx, since that's where most of the other 'plugins' are like fun commands and stuff. Just thought i'd let you know ;)
DrTight:
Oh sry, i forgot, its ulx/modules :D
BBgamer:
Thankyou, perfect for my Gjail server! Now i can have votes to change to ba_jail_mars or ba_jail_v4!
DeimosTK:
Last week, DrTight's Automapvote script was working fine and dandy in my server on an older version of ULX. I recently decided to update to the SVN version, so the automapvote script similarly decided to not work anymore. It's giving the following error:
--- Code: ---Warning: vgui.Create failed to create the VGUI component (DFrame)
ulx/modules/cl/cl_automapvote.lua:37: attempt to index local 'main' (a nil value)
--- End code ---
This is the piece of code in question:
--- Code: ---local function PaintClockFrame()
local main = vgui.Create( "DFrame" )
main:SetSize(250,60)
main:SetPos(ScrW() /2 - (main:GetWide() /2),ScrH() - main:GetTall())
main:ShowCloseButton(false)
main:SetDraggable(false)
main:SetTitle("")
main:ShowCloseButton(false)
function main:Paint()
local str = timeToStr(timeleft)
local nxtmp = "Next Map: "..nextmap
local votestr = "Changing in: "..str
if !votedone then
nxtmp = "Current Map: "..nextmap
votestr = "Next Vote: "..str
end
local h,w = main:GetWide(), main:GetTall()
surface.SetDrawColor( 255, 255, 255, 120 )
surface.DrawRect( 1, 1,h-1 ,w-1)
surface.SetDrawColor( 100, 100, 255, 240 )
surface.DrawOutlinedRect( 0,0,h,w )
draw.SimpleText(votestr,"ScoreboardText",10,5,Color(100,0,0,200))
draw.SimpleText("Votes Left: "..votesleft,"ScoreboardText",10,20,Color(0,0,0,200))
draw.SimpleText(nxtmp,"ScoreboardText",10,35,Color(0,0,0,200))
end
return main
end
--- End code ---
Now seeing as the script itself was unchanged, it's also entirely possible that I simply put the files in the wrong folders after updating ULX. They're in the following locations:
--- Code: ---garrysmod/addons/ulx/lua/ulx/modules/sv_automapvote.lua
garrysmod/addons/ulx/lua/ulx/modules/cl/cl_automapvote.lua
--- End code ---
Anyone have any ideas?
Navigation
[0] Message Index
[#] Next page
Go to full version