function ulx.difficulty( calling_ply, title, ... )
if ulx.voteInProgress then
ULib.tsayError( calling_ply, "There is already a vote in progress. Please wait for the current one to end.", true )
return
end
ulx.doVote( title, { ... }, voteDone )
ulx.fancyLogAdmin( calling_ply, "#A started a vote to set the server difficulty (#s)", title )
end
local vote = ulx.command( CATEGORY_NAME, "ulx difficulty", ulx.vote, "!difficulty" )
vote:addParam{ type=ULib.cmds.StringArg, "title" }
vote:addParam{ type=ULib.cmds.StringArg, "options", ULib.cmds.takeRestOfLine, repeat_min=2, repeat_max=10 }
vote:defaultAccess( ULib.ACCESS_ADMIN )
vote:help( "Starts a public vote to change the server difficulty." )
Is there a way to make this have a predifined title, predifined options and if option succeeds then, so when someone does ulx difficulty a vote starts with the predifined stuff I want?
I cannot find any tutorial on the entire internet, and to make things worse there is no gmod lua custom vote tutorial online either, when I search it up all I see are map vote addons.
Edit: I posted a job on scriptfodder for this task:
https://www.gmodstore.com/jobs/view/16689