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

[REQ] Register on website before joining a server, Simple auth system.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ItsCEED
Member
Join Date: Jun 2016
Old 06-20-2016 , 15:46   [REQ] Register on website before joining a server, Simple auth system.
Reply With Quote #1

Hi there, i know.. its my first post but im loorking around for ages since i start with my CS 1.6 Community.

My request is simple..

All i need is a plugin that checks a database from a website to check if the user is signed up before playing.

The website will use steam auth, so if the player is not in the database will be kicked and recive message like "You are not registed, please signup at www.xxxx.tld before you join the server"


Simple as that.

I was looking around the forum and cant find something like this, so i will be really happy if someone made it cuz its not a big thing (for me it is, i tried to make it but i faild since my knowladge is kinda crappy :/)

Thank you very much!
ItsCEED is offline
Send a message via Skype™ to ItsCEED
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 06-20-2016 , 15:50   Re: [REQ] Register on website before joining a server, Simple auth system.
Reply With Quote #2

There are plugins like this available, but the greater questions are:
How is your system storing the auths?
Is you auth system using a plugin?
What forum does your website use?
Maxximou5 is offline
ItsCEED
Member
Join Date: Jun 2016
Old 06-20-2016 , 15:54   Re: [REQ] Register on website before joining a server, Simple auth system.
Reply With Quote #3

Quote:
Originally Posted by Maxximou5 View Post
There are plugins like this available, but the greater questions are:
How is your system storing the auths?
Is you auth system using a plugin?
What forum does your website use?
ID / SteamID/ etc / etc directly from the steam login.

Will be self made website


Also, i didnt manage to find the plugin :/
ItsCEED is offline
Send a message via Skype™ to ItsCEED
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 06-20-2016 , 16:27   Re: [REQ] Register on website before joining a server, Simple auth system.
Reply With Quote #4

If that's the case anyone of us can do it, it should be done with relative ease. Just choose which method you are using to store it and we could get started. If you plan to store all three, even better.
Example:
steamID: STEAM_1:1:1337
steamID3: [U:1:2675]
steamID64: 76561197960268403

Last edited by Maxximou5; 06-20-2016 at 16:27.
Maxximou5 is offline
ItsCEED
Member
Join Date: Jun 2016
Old 06-20-2016 , 16:44   Re: [REQ] Register on website before joining a server, Simple auth system.
Reply With Quote #5

Quote:
Originally Posted by Maxximou5 View Post
If that's the case anyone of us can do it, it should be done with relative ease. Just choose which method you are using to store it and we could get started. If you plan to store all three, even better.
Example:
steamID: STEAM_1:1:1337
steamID3: [U:1:2675]
steamID64: 76561197960268403

Any oof it

SteamID or SteamID64 i dont really mind
Ty!
ItsCEED is offline
Send a message via Skype™ to ItsCEED
ItsCEED
Member
Join Date: Jun 2016
Old 06-21-2016 , 12:22   Re: [REQ] Register on website before joining a server, Simple auth system.
Reply With Quote #6

Update:
steamID64 is is needed

And anyone?
ItsCEED is offline
Send a message via Skype™ to ItsCEED
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 06-21-2016 , 12:45   Re: [REQ] Register on website before joining a server, Simple auth system.
Reply With Quote #7

Quote:
Originally Posted by ItsCEED View Post
Update:
steamID64 is is needed

And anyone?
Wait, I gotta do the whole registration thing ? If yes, then I'll do it the next weekend.
__________________
Arkarr is offline
ItsCEED
Member
Join Date: Jun 2016
Old 06-23-2016 , 20:04   Re: [REQ] Register on website before joining a server, Simple auth system.
Reply With Quote #8

Quote:
Originally Posted by Arkarr View Post
Wait, I gotta do the whole registration thing ? If yes, then I'll do it the next weekend.
Okey i found a code that could be moded really really quick! But i feel dumb atm and idk how to handle it..

IF someone can do it, will be cool!
PHP Code:
#pragma semicolon 1

#define PLUGIN_VERSION "0.1"

public Plugin:myinfo =
{
    
name "ckSurf Kicker",
    
author "DeweY",
    
version PLUGIN_VERSION,
    
description "Kicks clients with 1000 points or more.",
    
url "http://Omegagaming.org/"
};

Handle g_hDatabase null;

public 
void OnPluginStart()
{
    
SQL_TConnect(SQLCallback_Connect"ckSurf");
}

