View Full Version : Killing sound !
Hi i need plugin killing sound if player killing other player sound is play not public just killer can be Listening ! i found this https://forums.alliedmods.net/showthread.php?t=66006 (http://forums.alliedmods.net/showthread.php?t=66006)
but on this if player kill its public and other player can be Listening !
look to this video http://www.youtube.com/watch?v=JzTE9OjHUXE
if can pleas use this sound !
On ultimate_sounds.sma ->
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);
ShowSyncHudMsg(0, gmsgHudSync, stkmessages[level], name);
}
if (streak&2){
for(new i=1;i<=get_maxplayers();i++)
if(is_user_connected(i)==1 )
client_cmd(i, "spk %s", stksounds[level]);
}
}
->
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);
ShowSyncHudMsg(killer, gmsgHudSync, stkmessages[level], name);
}
if (streak&2)
{
client_cmd(killer, "spk %s", stksounds[level]);
}
}
i need just 1 kill so how ? and dont need hud massage !
One kill? Like the video? Something like that?
#include <amxmodx>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg","DeathMessage","a")
}
public DeathMessage()
{
new iKiller = read_data(1)
new iVictim = read_data(2)
if((iKiller != iVictim) || (get_user_team(iKiller) != get_user_team(iVictim)))
{
client_cmd(iKiller,"spk buttons/bell1")
}
}
yes 1 kill sound and yes like video !
work %100 Thanks somach !
If you want the feature that says "You're dominating X" :
#include <amxmodx>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new const sound_humiliation[] = "sound/humiliation.wav"
const TASK_SOUND = 20120131
new szHumiliation[33][33]
new szVictimName[32]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg","DeathMessage","a")
}
public plugin_precache()
{
precache_sound(sound_humiliation)
}
public DeathMessage()
{
new iKiller = read_data(1)
new iVictim = read_data(2)
if((iKiller != iVictim) || (get_user_team(iKiller) != get_user_team(iVictim)))
{
szHumiliation[iKiller][iVictim]++
if(szHumiliation[iVictim][iKiller] > 0)
szHumiliation[iVictim][iKiller] = 0
client_cmd(iKiller,"spk buttons/bell1")
if(szHumiliation[iKiller][iVictim] >= 3)
{
get_user_name(iVictim,szVictimName,charsmax(s zVictimName))
set_task(2.0,"SoundHumiliation",iKiller+TASK_SOUND)
}
}
}
public SoundHumiliation(index)
{
new id = index - TASK_SOUND
client_cmd(id,"spk ^"%s^"",sound_humiliation)
client_print(id,print_chat,"You're now dominating %s",szVictimName)
}
Here:
new const sound_humiliation[] = "sound/humiliation.wav"
Thats your custom sound, install what sound you want to be listen when you're dominating someone.
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.