Заказать игровой сервер Контакты (заказать плагин/исправить ошибки/другое) Поиск

[ вход ]
[ последние сообщения ]

  • Страница 1 из 1
  • 1
Форум » SourceMod >> CS:Source >> CSGO » Обсуждение » Проиграть звук
Проиграть звук
Naykon Дата: Понедельник, 27.02.2012, 00:04:56 | Сообщение # 1
Сообщений: 439
Репутация: -4 [ +/- ]
Code
public Action:Command_Say(client, args)
{
  if (!g_CanRTV || !client)
   return Plugin_Continue;

  decl String:text[192], String:command[64];
  GetCmdArgString(text, sizeof(text));
  GetCmdArg(0, command, sizeof(command));

  new startidx = 0;
  if(text[strlen(text)-1] == '"')
  {
   text[strlen(text)-1] = '\0';
   startidx = 1;
  }

  if (strcmp(command, "say2", false) == 0)
   startidx += 4;
   
  if (strcmp(text[startidx], "rtv", false) == 0 || strcmp(text[startidx], "rockthevote", false) == 0)
  {
   if (!g_RTVAllowed)
   {
    
    decl Handle:h;
    if ((h = StartMessageAll("SayText2")) != INVALID_HANDLE)
    {
    BfWriteByte(h, client);
    BfWriteByte(h, true);
    decl String:xStR[128];
    Format(xStR, sizeof(xStR), "\x04[Карта]\x05 Голосование пока недоступно.");
    BfWriteString(h, xStR);
    EndMessage();
    }
     
    return Plugin_Continue;
   }
    
   if (g_RTVEnded)
   {

    decl Handle:h;
    if ((h = StartMessageAll("SayText2")) != INVALID_HANDLE)
    {
    BfWriteByte(h, client);
    BfWriteByte(h, true);
    decl String:xStR[128];
    Format(xStR, sizeof(xStR), "\x04[Карта]\x05 Голосование закончено");
    BfWriteString(h, xStR);
    EndMessage();
    }
    
    return Plugin_Continue;
   }
    
   if (g_RTVStarted)
   {   
    decl Handle:h;
    if ((h = StartMessageAll("SayText2")) != INVALID_HANDLE)
    {
    BfWriteByte(h, client);
    BfWriteByte(h, true);
    decl String:xStR[128];
    Format(xStR, sizeof(xStR), "\x04[Карта]\x05 Голосование началось");
    BfWriteString(h, xStR);
    EndMessage();
    }
     
   for (new client = 1; client <= MaxClients; client++)
   {
   if (IsClientInGame(client)) ClientCommand(client, "sound/buttons/blip2.wav");
   }
    
    return Plugin_Continue;
   }


Не пугайтесь кода я просто скопировал часть которая может помочь обнаружить проблемму.
В общем Обратите внимание на:

Code
  if (g_RTVStarted)
   {   
    decl Handle:h;
    if ((h = StartMessageAll("SayText2")) != INVALID_HANDLE)
    {
    BfWriteByte(h, client);
    BfWriteByte(h, true);
    decl String:xStR[128];
    Format(xStR, sizeof(xStR), "\x04[Карта]\x05 Голосование началось");
    BfWriteString(h, xStR);
    EndMessage();
    }
     
   for (new client = 1; client <= MaxClients; client++)
   {
   if (IsClientInGame(client)) ClientCommand(client, "sound/buttons/blip2.wav");
   }
    
    return Plugin_Continue;
   


Не работает, какими только способами не пробывал в чем проблема? Чтоб професионально понять пробмелу этого участка кода должно хватить наверно)
 
_wS_ Дата: Понедельник, 27.02.2012, 00:54:11 | Сообщение # 2
Thanks
Quote
ClientCommand(client, "sound/buttons/blip2.wav");


pipec

Quote
ClientCommand(client, "playgamesound buttons/blip2.wav");


starik

На ровном месте два раза падаешь. Не указал 'playgamesound' да и 'sound/' там не нужен.
 
Naykon Дата: Понедельник, 27.02.2012, 12:53:22 | Сообщение # 3
Сообщений: 439
Репутация: -4 [ +/- ]
Code
public OnMapStart()
{
  g_NextMapsCount = 0;
  g_Voters = 0;
  g_Votes = 0;
  g_VotesNeeded = 0;
  g_RTVStarted = false;
  g_RTVEnded = false;

  AddFileToDownloadsTable("sound/rtv/g.wav");
   
  decl String:MapListPath[256], String:MapListFile[64];
  GetConVarString(g_Cvar_File, MapListFile, 64);
  BuildPath(Path_SM, MapListPath, sizeof(MapListPath), MapListFile);
  if (!FileExists(MapListPath))
  {
   new Handle:hMapCycleFile = FindConVar("mapcyclefile");
   GetConVarString(hMapCycleFile, MapListPath, sizeof(MapListPath));
  }
   
  LogMessage("[RTV] Map Cycle Path: %s", MapListPath);
   
  if (LoadSettings(MapListPath))
  {
   BuildMapMenu();
   g_CanRTV = true;
   CreateTimer(30.0, Timer_DelayRTV);

  }
  else
  {
   LogMessage("[RTV] Cannot find map cycle file, RTV not active.");
   g_CanRTV = false;
  }
}


Не компелируется ругается на
Code
AddFileToDownloadsTable("sound/rtv/g.wav");
 
_wS_ Дата: Понедельник, 27.02.2012, 13:28:20 | Сообщение # 4
Thanks
 
Форум » SourceMod >> CS:Source >> CSGO » Обсуждение » Проиграть звук
  • Страница 1 из 1
  • 1
Поиск: