redemax_5611
Пользователь
- Регистрация
- 1 Сен 2017
- Сообщения
- 27
- Симпатии
- 2
- Пол
- Мужской
Проблема такая закупаются бесконечные патроны на ZM как исправить?
Подключил модуль ReApi
С этим кодом плагин не компилируется
// Get user weapons
static weapons[32]
new num, i, currentammo, weaponid, refilled = false
get_user_weapons(id, weapons, num)
// Loop through them and give the right ammo type
for (i = 0; i < num; i++)
{
// Prevents re-indexing the array
weaponid = weapons
// Primary and secondary only
if (MAXBPAMMO[weaponid] > 2)
{
// Get current ammo of the weapon
currentammo = cs_get_user_bpammo(id, weaponid)
// Give additional ammo
ExecuteHamB(Ham_GiveAmmo, id, BUYAMMO[weaponid], AMMOTYPE[weaponid], MAXBPAMMO[weaponid])
// Check whether we actually refilled the weapon's ammo
if (cs_get_user_bpammo(id, weaponid) - currentammo > 0) refilled = true
}
}
А вот с этим все нормально компилируется но закупаются бесконечные патроны
// Get user weapons
static weapons[32]
new num, i, weaponid, refilled = false
get_user_weapons(id, weapons, num)
// Loop through them and give the right ammo type
for (i = 0; i < num; i++)
{
// Prevents re-indexing the array
weaponid = weapons
// Primary and secondary only
if (MAXBPAMMO[weaponid] > 2)
{
// Get current ammo of the weapon
cs_get_user_bpammo(id, weaponid)
// Give additional ammo
ExecuteHamB(Ham_GiveAmmo, id, BUYAMMO[weaponid], AMMOTYPE[weaponid], MAXBPAMMO[weaponid])
// Check whether we actually refilled the weapon's ammo
if (cs_get_user_bpammo(id, weaponid)) refilled = true
}
}
Как исправить проблему?
Подключил модуль ReApi
С этим кодом плагин не компилируется
// Get user weapons
static weapons[32]
new num, i, currentammo, weaponid, refilled = false
get_user_weapons(id, weapons, num)
// Loop through them and give the right ammo type
for (i = 0; i < num; i++)
{
// Prevents re-indexing the array
weaponid = weapons
// Primary and secondary only
if (MAXBPAMMO[weaponid] > 2)
{
// Get current ammo of the weapon
currentammo = cs_get_user_bpammo(id, weaponid)
// Give additional ammo
ExecuteHamB(Ham_GiveAmmo, id, BUYAMMO[weaponid], AMMOTYPE[weaponid], MAXBPAMMO[weaponid])
// Check whether we actually refilled the weapon's ammo
if (cs_get_user_bpammo(id, weaponid) - currentammo > 0) refilled = true
}
}
А вот с этим все нормально компилируется но закупаются бесконечные патроны
// Get user weapons
static weapons[32]
new num, i, weaponid, refilled = false
get_user_weapons(id, weapons, num)
// Loop through them and give the right ammo type
for (i = 0; i < num; i++)
{
// Prevents re-indexing the array
weaponid = weapons
// Primary and secondary only
if (MAXBPAMMO[weaponid] > 2)
{
// Get current ammo of the weapon
cs_get_user_bpammo(id, weaponid)
// Give additional ammo
ExecuteHamB(Ham_GiveAmmo, id, BUYAMMO[weaponid], AMMOTYPE[weaponid], MAXBPAMMO[weaponid])
// Check whether we actually refilled the weapon's ammo
if (cs_get_user_bpammo(id, weaponid)) refilled = true
}
}
Как исправить проблему?