08/05/2016, 01:54 PM
08/05/2016, 03:13 PM
(08/05/2016, 01:54 PM)argevaule82 escribió: [ -> ]hola quiero ejecutar un sonido en un plugin, como por ejemplo, cuando lo maten con cuchillo ejecute un sonido si me podrian ayudar porfavor
Código PHP:
#include <amxmodx>
new const SONIDO_WAV[] = { "mi_sonidos/mi_sonido.wav" }
public plugin_init() {
register_plugin("Kill Knife/Sound", "1.0", "mlibre")
}
public plugin_precache() precache_sound(SONIDO_WAV)
public client_death(attacker, victim, weapon) {
if(!is_user_connected(attacker) || victim == attacker) return
if(weapon == CSW_KNIFE) client_cmd(attacker, "spk %s", SONIDO_WAV)
}