Deep thinker Posted November 27, 2016 Posted November 27, 2016 hey i have a script which makes the slots of the players half than the current local curMaxPlayers = getMaxPlayers() local newMaxPlayers = math.ceil( curMaxPlayers / 2 ) setMaxPlayers( newMaxPlayers ) and i tried to make it double the slots by changing "/" into "*" but it failed can someone tell me what to do,and please don't tell me to change the config i am not that silly :3
Tails Posted November 27, 2016 Posted November 27, 2016 local curMaxPlayers = getMaxPlayers() local newMaxPlayers = curMaxPlayers * 2 setMaxPlayers( newMaxPlayers ) Remove the math.ceil when multiplying.
Deep thinker Posted November 27, 2016 Author Posted November 27, 2016 1 minute ago, Tails said: local curMaxPlayers = getMaxPlayers() local newMaxPlayers = curMaxPlayers * 2 setMaxPlayers( newMaxPlayers ) Remove the math.ceil when multiplying. i would like to thank you for your efforts but it isn't working
Tails Posted November 27, 2016 Posted November 27, 2016 (edited) From the wiki: Note: This function can not set more than <maxplayers> as defined in mtaserver.conf. Using https://wiki.multitheftauto.com/wiki/SetServerConfigSetting might work. Edited November 27, 2016 by Tails 1
Captain Cody Posted November 27, 2016 Posted November 27, 2016 Quote The name of the setting. Only certain settings from mtaserver.conf can be changed with this function. These are: Max players is not something that are able to change through that.
Deep thinker Posted November 27, 2016 Author Posted November 27, 2016 then you mean i can't change the slots using this function? 3 minutes ago, CodyL said: Max players is not something that are able to change through that.
Captain Cody Posted November 27, 2016 Posted November 27, 2016 Try just setting your max slots in the server config to something really high like 500, then setting it in game lower; and slowly increase it with this.
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