Главная | Поиск | Чат | Форум | Рынок | | Регистрация | Вход
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]

Уважаемые пользователи, прежде чем открыть новую тему ознакомьтесь пожалуйста с правилами и воспользуйтесь поиском.

  • Страница 1 из 2
  • 1
  • 2
  • »
Модератор форума: Cooller^_^, Mushroom, Tiger_  
Форум Counter Strike » Counter-Strike 1.6 » Общие вопросы по Counter-Strike » Как сделать (подскажите)
Как сделать
4EREPДата: Понедельник, 2012-08-06, 11:45 | Сообщение # 1
Сообщений: 92
Награды: 1
Люди у меня стоит плагин ultimate_sounds.amxx мне надоели эти звуки, да и людей хочу освободить от закачки всех этих звуков. Хочу только оставить один звук headshot когда попадаешь в голову. Как исправить плагин? Помогите кто знает. За ранее спасибо.
 Украина
LuxuryДата: Понедельник, 2012-08-06, 17:28 | Сообщение # 2
Сообщений: 82
Награды: 9
#include <amxmodx>
#include <csx>

#define PLUGIN "Head Shot Sound"
#define VERSION "1.0"
#define AUTHOR "Luxury"

new sSound[] = {"misc/headshot.wav"}

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("amx_headsound_all", "1")
}

public plugin_precache()
{
precache_sound(sSound)
}

public client_death(killer, victim, weapon, hitplace)
{
if(hitplace == HIT_HEAD)
{
switch(get_cvar_num("amx_head_sound")) {
case 1: client_cmd(0, "spk %s", sSound)
default:
{
client_cmd(killer, "spk %s", sSound)
client_cmd(victim, "spk %s", sSound)
}
}
}
}

Там где new sSound[] в кавычках пишеш путь в звуку. Должно работать.
 Украина
4EREPДата: Понедельник, 2012-08-06, 17:38 | Сообщение # 3
Сообщений: 92
Награды: 1
Luxury У меня звук находиться в папке Sound/misc
 Украина
LuxuryДата: Понедельник, 2012-08-06, 18:05 | Сообщение # 4
Сообщений: 82
Награды: 9
В папке cstrike/sound есть папка Sound в которой папка misc?

путь напиши начиная с папки, что находится в cstrike/sound
 Украина
4EREPДата: Понедельник, 2012-08-06, 18:20 | Сообщение # 5
Сообщений: 92
Награды: 1
вот так что ли? new sSound[] = {"sound/misc/headshot.wav"}
 Украина
LuxuryДата: Понедельник, 2012-08-06, 21:44 | Сообщение # 6
Сообщений: 82
Награды: 9
да, если у тебя две поочерёдно папки sound
 Украина
4EREPДата: Понедельник, 2012-08-06, 22:00 | Сообщение # 7
Сообщений: 92
Награды: 1
Luxury Не знаю но в консоли пишет вот это Error: server failed to transmit file 'sound/sound/misc/headshot.wav'
 Украина
Max7Дата: Вторник, 2012-08-07, 00:01 | Сообщение # 8
Сообщений: 310
Награды: 15
4EREP,
Quote
вот так что ли? new sSound[] = {"sound/misc/headshot.wav"}

Нет...
Code
new sSound[] = {"misc/headshot.wav"}


 Украина
4EREPДата: Вторник, 2012-08-07, 00:39 | Сообщение # 9
Сообщений: 92
Награды: 1
Как здесь сделать что бы не светились на экране слова Go Go Go :)

/* AMX Mod script.
* connect cs.makportal.net:27015 MOL | Classic :)
* connect cs.makportal.net:27016 MOL | Aim Map :)
*
* AMX Public Restart Round Vote v1.0 (public_rr_vote)
*
* This file is provided as is (no warranties)
*
* Usage
* -----
* - open file addons\amx\admin.cfg
* - add these lines to admin.cfg :
* amx_voterr_delay 60
* amx_voterr_time 10
* amx_voterr_ratio 0.60
* - save the changes to file admin.cfg :)
*
* CVARs
* -----
* amx_voterr_delay -> minimum delay in seconds between two voting sessions (default 60 sec)
* amx_voterr_time -> how long voting session goes on (default 10 sec)
* amx_voterr_ratio -> ratio for voting success (default 0.60)
*
* You can customize the CVARs for your need of course.
*
* To do:
* - command 'amx_voterr_enable' which admins can use to enable or disable public voting
* - maybe more public say commands
*
*/

