Juanasdf Posted September 17, 2022 Share Posted September 17, 2022 (edited) I'm trying to set up a mod for a dedicated server, that will allow players to vote for rollbacks and kicking, but not for regenerating or banning. Unless I missed something, you can't specify it that way in the cluster.ini of the dedicated server (it's either all voting enabled or no voting at all). I didn't get anywhere, this is what a friend and I could come up with: function SetUserCommandPermission() GLOBAL.require("usercommands").GetCommandFromName("kick").vote = true GLOBAL.require("usercommands").GetCommandFromName("kick").permission = "USER" GLOBAL.require("usercommands").GetCommandFromName("ban").permission = "ADMIN" GLOBAL.require("usercommands").GetCommandFromName("rollback").vote = true GLOBAL.require("usercommands").GetCommandFromName("rollback").permission = "USER" GLOBAL.require("usercommands").GetCommandFromName("regenerate").permission = "ADMIN" end AddPrefabPostInit("world", SetUserCommandPermission) I tried this code last night but it makes players able to rollback without voting... and I don't remember what happened with the regen command but I believe it also didn't work... Also let me know if there is any way to lower the amount of players needed for a vote, it'd be good to not need 3 folks to test this lol. Edited September 17, 2022 by Juanasdf 1 Link to comment https://forums.kleientertainment.com/forums/topic/143258-mod-to-disable-regenerate-world-vote/ Share on other sites More sharing options...
Juanasdf Posted September 18, 2022 Author Share Posted September 18, 2022 I got it to work with function SetUserCommandPermission() GLOBAL.require("usercommands").GetCommandFromName("regenerate").vote = false end AddPrefabPostInit("world", SetUserCommandPermission) Turns out "vote" determines if players can start a vote and NOT if the command will go through one The permissions just change who can run the command WITHOUT voting. Link to comment https://forums.kleientertainment.com/forums/topic/143258-mod-to-disable-regenerate-world-vote/#findComment-1598705 Share on other sites More sharing options...
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