Почему возникает такая ошибка и как её исправить?
PHP:
#include <sourcemod>
#include <sdktools>
new sec;
#define ONE "music/zr/csgo/1.wav"
#define TWO "music/zr/csgo/2.wav"
#define THREE "music/zr/csgo/3.wav"
public OnPluginStart() HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy);
public OnMapStart()
{
PrecacheSound("music/zr/csgo/1.wav");
PrecacheSound("music/zr/csgo/2.wav");
PrecacheSound("music/zr/csgo/3.wav");
}
public Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
sec = GetConVarInt(FindConVar("mp_freezetime"));
CreateTimer(1.0, AreYouReady, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}
public Action:AreYouReady(Handle:timer)
{
for (new i = 1; i <= MaxClients; i++)
{
if (--sec > 0)
{
if (sec == 3)
{
EmitSoundToClient(i, THREE);
}
else if (sec == 2)
{
EmitSoundToClient(i, TWO);
}
else if (sec == 1)
{
EmitSoundToClient(i, ONE);
}
return Plugin_Continue;
}
}
return Plugin_Stop;
}
PHP:
L 10/17/2014 - 13:34:40: [SM] Native "EmitSound" reported: Client 1 is not connected
L 10/17/2014 - 13:34:40: [SM] Displaying call stack trace for plugin "round_start_massage.smx":
L 10/17/2014 - 13:34:40: [SM] [0] Line 379, D:\Новая папка (155)\Новая папка\scripting\include\sdktools_sound.inc::EmitSoundToClient()
L 10/17/2014 - 13:34:40: [SM] [1] Line 33, D:\Новая папка (155)\Новая папка\scripting\round_start_massage.sp::AreYouReady()
L 10/17/2014 - 13:34:41: [SM] Native "EmitSound" reported: Client 1 is not connected
L 10/17/2014 - 13:34:41: [SM] Displaying call stack trace for plugin "round_start_massage.smx":
L 10/17/2014 - 13:34:41: [SM] [0] Line 379, D:\Новая папка (155)\Новая папка\scripting\include\sdktools_sound.inc::EmitSoundToClient()
L 10/17/2014 - 13:34:41: [SM] [1] Line 38, D:\Новая папка (155)\Новая папка\scripting\round_start_massage.sp::AreYouReady()