Senior Member
Join Date: Feb 2018
Location: Turkey
|
11-02-2018
, 12:40
warning 213: tag mismatch
|
#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", 0, false, 0.0, false, 0.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:event, String:name[], bool:dontBroadcast) { new Float:remaining = GetConVarFloat(FindConVar("mp_c4timer")) - (GetGameTime() - g_c4PlantTime); new iCount; new i = 1; while (i <= MaxClients) { if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 2) { iCount++; } i++; }
char tag[64]; GetConVarString(csgoplugin_tag, tag, 64); 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")) == 1 && iCount < 1 && 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.0, timer_delay, userid); PrintToChatAll(" \x09[\x04%s\x09]\x01 CT bombayı imha etti! Bomba patlamasına \x0F%.1f\x01 saniye kalmıştı.", tag, remaining); g_DefuseFlag = false; }
if (remaining < 5.0 || (remaining < 10.0 && !GetEventBool(event, "haskit", false))) {
CS_TerminateRound(1.5, CSRoundEndReason:8, false); PrintToChatAll(" \x09[\x04%s\x09]\x01 CT bombayı imha edemedi! Bomba patlamasına \x0F%.1f\x01 saniye var. Süre yetersiz.", tag, remaining); g_DefuseFlag = false; } } return Action:0; }
public Action:Event_BombPlanted(Handle:event, String:name[], bool:dontBroadcast) { g_c4PlantTime = GetGameTime(); new ent = -1; while ((ent = FindEntityByClassname(ent, "planted_c4")) != -1) { GetEntPropVector(ent, Prop_Send, "m_vecOrigin", g_bombPosition); } return Action:0; }
public Action:Event_RoundStart(Handle:event, String:name[], bool:dontBroadcast) { g_c4PlantTime = -1.0; g_DefuseFlag = true; g_activeIncendiary = 0.0; return Action:0; }
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); SetEntProp(client, Prop_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: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); SetEntProp(client, Prop_Send, "m_iProgressBarDuration", 0); } } } }
__________________
Last edited by alphaearth; 11-02-2018 at 12:46.
|
|