View Single Post
pizza_lover
New Member
Join Date: Aug 2017
Old 09-06-2017 , 21:42   Re: CS_SetClientClanTag not working HELP PLZ
Reply With Quote #6

#include <dbi> ?
edit: give it a try
PHP Code:
#include <sourcemod>
#include <cstrike>
#include <dbi>
#define PLUGIN_VERSION    "1.0"

public Plugin:myinfo = {
    
name "suspect checker",
    
author "forums.alliedmods.net",
    
description "suspect checker",
    
version PLUGIN_VERSION,
    
url "forums.alliedmods.net"
};

new 
Handle:db;

public 
OnPluginStart()
{
    new 
String:error[512];

    
db SQL_Connect("default"trueerrorsizeof(error));

    if(
db == INVALID_HANDLE)
    {
        
SetFailState(error);
    }

}

public 
OnClientPostAdminCheck(client)
{
    
decl String:sQuery[256], String:sAuth[32];
    new 
data;
    
GetClientAuthId(clientAuthId_EnginesAuthsizeof(sAuth));
    
data GetClientOfUserId(client);
    
FormatEx(sQuerysizeof(sQuery), "SELECT steam FROM suspects WHERE steam = '%s'"sAuth);
    
SQL_TQuery(dbSQL_LoadClientsQuerydata);
}

public 
SQL_LoadClient(Handle:hOwnerHandle:hQuery, const String:sError[], any:data
{
    new 
client data;
    if (
hQuery == INVALID_HANDLE || sError[0])
    {
        
LogError("SQL_LoadClient: %s"sError);
    }

    if ( 
client && SQL_FetchRow(hQuery))
    {
        if(!
SQL_FetchInt(hQuery0))
        {
            
CS_SetClientClanTag(client"[SUSPECTED]");
        }
    }


Last edited by pizza_lover; 09-06-2017 at 22:01. Reason: added code
pizza_lover is offline