Raised This Month: $51 Target: $400
 12% 

Adding Players To Groups


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ShadowRanger
Junior Member
Join Date: Aug 2017
Old 08-26-2017 , 06:46   Adding Players To Groups
Reply With Quote #1

Hello there,

So I have some groups set up for my server with SourceMod using MySQL for saving all the data. The groups have been created and are added to the sm_groups table. But my question is, how do I actually add players to each group? I know how to do it with it for flatfile storage, but for MySQL I have no idea and can't find any info about it. Any ideas?
ShadowRanger is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 08-26-2017 , 07:34   Re: Adding Players To Groups
Reply With Quote #2

It's all documented in the wiki @ SQL Admins (SourceMod):

In "sm_admins", you have:

Code:
id=1
name=ShadowRanger
[...]
In sm_groups, you have:

Code:
id=1
flags=a
name=Moderator

id=2
flags=z
name=Root
You want to add admin id 1 (ShadowRanger) to the "Root" group (id 2), then in table sm_admins_groups, you add the admin id and group id connection, e.g.:

Code:
admin_id=1
group_id=2
-> sm_admins
-> sm_groups
-> sm_admins_groups
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].

Last edited by DarkDeviL; 08-26-2017 at 07:34.
DarkDeviL is offline
ShadowRanger
Junior Member
Join Date: Aug 2017
Old 08-26-2017 , 07:48   Re: Adding Players To Groups
Reply With Quote #3

Quote:
Originally Posted by arne1288 View Post
It's all documented in the wiki @ SQL Admins (SourceMod):

In "sm_admins", you have:

Code:
id=1
name=ShadowRanger
[...]
In sm_groups, you have:

Code:
id=1
flags=a
name=Moderator

id=2
flags=z
name=Root
You want to add admin id 1 (ShadowRanger) to the "Root" group (id 2), then in table sm_admins_groups, you add the admin id and group id connection, e.g.:

Code:
admin_id=1
group_id=2
-> sm_admins
-> sm_groups
-> sm_admins_groups
Thank you for the reply, I understand now. One more question though, is there a command that I can use to do this, or do I need to do the MySQL queries myself? I can't find any.
ShadowRanger is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 08-26-2017 , 18:26   Re: Adding Players To Groups
Reply With Quote #4

Quote:
Originally Posted by ShadowRanger View Post
One more question though, is there a command that I can use to do this, or do I need to do the MySQL queries myself? I can't find any.
There is also included a separate plugin providing those that using commands, which you can also load if you want to.

Both the plugin as well as the commands are all documented in the link above.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode