Ulysses

General => Developers Corner => Topic started by: [ LittleBigBug_ ] on April 07, 2016, 08:17:42 AM

Title: Hook for when somebody's user group is changed?
Post by: [ LittleBigBug_ ] on April 07, 2016, 08:17:42 AM
Hey, on my server I've modified gForum to sync my players ranks to my forums, but only does it on initial spawn. I don't want to do a think loop unless I have to but I was wondering if there was some hook that is called when a players rank is changed that I could use. Thanks :) I tried looking on the documentation but I might've missed it
Title: Re: Hook for when somebody's user group is changed?
Post by: Megiddo on April 07, 2016, 10:14:36 AM
http://ulyssesmod.net/docs/index/Hooks.html

You want UCLChanged, but you'll have to have your own logic to figure out if what changed is of interest to you.
Title: Re: Hook for when somebody's user group is changed?
Post by: [ LittleBigBug_ ] on April 07, 2016, 10:32:15 AM
Perfect sounds good thank you :D
Title: Re: Hook for when somebody's user group is changed?
Post by: MrPresident on April 07, 2016, 11:12:51 AM
Maybe we should add (or add to our list for ULX4) a hook that returns more specific info for this kind of event.
It could be useful for authors to know when a player's group change and info like: the player, group they were in, group they are changing to.
Title: Re: Hook for when somebody's user group is changed?
Post by: Megiddo on April 07, 2016, 02:40:58 PM
All true, Mr. P. At the time, I couldn't figure out a good way to provide that level of complexity for the context, and I wasn't sure if enough people would use it to make it worthwhile.