guys i have this sma and can't fix the error on it .. hope one help me to fix it
PHP Code:
#include <amxmodx>
#include <zombieplague>
#include <hamsandwich>
#include <levels>
//#include <cromchat>
#define PLUGIN "[ZE] Nemesis sound kill"
#define VERSION "1.0"
#define AUTHOR "NaDa"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Killed, "player", "HamHook_Killed")
}
public plugin_precache()
{
precache_sound("ze_royalz/die_bitch.wav")
precache_sound("ze_royalz/ohgod.wav")
precache_sound("ze_royalz/cantbelieve.wav")
return 0;
}
public Ham_CBasePlayer_Killed_Post(victim, attacker, shouldgib)
{
!!! Removed Phi
if (attacker != victim && !is_user_connected(attacker))
{
return 0;
}
if (!zp_get_user_zombie(attacker))
{
if (zp_get_zombie_count() < 1 && !zp_get_user_nemesis(victim))
{
client_cmd(0, "spk \"%s\"", "die_nemesis/ohgod.wav");
}
else
{
if (zp_get_user_nemesis(victim))
{
client_cmd(0, "spk \"%s\"", "die_nemesis/die_bitch.wav");
new SzVName[32];
new SzAName[32];
get_user_name(attacker, SzAName, 31);
get_user_name(victim, SzVName, 31);
client_print_color(0, "!g[RoZ] !yPlayer !t%s !yKilled Nemesis !t%s !yHe GoT !g%d !yEXP", SzAName, SzVName, 150);
set_user_xp(attacker, get_user_xp(attacker) + 150);
}
}
}
else
{
if (1 > zp_get_human_count())
{
client_cmd(0, "spk \"%s\"", "die_nemesis/cantbelieve.wav");
}
}
return 0;
}
zp_colored_print(target, const message[], any:...)
{
static buffer[512], i, argscount
argscount = numargs()
// Send to everyone
if (!target)
{
static player
for (player = 1; player <= g_maxplayers; player++)
{
// Not connected
if (!g_isconnected[player])
continue;
// Remember changed arguments
static changed[5], changedcount // [5] = max LANG_PLAYER occurencies
changedcount = 0
// Replace LANG_PLAYER with player id
for (i = 2; i < argscount; i++)
{
if (getarg(i) == LANG_PLAYER)
{
setarg(i, 0, player)
changed[changedcount] = i
changedcount++
}
}
// Format message for player
vformat(buffer, charsmax(buffer), message, 3)
// Send it
message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
write_byte(player)
write_string(buffer)
message_end()
// Replace back player id's with LANG_PLAYER
for (i = 0; i < changedcount; i++)
setarg(changed[i], 0, LANG_PLAYER)
}
}
// Send to specific target
else
{
/*
// Not needed since you should set the ML argument
// to the player's id for a targeted print message
// Replace LANG_PLAYER with player id
for (i = 2; i < argscount; i++)
{
if (getarg(i) == LANG_PLAYER)
setarg(i, 0, target)
}
*/
// Format message for player
vformat(buffer, charsmax(buffer), message, 3)
// Send it
message_begin(MSG_ONE, g_msgSayText, _, target)
write_byte(target)
write_string(buffer)
message_end()
}
}