#include <amxmod>
#include <amxmisc>

new bool:cstrike
new votefor = 0
new Float:vote_ratio

public restart_round(time[])
{
server_cmd("sv_restartround %s",time)
return PLUGIN_CONTINUE
}

public delay_msg() {
set_hudmessage(255, 0, 0, -1.0, 0.35, 1, 2.0, 6.0, 0.8, 0.8, 1)
show_hudmessage(0,"Go Go Go :)")
return PLUGIN_CONTINUE
}

public check_votes() {
new players[32],inum
get_players(players,inum,"c")
new Float:voteresult = inum ? (float(votefor) / float(inum)) : 0.0
if (voteresult<vote_ratio){
client_print(0,print_chat,"[MOL] Рестарта не будет! (ЗА ^"%d^") (ПРОТИВ ^"%d^") (НУЖНО ^"%.2f^" процентов).",votefor,inum-votefor,vote_ratio)
return PLUGIN_HANDLED
}
set_task(6.0,"restart_round",0,"1",1)
set_task(12.0,"delay_msg")
client_print(0,print_chat,"[MOL] Большенство проголосовало за рестарт (ЗА ^"%.2f^") (ПРОТИВ ^"%.2f^").",voteresult,inum-votefor,vote_ratio)
client_print(0,print_chat,"[MOL] Сейчас произойдёт рестарт!")
return PLUGIN_HANDLED
}

public count_votes(id,key){
new name[32]
get_user_name(id,name,31)
client_print(0,print_chat,"%s проголосовал %s.",name,key ? "ПРОТИВ" : "ЗА")
if (!key) ++votefor
return PLUGIN_HANDLED
}

public voterr(id,level,cid) {
new Float:voting = get_cvar_float("amx_last_voting")
if (voting > get_gametime()){
client_cmd(id, "spk fvox/fuzz"); client_print(id,print_chat,"[MOL] Голосование уже запущенно...")
return PLUGIN_HANDLED
}
if (voting && voting + get_cvar_float("amx_voterr_delay") > get_gametime()) {
client_cmd(id, "spk fvox/fuzz"); client_print(id,print_chat,"[MOL] Голосование некоторое время недоступно!")
return PLUGIN_HANDLED
}
new msg[256]
new keys = (1<<0)|(1<<1)
if(cstrike)
format(msg,255,"\yДелать Рестарт?\r^n^n1. \wДа\r^n2. \wНет")
else
format(msg,255,"Делать Рестарт?^n^n1. Да^n2. Нет")
new Float:vote_time = get_cvar_float("amx_voterr_time") + 2.0
set_cvar_float("amx_last_voting", get_gametime() + vote_time)
vote_ratio = get_cvar_float("amx_voterr_ratio")
show_menu(0,keys,msg,floatround(vote_time))
set_task(vote_time,"check_votes")
client_cmd(id, "spk fvox/bell"); client_print(id,print_chat,"[MOL] Запущенно голосование за рестарт...")
votefor = 0
return PLUGIN_HANDLED
}

public plugin_init() {
register_plugin("Vote Restart ROund","1.0","SeSh")
register_menucmd(register_menuid("Делать Рестарт?") ,(1<<0)|(1<<1),"count_votes")
register_clcmd("say /restart","voterr",0,"- starts a vote to restart round")
register_cvar("amx_voterr_delay","60")
register_cvar("amx_voterr_time","10")
register_cvar("amx_voterr_ratio","0.60")
register_cvar("amx_last_voting","0")
set_cvar_float("amx_last_voting",0.0)
new mod_name[32]
get_modname(mod_name,31)
cstrike = equal(mod_name,"cstrike") ? true : false
return PLUGIN_CONTINUE
}
 Украина
Max7Дата: Вторник, 2012-08-07, 01:51 | Сообщение # 10
Сообщений: 310
Награды: 15
public delay_msg() {
set_hudmessage(255, 0, 0, -1.0, 0.35, 1, 2.0, 6.0, 0.8, 0.8, 1)
show_hudmessage(0,"Go Go Go :)")
return PLUGIN_CONTINUE
}


 Украина
4EREPДата: Вторник, 2012-08-07, 08:23 | Сообщение # 11
Сообщений: 92
Награды: 1
Max7 Эти строки удалить? И будет работать?