public 
SQLCallback_Connect(Handle ownerHandle hndl, const char[] errorany data)
{
    if (
hndl == null)
    {
        
SetFailState("Error connecting to database. %s"error);
    }

    
g_hDatabase hndl;
}

public 
void OnClientPostAdminCheck(client

    
CheckRank(client); 
}  

public 
CheckRank(int client)
{
    
char query[255];
    
char SteamID[32];
    
GetClientAuthId(clientAuthId_Steam2SteamID32);
    
Format(query255"SELECT `score` FROM `ranking` WHERE `id_player`='%s' LIMIT 1"SteamID[10]);
    
SQL_TQuery(g_hDatabaseSQLCallback_LoadPlayerPointsqueryGetClientUserId(client));
}  

public 
SQLCallback_LoadPlayerPoints(Handle ownerHandle hndl, const char[] errorany data)
{
    if (
hndl == null)
    {
        
SetFailState("Error grabbing player points. %s"error);
    }

    
int client GetClientOfUserId(data);


    if (
SQL_GetRowCount(hndl) == 1)
    {
        
SQL_FetchRow(hndl);
        
int playerpoints SQL_FetchInt(hndl0);
        if (
playerpoints >= 1000)
        {
            
KickClient(client"This server is for beginners.");
        }
    }

This is the original code.

This how should look i guess

PHP Code:
#pragma semicolon 1

#define PLUGIN_VERSION "0.1"

public Plugin:myinfo =
{
    
name "ckSurf Kicker",
    
author "DeweY",
    
version PLUGIN_VERSION,
    
description "Kicks clients with 1000 points or more.",
    
url "http://Omegagaming.org/"
};

Handle g_hDatabase null;

public 
void OnPluginStart()
{
    
SQL_TConnect(SQLCallback_Connect"ckSurf");
}

public 
SQLCallback_Connect(Handle ownerHandle hndl, const char[] errorany data)
{
    if (
hndl == null)
    {
        
SetFailState("Error connecting to database. %s"error);
    }

    
g_hDatabase hndl;
}

public 
void OnClientPostAdminCheck(client

    
CheckRank(client); 
}  

public 
CheckRank(int client)
{
    
char query[255];
    
char SteamID[32];
    
GetClientAuthId(clientAuthId_Steam2SteamID32);
    
Format(query255"SELECT `steam_id` FROM `users` WHERE `id_player`='%s' LIMIT 1"SteamID[10]);
    
SQL_TQuery(g_hDatabaseSQLCallback_LoadPlayerPointsqueryGetClientUserId(client));
}  

public 
SQLCallback_LoadPlayerPoints(Handle ownerHandle hndl, const char[] errorany data)
{
    if (
hndl == null)
    {
        
SetFailState("Error grabbing player points. %s"error);
    }

    
int client GetClientOfUserId(data);


    if (
SQL_GetRowCount(hndl) == 1)
    {
        
SQL_FetchRow(hndl);
        
int playerpoints SQL_FetchInt(hndl0);
        if (
playerpoints >= 1000)
        {
            
KickClient(client"Please register before you play!");
        }
    }

But, i dont know hoow to make the check nor get the IP from my user that is connected

Last edited by ItsCEED; 06-23-2016 at 20:18.
ItsCEED is offline
Send a message via Skype™ to ItsCEED
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 06-23-2016 , 20:38   Re: [REQ] Register on website before joining a server, Simple auth system.
Reply With Quote #9

the most important part is how you are going to store player steaminfo in your db
then it's just sql query from there
if you already have a system that store players steaminfo then checkout the following link
https://forums.alliedmods.net/showthread.php?p=2242960
you can use the native that Plugin provides to kick player if want
__________________
8guawong is offline
ItsCEED
Member
Join Date: Jun 2016
Old 06-23-2016 , 20:42   Re: [REQ] Register on website before joining a server, Simple auth system.
Reply With Quote #10

Quote:
Originally Posted by 8guawong View Post
the most important part is how you are going to store player steaminfo in your db
then it's just sql query from there
if you already have a system that store players steaminfo then checkout the following link
https://forums.alliedmods.net/showthread.php?p=2242960
you can use the native that Plugin provides to kick player if want

On the website ID will be saved in STEAMID64 version
Also the user must go to the website and login via Steam, i dont want a plugin that will allow the client to register to the website from the server

Last edited by ItsCEED; 06-23-2016 at 20:43.
ItsCEED is offline
Send a message via Skype™ to ItsCEED
Reply


Thread Tools
Display Modes

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:36.


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