Quote:
Originally Posted by PeterVicent
Thanks for reply!
This plugin show me the steamid from player dead?
|
removed.
added nick support :
PHP Code:
#include <amxmodx>
// Put players steamid here
new g_steamid[][]=
{
"STEAM_0:0:261810342"
}
// Put players name here
new g_name[][]=
{
"LearninG"
}
// Your sound (will be played randomly)
new g_sounds[][] =
{
"sound.wav",
"sound2.wav",
"sound3.wav",
"sound4.wav",
"sound5.wav"
}
public plugin_precache()
{
for (new i; i<sizeof(g_sounds); i++)
precache_sound(g_sounds[i])
}
public plugin_init()
{
register_plugin( "Quake sound + Steamid", "0.01", "LearninG" )
register_event("DeathMsg", "Player_Die", "a", "2>0")
}
public Player_Die(iVictim)
{
static iVictim , szAuthid[32] , szName[32]
iVictim = read_data(2)
get_user_authid(iVictim , szAuthid , charsmax(szAuthid))
get_user_name(iVictim , szName , charsmax(szName))
for (new i; i<sizeof(g_steamid) && i<sizeof(g_name); i++)
if (equali(szAuthid , g_steamid[i]))
{
emit_sound(iVictim, CHAN_AUTO, g_sounds[random(sizeof(g_sounds))], 1.0, ATTN_NORM, 0, PITCH_NORM)
}
else if (equali(szName , g_name[i]))
{
emit_sound(iVictim, CHAN_AUTO, g_sounds[random(sizeof(g_sounds))], 1.0, ATTN_NORM, 0, PITCH_NORM)
}
}