public delay_msg() {
set_hudmessage(255, 0, 0, -1.0, 0.35, 1, 2.0, 6.0, 0.8, 0.8, 1)
show_hudmessage(0,"Go Go Go :)")
return PLUGIN_CONTINUE
}

 Украина
Max7Дата: Вторник, 2012-08-07, 14:53 | Сообщение # 12
Сообщений: 310
Награды: 15
4EREP, есть два варианта...
1. Просто удалить Go Go Go :) чтоб выглядело так - show_hudmessage(0,"")
2. Можно удалить, но тогда не даю гарантию что он скомпилиться...


 Украина
4EREPДата: Вторник, 2012-08-07, 16:19 | Сообщение # 13
Сообщений: 92
Награды: 1
Max7 Спасибо тебе конечно, только не в обиду ты прежде чем подсказать сам попробуй то что ты советуешь сделать
и посмотри что получается.

Добавлено (2012-08-07, 16:19)
---------------------------------------------
По тому и обращаюсь люди кто знает помогите

 Украина
LuxuryДата: Вторник, 2012-08-07, 17:47 | Сообщение # 14
Сообщений: 82
Награды: 9
Вместо set_task(12.0, "delay_msg") :

// set_task(12.0, "delay_msg") или просто удали строку
 Украина
4EREPДата: Вторник, 2012-08-07, 20:05 | Сообщение # 15
Сообщений: 92
Награды: 1
Luxury Кода я удаляю лубую строчку компелирую устанавливаю плагин то вот что получается http://cstrike-club.clan.su/bezymjannyj123.bmp

Добавлено (2012-08-07, 19:50)
---------------------------------------------
Звук слышу только я ака сделать что бы и другие могли загрузить только один звук Head Shot Люди кто понимает в написании плагина подскажите пожалуйста очень прошу

#include <amxmodx>
#include <csx>

#define PLUGIN "Head Shot Sound"
#define VERSION "1.0"
#define AUTHOR "Luxury"

new sSound[] = {"misc/headshot.wav"}

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("amx_headsound_all", "1")
}

public plugin_precache()
{
precache_sound(sSound)
}

public client_death(killer, victim, weapon, hitplace)
{
if(hitplace == HIT_HEAD)
{
switch(get_cvar_num("amx_head_sound")) {
case 1: client_cmd(0, "spk %s", sSound)
default:
{
client_cmd(killer, "spk %s", sSound)
client_cmd(victim, "spk %s", sSound)
}
}
}
}

Там где new sSound[] в кавычках пишеш путь в звуку. Должно работать.

Добавлено (2012-08-07, 20:05)
---------------------------------------------
Люди помогите вот мой исходник по ultimate_sounds как его исправить что бы люди не грузили все эти звуки себе.
Я хочу оставить только один единственный звук при попадании в голову headshot

/********************************************************************************
* AMX Mod X script.
*
* Ultimate Sounds (Ultimate_Sounds.sma)
* Copyright (C) 2006-2008 Bmann_420 / Dizzy / Hoboman
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*********************************************************************************
*
* AMXX Ultimate Sounds Vers. 1.7
* Last Update: 1/26/2007
*
* by Dizzy / Bmann_420 & Hoboman
* Link: http://forums.alliedmods.net/showthread.php?t=7342
*
*
*********************************************************************************
*
* ///////////////////////////////////////////////////
* // AMXMOD[X] //
* // ::Ultimate sounds:: //
* // Origional: by Hephaistos //
* // Ported by: Dizzy //
* // Edited by: Hoboman, bmann_420 //
* // //
* // cvar: //
* // streak_mode < flags > //
* // "a" - messages //
* // "b" - sounds //
* // //
* // knife_mode < flags > //
* // "a" - messages //
* // "b" - sounds //
* // //
* // hs_mode < flags > //
* // "a" - messages //
* // "b" - sounds //
* // //
* // lastman_mode < flags > //
* // "a" - messages //
* // "b" - hp //
* // "c" - sounds //
* ///////////////////////////////////////////////////
*
*********************************************************************************
*/

// Plugin Info
new const PLUGIN[] = "Ultimate Sounds"
new const VERSION[] = "1.7"
new const AUTHOR[] = "Dizzy / Bmann_420"

// Includes
#include <amxmodx>

//Defines
#define KNIFEMESSAGES 5
#define MESSAGESNOHP 5
#define MESSAGESHP 5
#define LEVELS 10

//Pcvars
new streak_mode, knife_mode, hs_mode, lastman_mode

