MOPKOBKA
Участник
- Сообщения
- 4
- Реакции
- 0
Ребят подскажите пожалуйста не могу что то понять,почему не работает плагин
L 06/14/2020 - 23:37:38: [SM] [0] Line 244, D:\Games\Servers\CSS-Public_Server\orangebox\cstrike\addons\sourcemod\scripting\RoundEndSound.sp::OnConfigsExecuted()
строчка [244] cookieResPref = RegClientCookie("Round End Sound", "Round End Sound", CookieAccess_Private);
Ну и сам паблик
Ещё одна строчка L 06/14/2020 - 23:53:10: [SM] [0] Line 358, D:\Games\Servers\CSS-Public_Server\orangebox\cstrike\addons\sourcemod\scripting\RoundEndSound.sp::ResCmd()
Строчка [358] SetClientCookie(client, cookieResPref, buffer);
Ну и ещё паблик где используется
L 06/14/2020 - 23:37:38: [SM] [0] Line 244, D:\Games\Servers\CSS-Public_Server\orangebox\cstrike\addons\sourcemod\scripting\RoundEndSound.sp::OnConfigsExecuted()
строчка [244] cookieResPref = RegClientCookie("Round End Sound", "Round End Sound", CookieAccess_Private);
Ну и сам паблик
C-подобный:
public OnConfigsExecuted()
{
enabled = GetConVarBool(CvarEnabled);
endmsg = GetConVarBool(RoundEndMsg);
startmsg = GetConVarBool(RoundStartMsg);
connectmsg = GetConVarBool(PlayerConnectMsg);
mepenable = GetConVarBool(MapEndSound);
msgtime = GetConVarFloat(MsgCycle);
rndsnd = GetConVarBool(RandomSound);
clientpref = GetConVarBool(ClientPref);
common = GetConVarBool(CommonSounds);
debugsounds = GetConVarBool(Debug);
blockcry = GetConVarBool(DodCry);
new Handle:RRD = FindConVar("mp_round_restart_delay");
if (RRD != INVALID_HANDLE)
SetConVarBounds(RRD, ConVarBound_Upper, false, 10.0);
GetConVarString(SoundListPath, SndListPath, sizeof(SndListPath));
if (clientpref && !loaded)
{
RegConsoleCmd("sm_res", ResCmd, "On/Off Round End Sounds");
cookieResPref = RegClientCookie("Round End Sound", "Round End Sound", CookieAccess_Private);
new info;
SetCookieMenuItem(ResPrefSelected, any:info, "Round End Sound");
loaded = true;
}
if (enabled)
{
if(msgtime > 0.0)
Timer = CreateTimer(msgtime, AnnounceRepeater, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
if (!active)
ActivatePlugin();
LoadSounds();
}
}
Строчка [358] SetClientCookie(client, cookieResPref, buffer);
Ну и ещё паблик где используется
C-подобный:
public Action:ResCmd(client, args)
{
if(enabled)
{
if (clientpref)
{
switch (res_sound[client])
{
case 0 :
{
res_sound[client] = 1;
PrintToChat(client, "\x04[\x01RoundEndSound\x04] %t", "Res On");
}
default :
{
res_sound[client] = 0;
PrintToChat(client, "\x04[\x01RoundEndSound\x04] %t", "Res Off");
}
}
}
decl String:buffer[5];
IntToString(res_sound[client], buffer, sizeof(buffer));
SetClientCookie(client, cookieResPref, buffer);
}
return Plugin_Handled;
}
Последнее редактирование: