Installation de sons "Headshot" sur un serveur cz/cs


Ptitbeurre

Messages recommandés

Posté(e)

Salut,

Je v vous exposer mon desir :

J'aimerai replacer sur mon serveur les sons headshot par des headshots que j'ai telecharger.

Je suis au courant qu'il me faut un amx. J'aimerai l'avoir et avoir une petite explication sur son fonctionnement.

Merci d'avance

Ps : J'ai deja lu plusieurs articles sur differents forum ou site, je n'est rien trouver de valables ou explicites merci

Posté(e)

www.cs-amx.com tout y est expliqué, encore faut-il savoir lire et regarde là ou il faut.

Pour mettre ces sons, il te suffit de faire une installation normale d'amx et ensuite d'aller dans la configuration d'amx (via le "amxmodmenu") et d'activer les sons dans ce dit menu.

Posté(e)

Si je me suis renseigne il faut un amx appeller Usounds.amx !

Jessaie et je vous dis quoi .

ps : si je veut que le son soit jouer chez le clent mais par exemple au lieu quil entende le son Headshot de cz j'aimerai qu'il entende le son que j'ai mis

Posté(e)

voila !! J'ai trouver le .sma pour le ultimate_sound !! Il suffit de changer les noms des dossiers

/* AMX Mod script.

*

* ::Ultimate sounds::

* by Hephaistos (hephaistos@djeyl.net)

*

* cvar:

* streak_mode < flags >

* "a" - messages

* "b" - sounds

*

* bomb_mode < flags >

* "a" - exploded

* "b" - planting

* "c" - defusing

* "d" - planted

* "e" - defused

* "f" - failed to defuse

* "g" - pickup

* "h" - dropped

* "i" - sounds

*

* hekill_mode < flags >

* "a" - show normal HE-Kill in hud

* "b" - show suicide HE-Kill in hud

* "c" - play sound on HE-Kill

*

* kniff_mode < flags >

* "a" - messages

* "b" - sounds

*

* hs_mode < flags >

* "a" - messages

* "b" - sounds

*

* lastman_mode < flags >

* "a" - messages

* "b" - hp

* "c" - sounds

*

*

* Thank ToT|V!PER ,OLO ,JustinHoMi ,PsychoGuard and dJeyL for your plugins

*

*

*/

#include

#define KNIFFMESSAGES 4

#define HEMESSAGES 4 /* Number of Random Messages for Normal HE Kills */

#define HESMESSAGES 4 /* Number of Random Messages for Suicide HE Kills */

#define LEVELS 5

#define MESSAGESNOHP 4

#define MESSAGESHP 4

new planter

new defuser

new c4timer

new defusing

new Float:last_omg

new Float:last_plan

new kills[33] = {0,...};

new deaths[33] = {0,...};

new alone_ann = 0

new levels[5] = {3, 5, 7, 9, 10};

new stksounds[5][] = {"arabuse/multikill", "arabuse/ultrakill",

"arabuse/monsterkill", "arabuse/killingspree", "arabuse/godlike"};

new stkmessages[5][] = {"%s: Multi-Kill!", "%s: Ultra-Kill!!!", "%s: Monster-kill!!!",

"%s est en FOLIE FURIEUSE !!!", "%s est MICHEL !!!." };

new kniffmessages[KNIFFMESSAGES][] = {

"%s a decoupe en tranches %s",

"%s a goute de la lame de %s",

"%s a fait de la chair a saucisses de %s",

"%s tue au couteau %s"}

new he_messages[HEMESSAGES][] = {

"%s a jouer le Pere Noel pour faire plaisir a %s",

"%s a deposer une mine destinee a %s",

"%s a joue au Tir a l’arc avec %s",

"%s a fait sauter %s"} /* Random Messages for Normal HE Kills */

new hes_messages[HESMESSAGES][] = {

"%s ... Bah le NOOB !!",

"%s a essaye de lancer la HE mais c’est mechament rate !!",

"%s ... Mais que ce que t’a foutu ??",

"%s explodes!"} /* Random Messages for Suicide HE Kills */

new messagesnohp[MESSAGESNOHP][] = {"%i terrorist vs %i CT^n%s: Tout depend de toi !!",

"%i terrorist vs %i CT^n%s: J’espère que le grand MICHEL est avec toi !.",

"%i terrorist vs %i CT^n%s: Toute ton equipe est morte, Amuse-toi bien !",

"%i terrorist vs %i CT^n%s: Bah! Tout seul !!"}

