myBB & Garry's Mod Integration questions

So here’s my question for everyone, and a bit of help/guidance on where to start would be absolutely fantastic as I can improvise my own code & usually fix things that need fixing, and even creative my own lua scripts that interact with SQL when needed, but I’m no professional, infact very far from it.

I am currently working on migrating from using enjin, to myBB, the reason for this is so I can integrate the website with the game server. I’d like to be able to identify a player in the server by their account on the website & do things like get their group from the website, and transfer that into the game.

I’m off to a bit of a start, I’ve got the website created, a few basic user-groups, and the ability to log in through steam. The steamid is stored on the web server under the mybb_users with the ID of steam_id and it stores the steamid64 value, it has to be like this as that’s the way the log-in system works.
I would assume my next steps would be make a verification system in-game that can convert their steamid to steamid64 and find it on the web server? Or modify the log-in system some how ( I didn’t make it ) so that it also outputs a regular steamid value?

Maybe someone can point me in the right direction, or give me some information on stuff people have already made that I could look at and learn from to help me with this project.

Thanks in advance!

Well u can use the steamid64, as you said, would work fine.

Disclaimer: This was done on 1.6 Mybb, not 1.8!

I did got the same problems and ideas like you.
I used https://github.com/Tanweth/MySteam-Powered to connect the SteamAccount with their Forumaccount, since i couldnt found any good solution for login in.
The Usergroup i sync with https://github.com/GodzBro/SMF-Group-Sync

with 1.8 i dunno. Still need to update my forum later

I’m going back to 1.6 as it seems like a lot of people prefer that over 1.8

[editline]11th March 2015[/editline]

** Scratch that; using 1.8

Okay, now I’ve got another question…

myBB stores groups using values ( 2 & 4 ) for user/super admin in my case.

I have this :

GroupID={
[“user”]=2,
[“superadmin”]=4
}

And I can get the ID off the server, so how would I get the “superadmin” into a variable to assign to a user just by having the number 4? Not sure if that makes sense, maybe someone can help.

Basicly SMF-Group-Sync uses the SteamID64 as an login name

you can change the loginname to steamid if you use Tanweth MySteamPowered.

Otherwise for the login (which alters the loginname to the steamid64) you could try to use https://github.com/stewartiee/Steam-OpenID--MyBB-
but i recommed to update the displayname plugin, since it is 2 years old
http://mybbhacks.zingaburga.com/showthread.php?tid=259

I’m actually using https://github.com/stewartiee/Steam-OpenID--MyBB-/tree/version2

It creates a separate listing in the mybb_users called “steam_id” which is where the steamid64 is stored

I use mysqloo with glua and make my players (on gmod) register in-game (no browser required). Then my addon just injects the mysql data into the database responsible for handling users on the website and BOOM! My players are registered immediately and automatically. This works wonderfully for me!

I got it working now, thanks guys

I have one issue now; I am able to make either

a.) the game server control the ranks on the website
OR
b.) the website controls ranks in the game server

I’d like to have it both ways, so I can demote a player on the website & have it take effect in the server, and demote the person in game and have it take affect on the website, the problem is it always ends up overwriting its self, anyone have experience in how to do this?

Well, the way you should be handling it is only setting rank based on events (lets say that the rank has changed on server, and needs to update on the forums).

One way is to check which change was latest, and update the other one to correspond.