new gmsgHudSync

new kills[33] = {0,...};
new deaths[33] = {0,...};
new alone_ann = 0
new levels[10] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11};

//Streak Sounds
new stksounds[10][] =
{
"misc/multikill",
"misc/megakill",
"misc/ultrakill",
"misc/monsterkill",
"misc/killingspree",
"misc/wickedsick",
"misc/rampage",
"misc/ludacrisskill",
"misc/godlike",
"misc/holyshit"
}

new stkmessages[10][] =
{
"%s: Multi-Kill!",
"%s: Mega-Kill!",
"%s: Ultra-Kill!",
"%s: Monster-Kill!",
"%s: Killing Spree!",
"%s: Wicked Sick!",
"%s: Rampage!",
"%s: Ludacriss-Kill",
"%s: Godlike!",
"%s: Holy Shit!"
}

new knifemessages[KNIFEMESSAGES][] =
{
"KNIFE_MSG_1",
"KNIFE_MSG_2",
"KNIFE_MSG_3",
"KNIFE_MSG_4",
"KNIFE_MSG_5"
}

new messagesnohp[MESSAGESNOHP][] =
{
"NOHP_MSG_1",
"NOHP_MSG_2",
"NOHP_MSG_3",
"NOHP_MSG_4",
"NOHP_MSG_5"
}

new messageshp[MESSAGESHP][] =
{
"HP_MSG_1",
"HP_MSG_2",
"HP_MSG_3",
"HP_MSG_4",
"HP_MSG_5"
}

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("ultimate_sounds",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
register_dictionary("ultimate_sounds.txt")
register_event("DeathMsg","hs","a","3=1")
register_event("DeathMsg","knife_kill","a","4&kni")
register_event("ResetHUD", "reset_hud", "b");
register_event("DeathMsg", "death_event", "a", "1>0");
register_event("DeathMsg","death_msg","a")
register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
register_event("TextMsg","roundend_msg","a","2&#Game_C","2&#Game_w")

lastman_mode = register_cvar("lastman_mode","abc")
streak_mode = register_cvar("streak_mode","ab")
knife_mode = register_cvar("knife_mode","ab")
hs_mode = register_cvar("hs_mode","ab")

gmsgHudSync = CreateHudSyncObj()

return PLUGIN_CONTINUE
}

get_streak()
{
new streak[3]
get_pcvar_string(streak_mode,streak,2)
return read_flags(streak)
}

public death_event(id)
{
new streak = get_streak()

if ((streak&1) || (streak&2))
{
new killer = read_data(1);
new victim = read_data(2);

kills[killer] += 1;
kills[victim] = 0;
deaths[killer] = 0;
deaths[victim] += 1;

for (new i = 0; i < LEVELS; i++)
{
if (kills[killer] == levels[i])
{
announce(killer, i);
return PLUGIN_CONTINUE;
}
}
}
return PLUGIN_CONTINUE;
}

announce(killer, level)
{
new streak = get_streak()

if (streak&1)
{
new name[32];

get_user_name(killer, name, 32);
set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2);
ShowSyncHudMsg(0, gmsgHudSync, stkmessages[level], name);
}

if (streak&2){
for(new i=1;i<=get_maxplayers();i++)
if(is_user_connected(i)==1 )
client_cmd(i, "spk %s", stksounds[level]);
}
}

public reset_hud(id)
{
new streak = get_streak()

if (streak&1)
{

if (kills[id] > levels[0])

{

}

else if (deaths[id] > 1)

{

}
}
}

public client_connect(id)
{
new streak = get_streak()

if ((streak&1) || (streak&2))
{
kills[id] = 0;
deaths[id] = 0;
}
}

public knife_kill()
{
new knifemode[4]
get_pcvar_string(knife_mode,knifemode,4)
new knifemode_bit = read_flags(knifemode)

if (knifemode_bit & 1)
{
new killer_id = read_data(1)
new victim_id = read_data(2)
new killer_name[33], victim_name[33]

get_user_name(killer_id,killer_name,33)
get_user_name(victim_id,victim_name,33)

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
ShowSyncHudMsg(0, gmsgHudSync, "%L", LANG_PLAYER, knifemessages[ random_num(0,KNIFEMESSAGES-1) ],killer_name,victim_name)
}

if (knifemode_bit & 2)
{
for(new i=1;i<=get_maxplayers();i++)
if( is_user_connected(i) == 1 )
client_cmd(i,"spk misc/humiliation")
}
}

