[Ayuda] Música Cuando Muere
#1
Hola Gente xD
Le vengo a molestar we como siempre. xD
Quiero poner 1 música cuando muere pero que el nada mas lo escuche si me pueden ayudar por favor desde ya le voy dando muchas gracias xD
Responder
#2
Mp3
Código PHP:
new const szKillSoundMp3[] = "sound/mi_sonido.mp3"

public plugin_precache()
{
     
precache_sound(szKillSoundMp3)
}

client_cmd(id"mp3 play ^"%s^""szKillSoundMp3

Wav
Código PHP:
// La carpeta "mi_carpeta" debe ir en la carpeta "sound"
new const szKillSoundWav[] = "mi_carpeta/mi_sonido.wav"

public plugin_precache()
{
     
precache_sound(szKillSoundWav)
}

client_cmd(id"spk ^"%s^""szKillSoundWav

Reproducirlo al morir
Código PHP:
public plugin_init()
{
     
register_event("DeathMsg""DeathMsgEvent""a")
}

public 
DeathMsgEvent()
{
     
// Reproducir sonido
     // Por ejemplo...
     
new iVictima read_data(2)
     
client_cmd(iVictima"spk ^"%s^""szKillSoundWav)


Ni te molestes en enviarme un mensaje privado para pedirme ayuda porque NO lo voy a contestar.
Gracias por su atención.
Responder
#3
Código PHP:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

// La carpeta "mi_carpeta" debe ir en la carpeta "sound"
new const szKillSoundWav[] = "mi_carpeta/mi_sonido.wav"

public plugin_precache()
{
     
precache_sound(szKillSoundWav)
}

client_cmd(id"spk ^"%s^""szKillSoundWav

public 
plugin_init()
{
     
register_event("DeathMsg""DeathMsgEvent""a")
}

public 
DeathMsgEvent()
{
     
// Reproducir sonido
     // Por ejemplo...
     
new iVictima read_data(2)
     
client_cmd(iVictima"spk ^"%s^""szKillSoundWav)

¨
así?
la verdad que o sé mucho de scripting mm me tira error :c
Código PHP:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Error
Symbol already defined"client_cmd" on line 16

1 Error
.
Could not locate output file C:\Users\Alumno\Desktop\musica.amx (compile failed). 
Responder
#4
borra el client_cmd que esta abajo del plugin precache
Responder
#5
(10/01/2014, 03:44 AM)[Anti] escribió: borra el client_cmd que esta abajo del plugin precache

Mira borre client_cmd y me tiran error

Código PHP:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Error
Invalid function or declaration on line 16

1 Error
.
Could not locate output file C:\Users\Alumno\Desktop\musica.amx (compile failed). 
Responder
#6
Código PHP:
#include <amxmodx>
#include <amxmisc>

// La carpeta "mi_carpeta" debe ir en la carpeta "sound"
new const szKillSoundWav[] = "mi_carpeta/mi_sonido.wav"

public plugin_precache() precache_sound(szKillSoundWav)

public 
plugin_init() register_event("DeathMsg""DeathMsgEvent""a")

public 
DeathMsgEvent()
{
     
// Reproducir sonido
     // Por ejemplo...
     
new iVictima read_data(2)
     
client_cmd(iVictima"spk ^"%s^""szKillSoundWav)

Responder
#7
(10/01/2014, 06:39 AM)Frosst escribió:
Código PHP:
#include <amxmodx>
#include <amxmisc>

// La carpeta "mi_carpeta" debe ir en la carpeta "sound"
new const szKillSoundWav[] = "mi_carpeta/mi_sonido.wav"

public plugin_precache() precache_sound(szKillSoundWav)

public 
plugin_init() register_event("DeathMsg""DeathMsgEvent""a")

public 
DeathMsgEvent()
{
     
// Reproducir sonido
     // Por ejemplo...
     
new iVictima read_data(2)
     
client_cmd(iVictima"spk ^"%s^""szKillSoundWav)


Muchas Gracias Cierren si quieren el tema ya esta Gran sonrisa
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)