I use this:
PHP Code:
update_ammo(id)
{
if (!is_user_alive(id)) return;
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("CurWeapon"), _, id)
write_byte(1)
write_byte(CSW_YOURWEAPON)
write_byte(-1)
message_end()
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("AmmoX"), _, id)
write_byte(6)
write_byte(1) // ammo
message_end()
}