Участник
Пользователь
- Сообщения
- 271
- Реакции
- 43
- Помог
- 5 раз(а)
helo how to make send sound to all players ?:)
1 case no one hears
2 case only player which make gag
3 case only player which get gag
4 case compile error plugin.sma(615) : error 035: argument type mismatch (argument 2)
1 case no one hears
Код:
VTC_PlaySound(0, "../valve/sound/barney/youtalkmuch.wav");
Код:
VTC_PlaySound(id, "../valve/sound/barney/youtalkmuch.wav");
Код:
VTC_PlaySound(player, "../valve/sound/barney/youtalkmuch.wav");
Код:
VTC_PlaySound(0, player, "../valve/sound/barney/youtalkmuch.wav");
Код:
public GagMenuHandler(id, iKey)
{
switch(iKey)
{
case 5:
{
if(++g_MenuData[id][SELECTED_TIME] > ArraySize(g_arrGagTimes)-1)
g_MenuData[id][SELECTED_TIME] = 0;
Show_GagMenu(id, g_MenuData[id][CURRENT_POS]);
}
case 6:
{
if(++g_MenuData[id][SELECTED_TYPE] > ArraySize(g_arrBlockTypes)-1)
g_MenuData[id][SELECTED_TYPE] = 0;
Show_GagMenu(id, g_MenuData[id][CURRENT_POS]);
}
case 7:
{
if(++g_MenuData[id][SELECTED_REASON] > ArraySize(g_arrReasons)-1)
g_MenuData[id][SELECTED_REASON] = 0;
Show_GagMenu(id, g_MenuData[id][CURRENT_POS]);
}
case 8: Show_GagMenu(id, ++g_MenuData[id][CURRENT_POS]);
case 9:
{
if(g_MenuData[id][CURRENT_POS])
Show_GagMenu(id, --g_MenuData[id][CURRENT_POS]);
}
default:
{
new player = g_arrPlayers[id][g_MenuData[id][CURRENT_POS] * GAG_MENU_ITEMS + iKey];
if(!is_user_connected(player))
{
Show_GagMenu(id, g_MenuData[id][CURRENT_POS]);
return PLUGIN_HANDLED;
}
new szAdminName[MAX_NAME_LENGTH], szPlayerName[MAX_NAME_LENGTH];
get_user_name(id, szAdminName, charsmax(szAdminName));
get_user_name(player, szPlayerName, charsmax(szPlayerName));
if(g_PlayerData[player][GAG_BLOCK_TYPE] > STATS)
{
user_unblock(player);
custom_color_chat(0, player, "%l %l", "MSG_PREFIX", "MSG_CHAT_UNBLOCK_ALL", szPlayerName, szAdminName);
custom_color_chat(player, 0, "%l %l", "MSG_PREFIX", "MSG_CHAT_UNBLOCK_PL", szPlayerName, szAdminName);
}
else
{
new blocktime = ArrayGetCell(g_arrGagTimes, g_MenuData[id][SELECTED_TIME]),
block_types:block_type = any:g_MenuData[id][SELECTED_TYPE],
blockreason[REASON_LENGTH];
ArrayGetString(g_arrReasons, g_MenuData[id][SELECTED_REASON], blockreason, charsmax(blockreason));
user_block(player, id, blocktime, blockreason, block_type);
new blocktimeinfo[32];
if(!blocktime)
formatex(blocktimeinfo, charsmax(blocktimeinfo), "навсегда");
else formatex(blocktimeinfo, charsmax(blocktimeinfo), "на %d минут", blocktime);
switch(block_type)
{
case TEXT_CHAT:
{
custom_color_chat(0, player, "%l %l", "MSG_PREFIX", "MSG_TEXTCHAT_BLOCK_ALL", szAdminName, szPlayerName, blocktimeinfo, blockreason);
VTC_PlaySound(0, "../valve/sound/barney/youtalkmuch.wav");
custom_color_chat(player, 0, "%l %l", "MSG_PREFIX", "MSG_TEXTCHAT_BLOCK_PL", szPlayerName, szAdminName, blocktimeinfo, blockreason);
}
case VOICE_CHAT:
{
custom_color_chat(0, player, "%l %l", "MSG_PREFIX", "MSG_VOICECHAT_BLOCK_ALL", szAdminName, szPlayerName, blocktimeinfo, blockreason);
VTC_PlaySound(0, "../valve/sound/barney/youtalkmuch.wav");
custom_color_chat(player, 0, "%l %l", "MSG_PREFIX", "MSG_VOICECHAT_BLOCK_PL", szPlayerName, szAdminName, blocktimeinfo, blockreason);
}
case ALL_CHATS:
{
custom_color_chat(0, player, "%l %l", "MSG_PREFIX", "MSG_ALLCHATS_BLOCK_ALL", szAdminName, szPlayerName, blocktimeinfo, blockreason);
VTC_PlaySound(0, "../valve/sound/barney/youtalkmuch.wav");
custom_color_chat(player, 0, "%l %l", "MSG_PREFIX", "MSG_ALLCHATS_BLOCK_PL", szPlayerName, szAdminName, blocktimeinfo, blockreason);
}
}
}
Последнее редактирование: