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

warning 213: tag mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alphaearth
Senior Member
Join Date: Feb 2018
Location: Turkey
Old 11-02-2018 , 12:40   warning 213: tag mismatch
Reply With Quote #1

PHP Code:
#include <sdktools>
#include <cstrike>

new Float:g_c4PlantTime;
new 
bool:g_DefuseFlag;
new 
Float:g_activeIncendiary;
new 
Float:g_bombPosition[3];
ConVar csgoplugin_tag;

public 
Plugin:myinfo =
{
    
name "Hizli Bomba Imha",
    
description "Retake modu icin hizli bomba imha etmek.",
    
author "",
    
version "1.2",
    
url ""
};


public 
OnPluginStart()
{
    
CreateConVar("sm_hizli_bomba_imha""1""Eklenti aktif/devre disi"0false0.0false0.0);
    
csgoplugin_tag CreateConVar("csgoplugin_tag""");
    
HookEvent("bomb_begindefuse"Event_BeginDefuse);
    
HookEvent("bomb_planted"Event_BombPlanted);
    
HookEvent("round_start"Event_RoundStart);
    
HookEvent("molotov_detonate"molotov_explode);
    
g_c4PlantTime = -1.0;
    
g_activeIncendiary = -1.0;
}


public 
Action:Event_BeginDefuse(Handle:eventString:name[], bool:dontBroadcast)
{
    new 
Float:remaining GetConVarFloat(FindConVar("mp_c4timer")) - (GetGameTime() - g_c4PlantTime);
    new 
iCount;
    new 
1;
    while (
<= MaxClients)
    {
        if (
IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 2)
        {
            
iCount++;
        }
        
i++;
    }

    
char tag[64];
    
GetConVarString(csgoplugin_tagtag64);
    
    if((
GetGameTime()-g_activeIncendiary)<7.0)
    {
        
PrintToChatAll(" \x09[\x04%s\x09]\x01 Molotof var, hızlı imha devre dışı!"tag);
    }
    
    if (
GetConVarInt(FindConVar("sm_instadefuse_enabled")) == && iCount && g_DefuseFlag && ((GetGameTime()-g_activeIncendiary)>=7.0))
    {

        if (
remaining 10.0 || (remaining 5.0 && GetEventBool(event"haskit"false)))
        {

            new 
userid GetEventInt(event"userid");
            
CreateTimer(0.0timer_delayuserid);
            
PrintToChatAll(" \x09[\x04%s\x09]\x01 CT bombayı imha etti! Bomba patlamasına \x0F%.1f\x01 saniye kalmıştı."tagremaining);
            
g_DefuseFlag false;
        }

        if (
remaining 5.0 || (remaining 10.0 && !GetEventBool(event"haskit"false)))
        {

            
CS_TerminateRound(1.5CSRoundEndReason:8false);
            
PrintToChatAll(" \x09[\x04%s\x09]\x01 CT bombayı imha edemedi! Bomba patlamasına \x0F%.1f\x01 saniye var. Süre yetersiz."tagremaining);
            
g_DefuseFlag false;
        }
    }
    return 
Action:0;
}

public 
Action:Event_BombPlanted(Handle:eventString:name[], bool:dontBroadcast)
{
    
g_c4PlantTime GetGameTime();
    new 
ent = -1;
    while ((
ent FindEntityByClassname(ent"planted_c4")) != -1)
    {
        
GetEntPropVector(entProp_Send"m_vecOrigin"g_bombPosition);
    }
    
    return 
Action:0;
}

public 
Action:Event_RoundStart(Handle:eventString:name[], bool:dontBroadcast)
{
    
g_c4PlantTime = -1.0;
    
g_DefuseFlag true;
    
g_activeIncendiary 0.0;
    return 
Action:0;
}

public 
Action:timer_delay(Handle:timerany:userid)
{
    new 
client GetClientOfUserId(userid);

    if(
client != 0)
    {
        if(
IsPlayerAlive(client))
        {
            new 
c4 FindEntityByClassname(MaxClients+1"planted_c4");
            if(
c4 != -1)
            {
                
SetEntPropFloat(c4Prop_Send"m_flDefuseCountDown"0);
                
SetEntProp(clientProp_Send"m_iProgressBarDuration"0);
            }
        }
    }
}


public 
molotov_explode(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
userid GetEventInt(event"userid");
    new 
client GetClientOfUserId(userid);
    if(
GetClientTeam(client) == 2)
    {
        new 
Float:f_Pos[3];
        
f_Pos[0] = GetEventFloat(event"x");
        
f_Pos[1] = GetEventFloat(event"y");
        
f_Pos[2] = GetEventFloat(event"z");

        if((
FloatAbs(g_bombPosition[0])-FloatAbs(f_Pos[0]) < 170 ) && (FloatAbs(g_bombPosition[1])-FloatAbs(f_Pos[1]) < 170 ) && (FloatAbs(g_bombPosition[2])-FloatAbs(f_Pos[2]) < 170 ) )
        {
            
g_activeIncendiary GetGameTime();
        }
    }

warning 213: tag mismatch
can you fix the warning?
PHP Code:
public Action:timer_delay(Handle:timerany:userid)
{
    new 
client GetClientOfUserId(userid);

    if(
client != 0)
    {
        if(
IsPlayerAlive(client))
        {
            new 
c4 FindEntityByClassname(MaxClients+1"planted_c4");
            if(
c4 != -1)
            {
                
SetEntPropFloat(c4Prop_Send"m_flDefuseCountDown"0);
                
SetEntProp(clientProp_Send"m_iProgressBarDuration"0);
            }
        }
    }

__________________

Last edited by alphaearth; 11-02-2018 at 12:46.
alphaearth is offline
P4UL
AlliedModders Donor
Join Date: Apr 2017
Location: Netherlands
Old 11-02-2018 , 12:50   Re: warning 213: tag mismatch
Reply With Quote #2

Code:
public Action:timer_delay(Handle:timer, any:userid)
{
    new client = GetClientOfUserId(userid);

    if(client != 0)
    {
        if(IsPlayerAlive(client))
        {
            new c4 = FindEntityByClassname(MaxClients+1, "planted_c4");
            if(c4 != -1)
            {
                SetEntPropFloat(c4, Prop_Send, "m_flDefuseCountDown", 0.0);
                SetEntProp(client, Prop_Send, "m_iProgressBarDuration", 0);
            }
        }
    }
}
SetEntPropFloat asks for a float so make it 0.0 instead of 0
P4UL is offline
alphaearth
Senior Member
Join Date: Feb 2018
Location: Turkey
Old 11-02-2018 , 12:53   Re: warning 213: tag mismatch
Reply With Quote #3

Thank you very much
__________________
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 22:40.


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