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

Add admin through code?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 03-08-2015 , 08:49   Add admin through code?
Reply With Quote #1

I want to add an sb admin through code, but I'm not sure how one would achieve this. sourcebans.inc doesn't have anything for that.
__________________
Chdata is offline
xSpeced
AlliedModders Donor
Join Date: Aug 2013
Old 03-08-2015 , 20:01   Re: Add admin through code?
Reply With Quote #2

The 1.5.0 beta plugins does have some natives for that. Idk if it actually works. Do note that custom permissions no longer work with 1.5.0.

Quote:
native SB_GetAdminId(client);
native SB_AddAdmin(client, const String:name[], const String:authtype[], const String:identity[], const String:password[] = "", const String:groups[] = "");
native SB_DeleteAdmin(client, const String:authtype[], const String:identity[]);
native SB_AddGroup(client, const String:name[], const String:flags[], immunity = 0);
native SB_DeleteGroup(client, const String:name[]);
native SB_SetAdminGroups(client, const String:authtype[], const String:identity[], const String:groups[] = "");
https://forums.alliedmods.net/showthread.php?t=207840

Last edited by xSpeced; 03-08-2015 at 20:02.
xSpeced 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 07:21.


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