Raised This Month: $32 Target: $400
 8% 

[CsGo]Help Tags


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DragosVI
Junior Member
Join Date: May 2019
Location: Romania
Old 11-24-2020 , 07:04   [CsGo]Help Tags
Reply With Quote #1

Hi!
When i want put it in ftp ,my server is down,help me plz!!
Sorry for my bad english..
PHP Code:
#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR ""
#define PLUGIN_VERSION "0.00"

#include <sourcemod>
#include <sdktools>
#include <cstrike>
//#include <sdkhooks>

#pragma newdecls required

EngineVersion g_Game;

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


/* GLOBAL VARIABLES */
bool setclantag[MAXPLAYERS 1] = false;
char g_szSteamID[MAXPLAYERS+1][100];

public 
void OnPluginStart()
{
    
g_Game GetEngineVersion();
    if(
g_Game != Engine_CSGO && g_Game != Engine_CSS)
    {
        
SetFailState("This plugin is for CSGO/CSS only.");    
    }
    
HookEvent("player_spawn"OnClientSpawn);
}

public 
void OnClientPostAdminCheck(int client)
{
    if(
IsClientInGame(client) &&!IsFakeClient(client))
    {
        
setclantag[client] = true;
    }
}

void OnClientSpawn(Event event, const char[] namebool dontBroadcast)
{
    
int userid event.GetInt("userid");
    
int cl_id GetClientOfUserId(userid);
    
    if(
IsClientInGame(cl_id) && !IsFakeClient(cl_id))
    {
        if(
setclantag[cl_id] == true)
        {
            
char client_steamid[100];
            
GetClientAuthId(cl_idAuthId_Steam2client_steamidsizeof(client_steamid));
            
g_szSteamID[cl_id] = client_steamid;
            
            if(
CheckCommandAccess(cl_id"sm_isplayercommandavailable"ADMFLAG_ROOTtrue)) //not a real command
            
{
                
CS_SetClientClanTag(cl_id"★ FOUNDER ★");
            }
            else if(
CheckCommandAccess(cl_id"sm_isplayercommandavailable"ADMFLAG_UNBANtrue))
            {
                
CS_SetClientClanTag(cl_id"★ OWNER ★");
            }
            else if(
CheckCommandAccess(cl_id"sm_isplayercommandavailable"ADMFLAG_CUSTOM4true))
            {
                
CS_SetClientClanTag(cl_id"★ MOD+VIP ★");
            }
            else if(
CheckCommandAccess(cl_id"sm_isplayercommandavailable"ADMFLAG_CUSTOM3true))
            {
                
CS_SetClientClanTag(cl_id"★ MOD ★");
            }
            else if(
CheckCommandAccess(cl_id"sm_isplayercommandavailable"ADMFLAG_CUSTOM2true))
            {
                
CS_SetClientClanTag(cl_id"★ ADMIN+VIP ★");
            }
            else if(
CheckCommandAccess(cl_id"sm_isplayercommandavailable"ADMFLAG_BANtrue))
            {
                
CS_SetClientClanTag(cl_id"★ ADMIN ★");
            }
            else if(
CheckCommandAccess(cl_id"sm_isplayercommandavailable"ADMFLAG_CUSTOM1true))
            {
                
CS_SetClientClanTag(cl_id"★ HELPER+VIP ★");
            }
            else if(
CheckCommandAccess(cl_id"sm_isplayercommandavailable"ADMFLAG_GENERICtrue))
            {
                
CS_SetClientClanTag(cl_id"★ HELPER ★");
            }
            else if(
CheckCommandAccess(cl_id"sm_isplayercommandavailable"ADMFLAG_CUSTOM6true))
            {
                
CS_SetClientClanTag(cl_id"★ VIP ★");
            }
            
            if(
StrEqual(client_steamid"STEAM_1:0:1234"))
            {
                
CS_SetClientClanTag(cl_id"CLAN TAG");
            }
            
            
setclantag[cl_id] = false;
        }
    }

DragosVI is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 11-24-2020 , 07:51   Re: [CsGo]Help Tags
Reply With Quote #2

Try check
PHP Code:
public void OnClientSpawn(Event event, const char[] namebool dontBroadcast)
{
    
int userid event.GetInt("userid");
    
int cl_id GetClientOfUserId(userid);
    if( 
cl_id && cl_id <= MaxClients && IsClientInGamecl_id) && !IsFakeClient(cl_id))
    {
        
// do someting
    
}

i have fixed some in this spoiler below:
Spoiler


Edit: You may need to put some more effort onto your check.. it poorly written.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 11-24-2020 at 08:30.
GsiX is offline
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:17.


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