Counter-Strike 1.6 Download Forum

Counter-Strike Server RSS Feed atom+xml Counter-Strike Server RSS Feed Counter-Strike Server CsBesTiaL Top 100 BesTiaL Autentificare Inregistrare Profil Mesaje private FAQ Grupuri Counter-Strike
 Servere-le de Counter-Strike CsBesTiaL sunt Pornite
cs bestial
Custom Search
Get our toolbar! Download Counter-Strike 1.6 andoird application
[Tutorial] Schimbarea sunetelor originale cu altele
Du-te la pagina despre counter-strike
 
Creaza un subiect nou   Raspunde la subiect
Mesaj
Blacktouch
Site AdmiN
Site AdmiN
cs

Data Inscrierii: 15/Sep/2013
Mesaje: 1604

Mesaj

2014-09-16    cstrike [Tutorial] Schimbarea sunetelor originale cu altele


Citat:
Pasul 1: Intai includem fisierele.inc corespunzatoare in sursa:

#include < amxmodx >
#include < fakemeta >


Pasul 2: Creem o variabila globala falsa:

new bool:bUserHasAk47[ 33 ];


Pasul 3: Acum enumeram sunetele originale ale armei intr-o constanta:

new const OriginalAK47Sounds[ ][ ] = {

"weapons/ak47-1.wav",
"weapons/ak47-2.wav",
"weapons/ak47_boltpull.wav",
"weapons/ak47_clipin.wav",
"weapons/ak47_clipout.wav"
};


Pasul 4: Acum enumeram sunetele pe care vrem sa le inlocuim:

new const GoldAK47_SoundList[ ][ ] = {

"newAK/GoldAk47-1.wav",
"newAK/GoldAk47-2.wav",
"newAK/GoldAk47_boltpull.wav",
"newAK/GoldAk47_clipin.wav",
"newAK/GoldAk47_clipout.wav"
};


Pasul 5: La plugin_init adaugam un forward:

register_forward( FM_EmitSound, "fw_EmitSounds" );


Pasul 6: Pentru ca vom folosi sunete, le vom adauga la plugin_prechace pentru a rula corespunzator:

public plugin_precache( ) {

static i;
for( i = 0; i <= charsmax( GoldAK47_SoundList ); i++ )
precache_sound( GoldAK47_SoundList[ i ] );
}


Pasul 7: Acum creem publicul cu constantele:

public fw_EmitSounds( const id, const channel, const sample[ ] ) {


Pasul 8: Apoi:

if( is_user_alive( id ) ) { // Verificam daca user-ul este in viata:

if( bUserHasAk47[ id ] ) { // "Aducem" variabila globala, in acest moment, adevarata

for( new i = 0; i < sizeof GoldAK47_SoundList; i++ ) { // Stocarea sunetelor

if( equal( sample, OriginalAK47Sounds[ i ] ) ) { // Sunetele originale "sunt chemate"...

emit_sound( id, channel, GoldAK47_SoundList[ i ], 1.0, ATTN_NORM, 0, PITCH_NORM ); // Aici le inlocuim cu cele pe care le vrem noi
return FMRES_SUPERCEDE;
}
}
}
}

return FMRES_IGNORED;
}


Pasul 9: In final iese:

#include < amxmodx >
#include < fakemeta >

#pragma semicolon 1

#define PLUGIN "[TuT] Change Sounds"
#define VERSION "0.1"

new const GoldAK47_SoundList[ ][ ] = {

"newAK/GoldAk47-1.wav",
"newAK/GoldAk47-2.wav",
"newAK/GoldAk47_boltpull.wav",
"newAK/GoldAk47_clipin.wav",
"newAK/GoldAk47_clipout.wav"
};

new const OriginalAK47Sounds[ ][ ] = {

"weapons/ak47-1.wav",
"weapons/ak47-2.wav",
"weapons/ak47_boltpull.wav",
"weapons/ak47_clipin.wav",
"weapons/ak47_clipout.wav"
};

new bool:bUserHasAk47[ 33 ];

public plugin_init( ) {

register_plugin( PLUGIN, VERSION, "YONTU" );

register_forward( FM_EmitSound, "fw_EmitSounds" );

}

public plugin_precache( ) {

static i;
for( i = 0; i <= charsmax( GoldAK47_SoundList ); i++ )
precache_sound( GoldAK47_SoundList[ i ] );
}

public client_putinserver( id ) {

bUserHasAk47[ id ] = false;
}

public client_disconnect( id ) {

bUserHasAk47[ id ] = false;
}

public fw_EmitSounds( const id, const channel, const sample[ ] ) {

if( is_user_alive( id ) ) {

if( bUserHasAk47[ id ] ) {

for( new i = 0; i < sizeof GoldAK47_SoundList; i++ ) {

if( equal( sample, OriginalAK47Sounds[ i ] ) ) {

emit_sound( id, channel, GoldAK47_SoundList[ i ], 1.0, ATTN_NORM, 0, PITCH_NORM );
return FMRES_SUPERCEDE;
}
}
}
}

return FMRES_IGNORED;
}
Cs Forum
Vezi profilul utilizatorului Expediaza mesaj privat
WwW.PlacePuB.Ro
WwW.PlacePuB.Ro
placepub




Mesaj

2014-09-16    cstrike




Cs Forum
Afiseaza mesajele despre Counter-Strike pentru a le previzualiza:    
Creaza un subiect nou   Raspunde la subiect    Counter Strike Forum - Tutoriale Counter-Strike 1.6 download -> Tutoriale Counter-Strike 1.6 cstrike Ora este GMT + 2 ore
Du-te la pagina despre counter-strike
Pagina 1 din 0

 
Mergi direct la pagina de counter-strike 1.6:  
Nu puteti crea un subiect nou In acest forum despre counter-strike
Nu puteti raspunde In subiectele acestui forum despre counter-strike
Nu puteti modifica mesajele proprii din acest forum despre counter-strike
Nu puteti sterge mesajele proprii din acest forum despre counter-strike
Nu puteti vota In chestionarele din acest forum despre counter-strike

Privacy Policy | Politica de Confidentialitate



 Safe Site

By Bogdan Maxim. Published in the Counter-strike 1.6 Download category