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

Group Tag Credits


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alphaearth
Senior Member
Join Date: Feb 2018
Location: Turkey
Old 06-12-2019 , 05:57   Group Tag Credits
Reply With Quote #1

I changed the credit plugin to those who joined the steam group. I want to make a credit plugin to group tag fields. There are errors in these lines. Can you help me fix it?

PHP Code:
#include <sourcemod>
// #include <SteamWorks>
#include <store>
// #pragma newdecls required

ConVar    PlayerCredits,
        
SpecCredits,
        
CreditsTime;
Handle    TimeAuto null;

public 
Plugin myinfo 
{
    
name "Steam Group Credits",
    
author "Xines",
    
description "Deals x amount of credits per x amount of secounds",
    
version "1.2",
    
url ""
};

public 
void OnPluginStart()
{    
    
//Configs
    
PlayerCredits CreateConVar("sm_group_credits""5""Credits to give per X time, if player is in group.");
    
SpecCredits CreateConVar("sm_group_spec_credits""2""Spectate Credits to give per X time, if player is in group and spectate.");
    
CreditsTime CreateConVar("sm_group_credits_time""60""Time in seconds to deal credits.");
    
    
//Don't Touch
    
HookConVarChange(CreditsTimeChange_CreditsTime);
}

public 
void OnMapStart()
{
    
TimeAuto CreateTimer(CreditsTime.FloatValueCheckPlayers_TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}

public 
Action CheckPlayers(Handle timer)
{
    new 
String:clantagid[32];
    
    new 
i;
    for(
i=1i<MAXPLAYERSi++)
    
    
GetClientInfo(i"cl_clanid"clantagid9);
    
    if ((
IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(i) && (StrEqual(clantagid"35018616") == true)) || (IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(i) && (StrEqual(clantagid"27841608") == true)))
    {
        
addcredits(i);
    }
    
    if ((
IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(i) && (StrEqual(clantagid"35018616") == false)) || (IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(i) && (StrEqual(clantagid"27841608") == false)))
    {
        
PrintToChat(i"[\x05not2easy\x01] \x04 ...");
    }
    
    return 
Plugin_Continue;
}

void addcredits(int client)
{
        
//Get Player Credit Buffer!
        
int pcredits PlayerCredits.IntValue;
        
        
//If spectate set new value of credits
        
if(GetClientTeam(client) == 1pcredits SpecCredits.IntValue;
        
        
//Give Credits
        
Store_SetClientCredits(clientStore_GetClientCredits(client) + pcredits);
        
        
//Print to client
        
PrintToChat(client"[\x05not2easy\x01] \x04 ... \x10%i\x04 ..."pcredits);
}

public 
void Change_CreditsTime(Handle cvar, const char[] oldVal, const char[] newVal)
{
    if (
TimeAuto != null)
    {
        
KillTimer(TimeAuto);
        
TimeAuto null;
    }

    
TimeAuto CreateTimer(CreditsTime.FloatValueCheckPlayers_TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);

__________________
alphaearth is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 06-12-2019 , 07:13   Re: Group Tag Credits
Reply With Quote #2

Quote:
Originally Posted by alphaearth View Post
There are errors in these lines. Can you help me fix it?
so............. what line?
__________________
8guawong is offline
alphaearth
Senior Member
Join Date: Feb 2018
Location: Turkey
Old 06-12-2019 , 07:44   Re: Group Tag Credits
Reply With Quote #3

That's the last I did. Can you help with mistakes?

PHP Code:
#include <sourcemod>
#include <store>
#include <sdktools>
#pragma semicolon 1

Handle g_ClanTagi;
Handle g_EklentiTagi;
Handle TimeAuto null;
ConVar PlayerCredits;
ConVar SpecPlayerCredits;
ConVar CreditsTime;
ConVar g_GrupId;

public 
Plugin:myinfo 
{
    
name "Clan Tag Kullanana Bonus Kredi",
    
author "ImPossibLe`, lazhoroni",
    
description "DrK # GaminG",
    
version "1.0"
}

public 
OnPluginStart()
{
    
g_EklentiTagi CreateConVar("n2e_eklenti_tagi""not2easy""Eklenti taginizi yaziniz.");    
    
g_ClanTagi CreateConVar("n2e_clan_tag""ZMTR #""Clan taginizi yaziniz.");    
    
PlayerCredits CreateConVar("n2e_clantag_kredisi""5""Kac kredi verilecegini ayarlayin.");
    
SpecPlayerCredits CreateConVar("n2e_clantag_speckredisi""2""İzleyicilere kac kredi verilecegini ayarlayin.");
    
CreditsTime CreateConVar("n2e_clantagkredi_suresi""60""Kac saniyede bir kredi verilecegini ayarlayin.");
    
g_GrupId CreateConVar("sm_grup_tagi""27841608""Grup idsini yaziniz.");
    
HookConVarChange(CreditsTimeChange_CreditsTime);
    
AutoExecConfig(true"grup_tag_kredisi");
}

public 
void OnMapStart()
{
    
TimeAuto CreateTimer(CreditsTime.FloatValueTimer_Gruptag_Credi_TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}

public 
Action Timer_Gruptag_Credi(Handle timerany data)
{
        
char sClanTagi[64];
        
char sEklentiTagi[64];
        
GetConVarString(g_ClanTagisClanTagisizeof(sClanTagi));
        
GetConVarString(g_EklentiTagisEklentiTagisizeof(sEklentiTagi));
        
int i;
        for(
i=1i<MAXPLAYERSi++)
        {
            if(
IsClientInGame(i))
            {
                
char clantagid[32];
                
char g_Grup_Id[16];
                
GetClientInfo(i"cl_clanid"clantagid9);
                
int pcredits PlayerCredits.IntValue;
                
int specpcredits SpecPlayerCredits.IntValue;
                
GetConVarString(g_GrupIdg_Grup_Id9);
                if(
StrEqual(clantagid"g_Grup_Id") == true)
                {
                    
Store_SetClientCredits(iStore_GetClientCredits(i) + pcredits);
                    
PrintToChat(i" \x02[%s] \x0C%s \x09Clan tagını kullandığınız için \x0Efazladan %i \x09kredi kazandınız."sEklentiTagisClanTagipcredits);
                }
                else if((
StrEqual(clantagid"g_Grup_Id") == true) && (GetClientTeam(i) == 1))
                {
                    
Store_SetClientCredits(iStore_GetClientCredits(i) + specpcredits);
                    
PrintToChat(i" \x02[%s] \x0C%s \x09Clan tagını kullandığınız için \x0Efazladan %i \x09kredi kazandınız."sEklentiTagisClanTagispecpcredits);
                }
                else if((
StrEqual(clantagid"g_Grup_Id") == false))
                {
                    
PrintToChat(i" \x02[%s] \x0C%s \x09Clan tagını kullanırsanız, her el \x0Efazladan %i \x09kredi kazanırsınız."sEklentiTagisClanTagipcredits);
                }
            }
        }
}

public 
void Change_CreditsTime(Handle cvar, const char[] oldVal, const char[] newVal)
{
    if (
TimeAuto != null)
    {
        
KillTimer(TimeAuto);
        
TimeAuto null;
    }
    
TimeAuto CreateTimer(CreditsTime.FloatValueTimer_Gruptag_Credi_TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);

__________________
alphaearth is offline
alphaearth
Senior Member
Join Date: Feb 2018
Location: Turkey
Old 06-12-2019 , 09:11   Re: Group Tag Credits
Reply With Quote #4

it works completely smoothly. you can solved the issue.

PHP Code:
#include <sourcemod>
#include <store>
#include <sdktools>
#include <cstrike>
#pragma semicolon 1

Handle g_ClanTagi;
Handle g_EklentiTagi;
Handle TimeAuto null;
ConVar PlayerCredits;
ConVar SpecPlayerCredits;
ConVar CreditsTime;
ConVar g_GrupId;

public 
Plugin:myinfo 
{
    
name "Clan Tag Kullanana Bonus Kredi",
    
author "ImPossibLe`, lazhoroni",
    
description "DrK # GaminG",
    
version "1.0"
}

public 
OnPluginStart()
{
    
g_EklentiTagi CreateConVar("n2e_eklenti_tagi""not2easy""Eklenti taginizi yaziniz.");    
    
g_ClanTagi CreateConVar("n2e_clan_tag""ZMTR #""Clan taginizi yaziniz.");    
    
PlayerCredits CreateConVar("n2e_clantag_kredisi""5""Kac kredi verilecegini ayarlayin.");
    
SpecPlayerCredits CreateConVar("n2e_clantag_speckredisi""2""İzleyicilere kac kredi verilecegini ayarlayin.");
    
CreditsTime CreateConVar("n2e_clantagkredi_suresi""60""Kac saniyede bir kredi verilecegini ayarlayin.");
    
g_GrupId CreateConVar("n2e_grup_tagi""ZMTR #""Grup taginizi yaziniz.");
    
HookConVarChange(CreditsTimeChange_CreditsTime);
    
AutoExecConfig(true"grup_tag_kredisi");
}

public 
void OnMapStart()
{
    
TimeAuto CreateTimer(CreditsTime.FloatValueTimer_Gruptag_Credi_TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}

public 
Action Timer_Gruptag_Credi(Handle timerany data)
{
        
char sClanTagi[64];
        
char sEklentiTagi[64];
        
GetConVarString(g_ClanTagisClanTagisizeof(sClanTagi));
        
GetConVarString(g_EklentiTagisEklentiTagisizeof(sEklentiTagi));
        
int i;
        for(
i=1i<MAXPLAYERSi++)
        {
            if(
IsClientInGame(i))
            {
                
char Grup_Tagi[16];
                
char g_Grup_Id[16];
                
int pcredits PlayerCredits.IntValue;
                
int specpcredits SpecPlayerCredits.IntValue;
                
CS_GetClientClanTag(iGrup_Tagi16);
                
GetConVarString(g_GrupIdg_Grup_Id16);
                if((
StrEqual(Grup_Tagig_Grup_Id) == true) && (GetClientTeam(i) == 2) || (StrEqual(Grup_Tagig_Grup_Id) == true) && (GetClientTeam(i) == 3))
                {
                    
Store_SetClientCredits(iStore_GetClientCredits(i) + pcredits);
                    
PrintToChat(i" \x02[%s] \x0C%s \x09Clan tagını kullandığınız için \x0Efazladan %i \x09kredi kazandınız."sEklentiTagisClanTagipcredits);
                }
                else if((
StrEqual(Grup_Tagig_Grup_Id) == true) && (GetClientTeam(i) == 1))
                {
                    
Store_SetClientCredits(iStore_GetClientCredits(i) + specpcredits);
                    
PrintToChat(i" \x02[%s] \x0C%s \x09Clan tagını kullandığınız için \x0Efazladan %i \x09kredi kazandınız."sEklentiTagisClanTagispecpcredits);
                }
                else if((
StrEqual(Grup_Tagig_Grup_Id) == false))
                {
                    
PrintToChat(i" \x02[%s] \x0C%s \x09Clan tagını kullanırsanız, her el \x0Efazladan %i \x09kredi kazanırsınız."sEklentiTagisClanTagipcredits);
                }
            }
        }
}

public 
void Change_CreditsTime(Handle cvar, const char[] oldVal, const char[] newVal)
{
    if (
TimeAuto != null)
    {
        
KillTimer(TimeAuto);
        
TimeAuto null;
    }
    
TimeAuto CreateTimer(CreditsTime.FloatValueTimer_Gruptag_Credi_TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);

__________________
alphaearth 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 14:41.


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