MyBB Community Forums

Full Version: Change usergroup based on MySQL database value
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am hosting a HvZ game in my community and I am currently tasked with putting together a community forum to help keep everyone informed and to give the two groups a better method of communication.

Within the game you have two teams, the human survivors and then the zombies. When a zombie tags a human that human becomes a zombie, it is the zombie that tagged the human's responsibility to report the kill on my primary webpage which then adds the UID of the human to the zombie team.

I want to create a plugin to check that database to see if the user is currently a zombie or a human and change his\her usergroup accordingly.

Any help with this would be awesome, I have very very little [none] experience with developing mybb plugins but I do know a little bit of php.


Edit:
maybe it would be better to utilize that Task-Manager function within mybb.. but I still have no idea what the code might be.

Edit2: I was looking at the promotions.php task and I think it would be perfect for my needs, does anyone know how to alter it to look at a different DB and then rather than looking for posts to look for specific database values..

Misc info:

Possible DataBase Values:

-2 = Orig Zombie
-1 = Zombie
0 = Deceased
1 = Survivor

Table name: users
Field name: state