public roundend_msg(id)

alone_ann = 0

public death_msg(id)
{

new lmmode[8]
get_pcvar_string(lastman_mode,lmmode,8)
new lmmode_bit = read_flags(lmmode)

new players_ct[32], players_t[32], ict, ite, last
get_players(players_ct,ict,"ae","CT")
get_players(players_t,ite,"ae","TERRORIST")

if (ict==1&&ite==1)
{
new name1[32], name2[32]
get_user_name(players_ct[0],name1,32)
get_user_name(players_t[0],name2,32)
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

if (lmmode_bit & 1)
{
if (lmmode_bit & 2)
{
ShowSyncHudMsg(0, gmsgHudSync, "%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))
}

else
{
ShowSyncHudMsg(0, gmsgHudSync, "%s vs. %s",name1,name2)
}

if (lmmode_bit & 4)
{
for(new i=1;i<=get_maxplayers();i++)
if( is_user_connected(i) == 1 )
client_cmd(i,"spk misc/maytheforce")
}
}
}
else
{
if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
{
last=players_ct[0]
client_cmd(last,"spk misc/oneandonly")

}

else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
{
last=players_t[0]
client_cmd(last,"spk misc/oneandonly")
}

else
{
return PLUGIN_CONTINUE
}
alone_ann = last
new name[32]
get_user_name(last,name,32)

if (lmmode_bit & 1)
{
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

if (lmmode_bit & 2)
{
ShowSyncHudMsg(0, gmsgHudSync, "%L", LANG_PLAYER, messageshp[ random_num(0,MESSAGESHP-1) ],ite ,ict ,name,get_user_health(last))
}

else
{
ShowSyncHudMsg(0, gmsgHudSync, "%L", LANG_PLAYER, messagesnohp[ random_num(0,MESSAGESNOHP-1) ],ite ,ict ,name )
}
}

}
return PLUGIN_CONTINUE
}

public hs()
{
new hsmode[4]
get_pcvar_string(hs_mode,hsmode,4)
new hsmode_bit = read_flags(hsmode)

if (hsmode_bit & 1)
{
new killer_id = read_data(1)
new victim_id = read_data(2)
new victim_name[33]

get_user_name(victim_id,victim_name,33)

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 3.0, 3.0, 0.15, 0.15, 1)
ShowSyncHudMsg(killer_id, gmsgHudSync, "::HEADSHOT::^nYou Owned %s !!",victim_name)
}

if (hsmode_bit & 2)
{
for(new i=1;i<=get_maxplayers();i++)
if( is_user_connected(i)==1 )
client_cmd(i,"spk misc/headshot")
}
}

public plugin_precache()
{
precache_sound("misc/monsterkill.wav")
precache_sound("misc/godlike.wav")
precache_sound("misc/headshot.wav")
precache_sound("misc/humiliation.wav")
precache_sound("misc/killingspree.wav")
precache_sound("misc/multikill.wav")
precache_sound("misc/ultrakill.wav")
precache_sound("misc/maytheforce.wav")
precache_sound("misc/oneandonly.wav")
precache_sound("misc/rampage.wav")
precache_sound("misc/holyshit.wav")
precache_sound("misc/megakill.wav")
precache_sound("misc/wickedsick.wav")
precache_sound("misc/ludacrisskill.wav")

return PLUGIN_CONTINUE
}

 Украина
Форум Counter Strike » Counter-Strike 1.6 » Общие вопросы по Counter-Strike » Как сделать (подскажите)
  • Страница 1 из 2
  • 1
  • 2
  • »
Поиск:
Статистика Форума
Последние темы Читаемые темы Лучшие пользователи Новые пользователи

Поиск туров

(1)

Админка

(17)

Франшиза кино-кафе "NewTone"

(0)

VIP статус

(4)

Запускаем два сервера на одном компьютере.

(30)

Общение ^-^

(9999)

Общение:> (закрыта)

(9999)

Общение :] (закрыта)

(9728)

Флудилочка дизайнеров :)

(5928)

Досчитаем до 10000:)

(4786)

Cooller^_^

(6326)

REDtooth

(2547)

Gep

(2421)

redemaxa

(2162)

cs-strikez

(2010)

Yuume11

(2024-04-17)

Viktoria_123

(2024-04-16)

middragon

(2024-04-10)

dimsttm

(2024-04-08)

Beksultan_08

(2024-04-06)

Популярные