Szukam pluginu że jak wbije jakiś gracz to jest odgrywany jakiś dźwięk np: Siema eniu
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Plugin Przywitanie
Temat rozp. batista, 12.05.2011 18:23
1 odpowiedź w tym temacie
#1
Napisano 12.05.2011 18:23
#2
Napisano 12.05.2011 18:52
Spróbuj:
/*
* Plays a welcome sound to the player who connects
*
* by White Panther
*
* v1.0
*
* v1.1:
* - addition to add easily own sounds
*
* v1.2.1:
* - bug with not playing sounds to client fixed
* - added file exist check for soundfile
*
* v1.2.3:
* - changes:
* - way of giving id to timer
*/
#include <amxmodx>
// change this number to the amount of sounds u have
#define Maxsounds 2
// add here your sounds, sounds must be somewhere in <ModDir>/sounds
// format must be like: {"misc/sound1","ambience/sound2"}
new soundlist[Maxsounds][] = {"misc/dziendobry", "misc/dziendobry"}
new plugin_author[] = "White Panther"
new plugin_version[] = "1.2.3"
public plugin_init(){
register_plugin("Connect Sound",plugin_version,plugin_author)
register_cvar("connectsound_version",plugin_version,FCVAR_SERVER)
}
public plugin_precache(){
for ( new a = 0; a < Maxsounds; a++ ){
new temp[128]
format(temp,127,"sound/%s.wav", soundlist[a])
if ( file_exists(temp) ){
new soundfile[128]
format(soundfile,127,"%s.wav", soundlist[a])
precache_sound( soundfile )
}
}
}
public client_putinserver(id){
set_task(1.0,"consound",100+id)
}
public consound(timerid_id){
new id = timerid_id - 100
new Usertime
Usertime = get_user_time(id, 0)
if ( Usertime <= 0 ){
set_task(1.0,"consound",timerid_id)
}else{
new i = random(Maxsounds)
client_cmd(0,"spk ^"%s^"",soundlist[i])
}
return PLUGIN_CONTINUE
}
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych