vitas
Участник
- Сообщения
- 4
- Реакции
- 0
Здравствуйте, я пишу плагин sourcemod для CS:Source, но столкнулся с проблемой.
Подскажите, что я недописал или не так сделал?
Ниже описание.
Ошибки:
-----------------------------------------------------------------------------------------------------------------
MP3 initialized with no sound cache, this may cause janking. [ sound\welcome.mp3]
Failed to create decoder for MP3 [ sound\welcome.mp3 ]
MP3 initialized with no sound cache, this may cause janking. [ sound\welcome.mp3 ]
Failed to create decoder for MP3 [ sound\welcome.mp3 ]
*** Invalid sample rate (0) for sound 'sound\welcome.mp3'.
-----------------------------------------------------------------------------------------------------------------
#include <sourcemod>
new Handle:h_Enabled = INVALID_HANDLE;
new Handle:h_Sound = INVALID_HANDLE;
public Plugin:myinfo = {
name = "Test5",
author = "vitas",
description = "Music",
url = ""
};
public OnPluginStart()
{
h_Enabled = CreateConVar("sm_joinsound", "1", "Enable sound when client is join. 1 = enable", FCVAR_NOTIFY|FCVAR_DONTRECORD);
h_Sound = CreateConVar("sm_joinsoundname", "NONE", "Use .mp3 or .wav | Set the name of the name of the sound to play when the client is join!", FCVAR_NOTIFY|FCVAR_DONTRECORD);
AutoExecConfig(true, "JoinSoundConfig");
}
public OnClientPutInServer(client)
{
new IsEnabled = GetConVarInt(h_Enabled);
if (IsEnabled == 1)
{
new String:SName[99];
GetConVarString(h_Sound, SName, sizeof(SName));
if(StrEqual(SName, "NONE") || StrEqual(SName, ""))
{
PrintToServer("[SM] No Sound was selected!");
}
else
{
for (new i = 1; i < GetMaxClients(); i++)
{
if(IsClientInGame(i) && IsClientConnected(i))
{
ClientCommand(i, "play %s", SName);
}
}
}
}
}
В файле JoinSoundConfig:
-----------------------------------------------------------------------
// This file was auto-generated by SourceMod (v1.8.0.5929)
// ConVars for plugin "5.smx"
sm_joinsoundname sound\class\welcome.mp3
-----------------------------------------------------------------------
Подскажите, что я недописал или не так сделал?
Ниже описание.
Ошибки:
-----------------------------------------------------------------------------------------------------------------
MP3 initialized with no sound cache, this may cause janking. [ sound\welcome.mp3]
Failed to create decoder for MP3 [ sound\welcome.mp3 ]
MP3 initialized with no sound cache, this may cause janking. [ sound\welcome.mp3 ]
Failed to create decoder for MP3 [ sound\welcome.mp3 ]
*** Invalid sample rate (0) for sound 'sound\welcome.mp3'.
-----------------------------------------------------------------------------------------------------------------
#include <sourcemod>
new Handle:h_Enabled = INVALID_HANDLE;
new Handle:h_Sound = INVALID_HANDLE;
public Plugin:myinfo = {
name = "Test5",
author = "vitas",
description = "Music",
url = ""
};
public OnPluginStart()
{
h_Enabled = CreateConVar("sm_joinsound", "1", "Enable sound when client is join. 1 = enable", FCVAR_NOTIFY|FCVAR_DONTRECORD);
h_Sound = CreateConVar("sm_joinsoundname", "NONE", "Use .mp3 or .wav | Set the name of the name of the sound to play when the client is join!", FCVAR_NOTIFY|FCVAR_DONTRECORD);
AutoExecConfig(true, "JoinSoundConfig");
}
public OnClientPutInServer(client)
{
new IsEnabled = GetConVarInt(h_Enabled);
if (IsEnabled == 1)
{
new String:SName[99];
GetConVarString(h_Sound, SName, sizeof(SName));
if(StrEqual(SName, "NONE") || StrEqual(SName, ""))
{
PrintToServer("[SM] No Sound was selected!");
}
else
{
for (new i = 1; i < GetMaxClients(); i++)
{
if(IsClientInGame(i) && IsClientConnected(i))
{
ClientCommand(i, "play %s", SName);
}
}
}
}
}
В файле JoinSoundConfig:
-----------------------------------------------------------------------
// This file was auto-generated by SourceMod (v1.8.0.5929)
// ConVars for plugin "5.smx"
sm_joinsoundname sound\class\welcome.mp3
-----------------------------------------------------------------------