[Mod] Advanced Ranks [ranks]
-
- Member
- Posts: 46
- Joined: Sat Aug 18, 2018 19:30
- In-game: init.lua
- Location: {X=25.25, y=-400, z=478,8} Bavaria, Germany
Re: [Mod] Advanced Ranks [ranks]
maybe you can add the feature, that the rank be display in the hud?
Re: [Mod] Advanced Ranks [ranks]
ranks crash the server if a offline player wrote a message ( like the admin-minetest-terminal )
Code: Select all
2019-06-14 07:22:02: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'ranks' in callback on_chat_message(): /media/sda3/Minetest/server4/.minetest/mods/ranks/init.lua:59: attempt to index local 'player' (a nil value)
2019-06-14 07:22:02: ERROR[Main]: stack traceback:
2019-06-14 07:22:02: ERROR[Main]: /media/sda3/Minetest/server4/.minetest/mods/ranks/init.lua:59: in function 'get_rank'
2019-06-14 07:22:02: ERROR[Main]: /media/sda3/Minetest/server4/.minetest/mods/ranks/init.lua:225: in function </media/sda3/Minetest/server4/.minetest/mods/ranks/init.lua:223>
2019-06-14 07:22:02: ERROR[Main]: ...minetest/bin/../share/minetest/builtin/game/register.lua:419: in function <...minetest/bin/../share/minetest/builtin/game/register.lua:399>
My YouTube-Site with Minetest-LetsPlays and some of my Servers: Carpathian Ethereal Vanilla Creative MineClone2 --- Discord
-
- Member
- Posts: 26
- Joined: Thu Jul 23, 2020 15:34
- GitHub: DiamondPlane
- Location: Behind you
Re: [Mod] Advanced Ranks [ranks]
Hi. Can someone help me? I want to make that the rank mod give a rank to a player that joined his first time in a server. Can someone tell me how I do it?
- octacian
- Member
- Posts: 597
- Joined: Mon Dec 21, 2015 22:18
- GitHub: octacian
- IRC: octacian
- In-game: octacian
- Location: Canada
Re: [Mod] Advanced Ranks [ranks]
Lol tfw it's been so long that you forgot what your own mod can and can't do.
So register your rank normally, and use the following code to give that rank to each first-time player:
It doesn't really matter where you place the code snippet above, like at all as far as I remember.
So register your rank normally, and use the following code to give that rank to each first-time player:
Code: Select all
minetest.register_on_newplayer(function(player)
ranks.set_rank(player, "<rank name>")
end)
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
-
- Member
- Posts: 26
- Joined: Thu Jul 23, 2020 15:34
- GitHub: DiamondPlane
- Location: Behind you
Re: [Mod] Advanced Ranks [ranks]
It doesn't work for me. Should I put it in init.lua?octacian wrote: ↑Tue Dec 22, 2020 07:10Lol tfw it's been so long that you forgot what your own mod can and can't do.
So register your rank normally, and use the following code to give that rank to each first-time player:It doesn't really matter where you place the code snippet above, like at all as far as I remember.Code: Select all
minetest.register_on_newplayer(function(player) ranks.set_rank(player, "<rank name>") end)
- octacian
- Member
- Posts: 597
- Joined: Mon Dec 21, 2015 22:18
- GitHub: octacian
- IRC: octacian
- In-game: octacian
- Location: Canada
Re: [Mod] Advanced Ranks [ranks]
Sure, try putting it right after wherever you register your rank. And make sure that you replace <rank name> in the code snippet I gave with the exact name of your rank.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
-
- Member
- Posts: 26
- Joined: Thu Jul 23, 2020 15:34
- GitHub: DiamondPlane
- Location: Behind you
Re: [Mod] Advanced Ranks [ranks]
Thanks! I just forgot to write the rank name!
-
- Member
- Posts: 26
- Joined: Thu Jul 23, 2020 15:34
- GitHub: DiamondPlane
- Location: Behind you
Re: [Mod] Advanced Ranks [ranks]
Ok, I have another question: I want to make that when I give someone a rank it gives the privs automatically to the player. Can you help with it? Is there a function to do it?
- octacian
- Member
- Posts: 597
- Joined: Mon Dec 21, 2015 22:18
- GitHub: octacian
- IRC: octacian
- In-game: octacian
- Location: Canada
Re: [Mod] Advanced Ranks [ranks]
Yup, that is a core feature of this mod. In your ranks definition include a privileges table, for example:
Code: Select all
ranks.register("<rank name here>", {
-- other rank configuration here, as documented in API linked below
privs = {
fly = true, -- give all players with this rank the fly privilege
fast = false, -- remove the fast privilege from all players with this rank
-- etc...
}
}
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
-
- Member
- Posts: 26
- Joined: Thu Jul 23, 2020 15:34
- GitHub: DiamondPlane
- Location: Behind you
Re: [Mod] Advanced Ranks [ranks]
It doesn't work...octacian wrote: ↑Thu Dec 24, 2020 22:36Yup, that is a core feature of this mod. In your ranks definition include a privileges table, for example:Don't forget to check out the API documentation on GitHub: https://github.com/octacian/ranks/blob/master/API.mdCode: Select all
ranks.register("<rank name here>", { -- other rank configuration here, as documented in API linked below privs = { fly = true, -- give all players with this rank the fly privilege fast = false, -- remove the fast privilege from all players with this rank -- etc... } }
- debiankaios
- Member
- Posts: 910
- Joined: Thu Dec 03, 2020 12:48
- IRC: debiankaios
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: [Mod] Advanced Ranks [ranks]
Please add a command to remove ranks of a player ingame.
📖 Deutsches Modding Book 👽 My Mod 🔌 TechAge Extension (WIP)
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
- debiankaios
- Member
- Posts: 910
- Joined: Thu Dec 03, 2020 12:48
- IRC: debiankaios
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: [Mod] Advanced Ranks [ranks]
Whyever the chatprefix will not disabled on my server. i set in settingtypes.lua:
and on my server it will writen in chat. You can test it byelf: debiankaios.host.oddprotocol.org:30005 you have on beginn the rank newbie
Code: Select all
# If this is enabled, chat send by a player with a rank including a defined
# prefix is prefixed with the rank prefix.
ranks.prefix_chat (Prefix Chat) bool false
📖 Deutsches Modding Book 👽 My Mod 🔌 TechAge Extension (WIP)
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: [Mod] Advanced Ranks [ranks]
Never edit settingtypes.txtdebiankaios wrote: ↑Wed Oct 20, 2021 12:03Whyever the chatprefix will not disabled on my server. i set in settingtypes.lua:and on my server it will writen in chat. You can test it byelf: debiankaios.host.oddprotocol.org:30005 you have on beginn the rank newbieCode: Select all
# If this is enabled, chat send by a player with a rank including a defined # prefix is prefixed with the rank prefix. ranks.prefix_chat (Prefix Chat) bool false
Go to your minetest settings and search prefix. You should see the setting
- debiankaios
- Member
- Posts: 910
- Joined: Thu Dec 03, 2020 12:48
- IRC: debiankaios
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: [Mod] Advanced Ranks [ranks]
It's a minetest server there it isn't possible. There are no guis.Lone_Wolf wrote: ↑Sat Oct 23, 2021 05:40Never edit settingtypes.txtdebiankaios wrote: ↑Wed Oct 20, 2021 12:03Whyever the chatprefix will not disabled on my server. i set in settingtypes.lua:and on my server it will writen in chat. You can test it byelf: debiankaios.host.oddprotocol.org:30005 you have on beginn the rank newbieCode: Select all
# If this is enabled, chat send by a player with a rank including a defined # prefix is prefixed with the rank prefix. ranks.prefix_chat (Prefix Chat) bool false
Go to your minetest settings and search prefix. You should see the setting
📖 Deutsches Modding Book 👽 My Mod 🔌 TechAge Extension (WIP)
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: [Mod] Advanced Ranks [ranks]
oops, try ranks.prefix_chat = false in your server minetest.conf thendebiankaios wrote: ↑Sat Oct 23, 2021 07:13It's a minetest server there it isn't possible. There are no guis.Lone_Wolf wrote: ↑Sat Oct 23, 2021 05:40Never edit settingtypes.txtdebiankaios wrote: ↑Wed Oct 20, 2021 12:03Whyever the chatprefix will not disabled on my server. i set in settingtypes.lua:and on my server it will writen in chat. You can test it byelf: debiankaios.host.oddprotocol.org:30005 you have on beginn the rank newbieCode: Select all
# If this is enabled, chat send by a player with a rank including a defined # prefix is prefixed with the rank prefix. ranks.prefix_chat (Prefix Chat) bool false
Go to your minetest settings and search prefix. You should see the setting
- debiankaios
- Member
- Posts: 910
- Joined: Thu Dec 03, 2020 12:48
- IRC: debiankaios
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: [Mod] Advanced Ranks [ranks]
Thank you it work
📖 Deutsches Modding Book 👽 My Mod 🔌 TechAge Extension (WIP)
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: [Mod] Advanced Ranks [ranks]
Hey, I added IRC support and updated the mod so it doesnt give deprecated error
Who is online
Users browsing this forum: No registered users and 34 guests