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

VIP only Server plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Notifications
AlliedModders Donor
Join Date: Oct 2015
Old 12-20-2018 , 22:35   VIP only Server plugin?
Reply With Quote #1

Hey, I've got a lot of my usersme asking if I will release a VIP only version of my server, but I can't seem to find a plugin which only allows those connections, nor an option within Sourcemod.
Apologies if this is actually available but I've tried both "VIP" and "Restricted" when in the plugins section and searching but found nothing related.

Thanks.
Notifications is offline
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 12-20-2018 , 23:12   Re: VIP only Server plugin?
Reply With Quote #2

Quote:
Originally Posted by Notifications View Post
Hey, I've got a lot of my usersme asking if I will release a VIP only version of my server, but I can't seem to find a plugin which only allows those connections, nor an option within Sourcemod.
Apologies if this is actually available but I've tried both "VIP" and "Restricted" when in the plugins section and searching but found nothing related.

Thanks.
https://forums.alliedmods.net/showthread.php?p=1830686
CliptonHeist is offline
Notifications
AlliedModders Donor
Join Date: Oct 2015
Old 12-21-2018 , 13:10   Re: VIP only Server plugin?
Reply With Quote #3

Quote:
Originally Posted by CliptonHeist View Post
Would you know of one which would work via MYSQL so I can point it to a Database to read from?
Notifications is offline
P4UL
AlliedModders Donor
Join Date: Apr 2017
Location: Netherlands
Old 12-21-2018 , 13:50   Re: VIP only Server plugin?
Reply With Quote #4

How about a plugin which just kicks all clients on connect if they don't have flag a? (if flag a is vip)
P4UL is offline
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 12-21-2018 , 14:10   Re: VIP only Server plugin?
Reply With Quote #5

Quote:
Originally Posted by Notifications View Post
Would you know of one which would work via MYSQL so I can point it to a Database to read from?
You'd be better off doing what P4UL suggested and kick anyone without flag a or exporting your database to a txt file and just using the plugin I linked unless you have a load of entries in which case a MySQL solution may work better, but from the quick search I did I couldn't find anything that would suit this.
CliptonHeist is offline
Notifications
AlliedModders Donor
Join Date: Oct 2015
Old 12-21-2018 , 17:17   Re: VIP only Server plugin?
Reply With Quote #6

Quote:
Originally Posted by P4UL View Post
How about a plugin which just kicks all clients on connect if they don't have flag a? (if flag a is vip)
This is what I was looking for originally tbh

Quote:
Originally Posted by CliptonHeist View Post
You'd be better off doing what P4UL suggested and kick anyone without flag a or exporting your database to a txt file and just using the plugin I linked unless you have a load of entries in which case a MySQL solution may work better, but from the quick search I did I couldn't find anything that would suit this.
I have too many to continue doing that/exporting it every day :/
Notifications is offline
P4UL
AlliedModders Donor
Join Date: Apr 2017
Location: Netherlands
Old 12-22-2018 , 10:24   Re: VIP only Server plugin?
Reply With Quote #7

Code:
#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR ""
#define PLUGIN_VERSION "0.00"

#include <sourcemod>
#include <sdktools>

#pragma newdecls required

public Plugin myinfo = 
{
	name = "",
	author = PLUGIN_AUTHOR,
	description = "",
	version = PLUGIN_VERSION,
	url = ""
};

public void OnPluginStart()
{
}

public void OnClientPostAdminCheck(int client)
{
	if (IsValidClient(client) && !CheckCommandAccess(client, "isVIP", ADMFLAG_RESERVATION, true))
	{
		KickClient(client, "This server is VIP only");
	}
}

bool IsValidClient(int client) 
{
    if ( !( 1 <= client <= MaxClients ) || !IsClientInGame(client) ) 
        return false; 
     
    return true; 
}
P4UL 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 10:10.


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