new messageshp[MESSAGESHP][] = {"%i terrorist vs %i CT^n%s (%i hp): Tout depend de toi !",

"%i terrorist vs %i CT^n%s (%i hp): J’espère que le grand MICHEL est avec toi !",

"%i terrorist vs %i CT^n%s (%i hp): Toute ton equipe est morte, Amuse-toi bien !",

"%i terrorist vs %i CT^n%s (%i hp): Bah! Tout seul !!"}

get_streak() {

new streak[3]

get_cvar_string("streak_mode",streak,2)

return read_flags(streak)

}

get_bemode() {

new bemode[10]

get_cvar_string("bomb_mode",bemode,9)

return read_flags(bemode)

}

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) {

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);

show_hudmessage(0, stkmessages[level], name);

}

if (streak&2){

client_cmd(0, "spk %s", stksounds[level]);

}

}

public reset_hud(id) {

new streak = get_streak()

if (streak&1){

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

client_print(id, print_chat,

"* Tu est un chasseur de tete avec %d morts.", kills[id]);

} else if (deaths[id] > 1) {

client_print(id, print_chat,

"* Regarde ! Le bourrin avec ses %d tues.", deaths[id]);

}

}

}

public client_connect(id) {

new streak = get_streak()

if ((streak&1) || (streak&2)){

kills[id] = 0;

deaths[id] = 0;

}

}

public got_bomb(id){

new bemode = get_bemode()

if (bemode&1){

planter = id

defuser = defusing = 0

if ((read_data(1)==2) && (last_omg < get_gametime())){

new bplayers_t[32], numte

get_players(bplayers_t,numte,"e","TERRORIST")

last_omg = get_gametime() + 15.0

new name[32]

get_user_name(planter, name , 32)

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

show_hudmessage(bplayers_t[0],"Omg! %s desamorce la SACOCHE !!!",name)

}

}

}

public bdef_g(id){

new bemode = get_bemode()

if (read_data(1) == 3){

if (last_plan < get_gametime()){

if (bemode&2){

new bplayers_t[32], numte

get_players(bplayers_t,numte,"e","TERRORIST")

last_plan = get_gametime() + 15.0

new name[32]

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

get_user_name(planter, name , 32)

show_hudmessage(bplayers_t[0],"%s plante la SACOCHE!",name)

}

}

}

else {

defuser = defusing = id

if (last_plan < get_gametime()){

if (bemode&4){

new bplayers_ct[32], numct

get_players(bplayers_ct,numct,"e","CT")

last_plan = get_gametime() + 15.0

new name[32]

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

get_user_name(defusing, name , 32)

show_hudmessage(bplayers_ct[0],"%s desamorce la SACOCHE !! :D",name)

}

}

}

}

public bdef_l(id)

defusing = 0

public disable_c4(){

c4timer = 0

last_plan = 0.0

last_omg = 0.0

remove_task(8038)

}

public bomb_planted(){

new bemode = get_bemode()

if (bemode&256){

client_cmd(0,"spk djeyl/c4powa")

}

if (bemode&8){

new name[32]

get_user_name(planter, name , 32)

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

show_hudmessage(0,"%s set us up the bomb!!!",name)

c4timer = get_cvar_num("mp_c4timer") - 2

set_task(1.0,"bomb_c",8038,"",0,"b")

last_plan = 0.0

}

}

public bomb_c(){

new bemode = get_bemode()

if (--c4timer > 0){

if (c4timer == 30 || c4timer == 20){

if (bemode&256){

new temp[48]

num_to_word(c4timer,temp,48)

client_cmd(0,"spk ^"vox/%s seconds until explosion^"",temp)

}

}

else if (c4timer < 11){

if (bemode&256){

new temp[48]

num_to_word(c4timer,temp,48)

client_cmd(0,"spk ^"vox/%s^"",temp)

}

}

if (defusing)

client_print(defusing,print_center,"%d",c4timer)

}

else{

remove_task(8038)

}

}

public bomb_defused(){

new bemode = get_bemode()

if (bemode&256){

client_cmd(0,"spk djeyl/laugh")

}

if (bemode&16){

new name[32]

get_user_name(defuser, name , 32)

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

show_hudmessage(0,"%s a reussi son desamorcage ! Ca c’est du jeu !!",name)

disable_c4()

}

}

