|
Author
|
Message
|
|
Senior Member
|

08-17-2014
, 04:54
Re: Non player is out of range?
|
#1
|
Quote:
Originally Posted by colossus
PHP Code:
public eDeath()
{
new iKiller = read_data(1);
new iVictim = read_data(2);
new szKillMSG[50];
new weapon_id = fm_find_ent_by_owner(-1, weapon_weapon, iKiller);
if(!is_valid_ent(weaponid))
return PLUGIN_CONTINUE
new ammo = cs_get_weapon_ammo(weapon_id)
if(IsPlayer(iKiller) && is_user_alive(iKiller) && Tonly[iKiller])
{
if( iVictim != iKiller)
{
if(ammo)
{
formatex(szKillMSG, charsmax(szKillMSG), "P");
cs_set_weapon_ammo(weapon_id, 1);
}
else
formatex(szKillMSG, charsmax(szKillMSG), "K");
set_hudmessage(0, 255, 0, -1.0, 0.4, 0, 6.0, 2.5, 0.0, 0.0, -1);
show_hudmessage(iKiller, szKillMSG)
}
}
return PLUGIN_CONTINUE
}
TEST
|
Now you don't get +1 bullet if u kill someone
|
|
|
|