Quote:
Originally Posted by yokomo
But in your code it only cap BP ammo at 254. Any idea how to get the true value that > 254?
|
You tested it ?
If you have tested and that it doesn't work, replace :
PHP Code:
public Event_AmmoX(id)
{
g_iBpAmmo[id][read_data(1)] = read_data(2)
}
with
PHP Code:
new const m_rgAmmo_CBasePlayer[15] = {376,377,...}
public Event_AmmoX(id)
{
new iAmmoIndex = read_data(1)
g_iBpAmmo[id][iAmmoIndex] = get_pdata_int(id, m_rgAmmo_CBasePlayer[iAmmoIndex])
}
You can do the same here :
PHP Code:
public Event_Health(id)
{
g_iHealth[id] = read_data(1)
}
to
PHP Code:
public Event_Health(id)
{
g_iHealth[id] = get_user_health(id)
}
I'm pretty sure that for Health event, passed value is real health value and not mask, should be the same for AmmoX.
__________________