public bomb_failure(){

new bemode = get_bemode()

if (defuser){

if (bemode&256){

client_cmd(0,"spk djeyl/witch")

}

if (bemode&32){

new name[32]

get_user_name(defuser, name , 32)

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

show_hudmessage(0,"%s foire son desamorcage...",name)

}

}

}

public bomb_pickup(id){

new bemode = get_bemode()

if (bemode&64){

new bplayers_t[32], numte

get_players(bplayers_t,numte,"e","TERRORIST")

new name[32]

get_user_name(id, name , 32)

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

show_hudmessage(bplayers_t[0],"%s pique la SACOCHE...",name)

}

}

public bomb_drop(){

new bemode = get_bemode()

if (bemode&128){

new bplayers_t[32], numte

get_players(bplayers_t,numte,"e","TERRORIST")

new name[32]

get_user_name(planter, name , 32)

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

show_hudmessage(bplayers_t[0],"%s paume la sacoche!!!",name)

}

}

public he_kills(){

new killer_id = read_data(1)

new victim_id = read_data(2)

new killer_name[32], victim_name[33]

get_user_name(killer_id,killer_name,33)

get_user_name(victim_id,victim_name,33)

new hekmode[8]

get_cvar_string("hekill_mode",hekmode,8)

new hekmode_bit = read_flags(hekmode)

if (hekmode_bit & 1) {

if (victim_id != killer_id)

{

if (hekmode_bit & 4) {

client_cmd(0,"spk djeyl/grenade")

}

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

show_hudmessage(0,he_messages[ random_num(0,HEMESSAGES-1)],killer_name,victim_name)

}

}

if (hekmode_bit & 2) {

if (victim_id == killer_id)

{

if (hekmode_bit & 4) {

client_cmd(0,"spk djeyl/witch")

}

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

show_hudmessage(0,hes_messages[ random_num(0,HESMESSAGES-1) ],victim_name)

}

}

}

public knife_kill(){

new kniffmode[4]

get_cvar_string("kniff_mode",kniffmode,4)

new kniffmode_bit = read_flags(kniffmode)

if (kniffmode_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)

show_hudmessage(0,kniffmessages[ random_num(0,KNIFFMESSAGES-1) ],killer_name,victim_name)

}

if (kniffmode_bit & 2) {

client_cmd(0,"spk arabuse/humiliation")

}

}

public roundend_msg(id)

alone_ann = 0

public death_msg(id){

new lmmode[8]

get_cvar_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){

show_hudmessage(0,"%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))

}

else {

show_hudmessage(0,"%s vs. %s",name1,name2)

}

if (lmmode_bit & 4){

client_cmd(0,"spk arabuse/maytheforce")

}

}

}

else {

if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4)){

last=players_ct[0]

client_cmd(last,"spk arabuse/oneandonly")

}

else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4)){

last=players_t[0]

client_cmd(last,"spk arabuse/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){

show_hudmessage(0,messageshp[ random_num(0,MESSAGESHP-1) ],ite ,ict ,name,get_user_health(last))

}

else {

show_hudmessage(0,messagesnohp[ random_num(0,MESSAGESNOHP-1) ],ite ,ict ,name )

}

}

if (lmmode_bit & 4){

client_cmd(last,"spk arabuse/maytheforce")

}

}

return PLUGIN_CONTINUE

}

public hs(){

new hsmode[4]

get_cvar_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)

show_hudmessage(killer_id,"::HEADSHOT::^nTu AbuSeD %s !!",victim_name)

}

if (hsmode_bit & 2){

client_cmd(0,"spk arabuse/headshot")

}

}

public plugin_precache()

{

precache_sound( "djeyl/c4powa.wav")

precache_sound( "djeyl/laugh.wav")

precache_sound( "djeyl/grenade.wav")

precache_sound( "djeyl/witch.wav")

precache_sound( "arabuse/monsterkill.wav")

precache_sound( "arabuse/godlike.wav")

precache_sound( "arabuse/headshot.wav")

precache_sound( "arabuse/humiliation.wav")

precache_sound( "arabuse/killingspree.wav")

precache_sound( "arabuse/multikill.wav")

precache_sound( "arabuse/ultrakill.wav")

precache_sound( "arabuse/maytheforce.wav")

precache_sound( "arabuse/oneandonly.wav")

return PLUGIN_CONTINUE

}

