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

Chat messages do not appear


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alphaearth
Senior Member
Join Date: Feb 2018
Location: Turkey
Old 11-03-2018 , 19:59   Chat messages do not appear
Reply With Quote #1

chat messages do not appear. someone can help me?_

.sp file
PHP Code:
#include <sdktools>
#include <cstrike>
#include <multicolors>

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

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


public 
OnPluginStart()
{
    
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;
    
    
CreateConVar("CSP_hizlibombaimha_aktif""1""Whether the plugin is enabled"0false0.0false0.0);

    
AutoExecConfig(true"CSP_hizlibombaimha");
    
LoadTranslations("CSP_hizlibombaimha.phrases");
}

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++;
    }
    
    if((
GetGameTime()-g_activeIncendiary)<7.0)
    {
        
CPrintToChatAll("[CSP] %t""MolotofUyarisi");
    }
    
    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);
            
CPrintToChatAll("[CSP] %t""ImhaEdildi"remaining);
            
            
g_DefuseFlag false;
        }

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

            
CS_TerminateRound(1.5CSRoundEndReason:8false);
            
CPrintToChatAll("[CSP] %t""ImhaEdilemedi"remaining);
            
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.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();
        }
    }

translation file
Code:
"Phrases"
{
	"MolotofUyarisi"
	{
		"en"			"Active {green}molotov{default} present, Good luck defusing."
		"tr"			"Aktif {green}molotof{default} var. Hızlı imha devre dışı."
	}
	"ImhaEdildi"
	{
		"#format"		"{1:.1f}"
		"en"			"CT's defused the bomb in time! {green}{1}{default} remaining."
		"tr"			"CT bombayı imha etti! Bomba patlamasına {green}{1} saniye{default} kalmıştı."
	}
	"ImhaEdilemedi"
	{
		"#format"		"{1:.1f}"
		"en"			"CT's didn't defuse in time! {green}{1}{default} remaining."
		"tr"			"CT bombayı imha edemedi! Bomba patlamasına {green}{1} saniye{default} var. Süre yetersiz."
	}
}
__________________

Last edited by alphaearth; 11-04-2018 at 08:37. Reason: #include <multicolors>
alphaearth is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 11-03-2018 , 21:32   Re: Chat messages do not appear
Reply With Quote #2

Are you getting any errors in the Sourcemod error logs?
__________________
Neuro Toxin is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-04-2018 , 05:37   Re: Chat messages do not appear
Reply With Quote #3

...change CPrintToChatAll to PrintToChatAll ?
__________________
Do not Private Message @me
Bacardi is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 11-04-2018 , 08:03   Re: Chat messages do not appear
Reply With Quote #4

Quote:
Originally Posted by Bacardi View Post
...change CPrintToChatAll to PrintToChatAll ?
#include <renkler> *renkler* means colors so i thinks he is using <csgo_colors> but translated in turkish
iskenderkebab33 is offline
alphaearth
Senior Member
Join Date: Feb 2018
Location: Turkey
Old 11-04-2018 , 08:37   Re: Chat messages do not appear
Reply With Quote #5

#include <multicolors>
__________________
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 05:49.


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