Quote:
Originally Posted by baneado
on the mobile..
PHP Code:
public eDeath()
{
new iKiller = read_data(1);
new iVictim = read_data(2);
if (IsPlayer(Killer) && iVictim != iKiller && Tonly[iKiller])
{
new weapon_id = find_ent_by_owner(-1, "weapon_*", iKiller);
if (!weapon_id) return;
new szKillMSG[3];
switch (cs_get_weapon_ammo(weapon_id))
{
case 0: {
//formatex....
cs_set_weapon_ammo(weapon_id, 1);
}
case 1: {
//formatex...
}
default: return;
}
//hudmessage
}
}
|
as longes i know, weapon entity is in client side and the entity index can not find that way.
Also you don't need entity id, you need weapon id.