public plugin_init() {

register_plugin("Ultimate sound","0.76","hephaistos@djeyl.net")

register_event("DeathMsg","hs","a","3=1")

register_event("DeathMsg","knife_kill","a","4&kni")

register_event("DeathMsg","he_kills","a","4&gren")

register_event("StatusIcon", "got_bomb", "be", "1=1", "1=2", "2=c4")

register_event("SendAudio", "bomb_planted", "a", "2&%!MRAD_BOMBPL")

register_event("SendAudio", "bomb_defused", "a", "2&%!MRAD_BOMBDEF")

register_event("TextMsg", "bomb_failure", "a", "2Target_B")

register_event("BarTime", "bdef_g", "be", "1=10", "1=5","1=3")

register_event("BarTime", "bdef_l", "be", "1=0")

register_event("TextMsg", "bomb_pickup", "bc", "2Got_bomb")

register_event("TextMsg", "bomb_drop", "bc", "2Game_bomb_d")

register_event("SendAudio", "disable_c4", "a", "2&%!MRAD_terwin","2&%!MRAD_ctwin","2&%!MRAD_rounddraw")

register_event("TextMsg","disable_c4","a","2Game_C","2Game_w")

register_event("ResetHUD", "reset_hud", "b");

register_event("DeathMsg", "death_event", "a")

register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")

register_event("TextMsg","roundend_msg","a","2Game_C","2Game_w")

register_event("DeathMsg","death_msg","a")

register_cvar("lastman_mode","abc")

register_cvar("streak_mode","ab")

register_cvar("bomb_mode","abcdefghi")

register_cvar("hekill_mode","abc")

register_cvar("kniff_mode","ab")

register_cvar("hs_mode","ab")

return PLUGIN_CONTINUE

}

Posté(e)

Suffisait de faire un quote avec juste

public plugin_precache()

{

precache_sound( "djeyl/c4powa.wav" )

precache_sound( "djeyl/laugh.wav" )

precache_sound( "djeyl/grenade.wav" )

precache_sound( "djeyl/witch.wav" )

precache_sound( "arabuse/monsterkill.wav" )

precache_sound( "arabuse/godlike.wav" )

precache_sound( "arabuse/headshot.wav" )

precache_sound( "arabuse/humiliation.wav" )

precache_sound( "arabuse/killingspree.wav" )

precache_sound( "arabuse/multikill.wav" )

precache_sound( "arabuse/ultrakill.wav" )

precache_sound( "arabuse/maytheforce.wav" )

precache_sound( "arabuse/oneandonly.wav" )

return PLUGIN_CONTINUE

}

:heink:

Posté(e)

heu nan, ça c'est pour faire dl les fichiers son. Si tu ne modifie que ça, le client téléchargera les nouveaux sons, mais entendra toujours les anciens.

Il faut changer le fichier dans chaque evenement.

par exemple:

public hs(){

new hsmode[4]

get_cvar_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)

show_hudmessage(killer_id,"::HEADSHOT::^nTu AbuSeD %s !!",victim_name)

}

if (hsmode_bit & 2){

client_cmd(0,"spk arabuse/newhs" )

}

}

public plugin_precache()

{

precache_sound( "djeyl/c4powa.wav" )

precache_sound( "djeyl/laugh.wav" )

precache_sound( "djeyl/grenade.wav" )

precache_sound( "djeyl/witch.wav" )

precache_sound( "arabuse/monsterkill.wav" )

precache_sound( "arabuse/godlike.wav" )

precache_sound( "arabuse/newhs.wav" )

precache_sound( "arabuse/humiliation.wav" )

precache_sound( "arabuse/killingspree.wav" )

precache_sound( "arabuse/multikill.wav" )

precache_sound( "arabuse/ultrakill.wav" )

precache_sound( "arabuse/maytheforce.wav" )

precache_sound( "arabuse/oneandonly.wav" )

return PLUGIN_CONTINUE

}

pour le son "headshot"

en prenant bien soin d'avoir placé le son newhs.wav au bon endroit.

Posté(e)

Donc ce que j'ai envoyer la c'est le .sma necessaire pour modifier les sons "headshot ect...".

Tout ce qu'il faut modifier c'est le nom des dossiers et des fichiers en ceux de vos sons.

Apres avoir transformer en amx ce .sma , il faut l'installer sur votre serveur mais le probleme a ce moment la c'est que l'on entent le son de base de cz et en meme temps le son que vous aver rajouter ! Pour regler ce probleme il suffit de desactiver les sons dans l'Amx mod menu !

  • 5 years later...

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.