Some reason i get an error on the line that is bolded
(code from that unlimited ammo from mini-midget.)
PHP Code:
#define SLOT_SECONDARY 2
PHP Code:
stock g_WeaponSlots[] = {
0,
2, //CSW_P228
0,
2, //CSW_ELITE
2, //CSW_FIVESEVEN
2, //CSW_USP
2, //CSW_GLOCK18
2, //CSW_DEAGLE
}
stock g_MaxBPAmmo[] = {
0,
52, //CSW_P228
0,
120, //CSW_ELITE
100, //CSW_FIVESEVEN
100, //CSW_USP
120, //CSW_GLOCK18
35, //CSW_DEAGLE
}
PHP Code:
public event_weapon(id)
{
new wp = read_data(2)
if (g_WeaponSlots[wp] == SLOT_SECONDARY) //Run time error 4 here... no idea why it does that...
{
new ammo = cs_get_user_bpammo(id, wp)
if (ammo < g_MaxBPAmmo[wp])
{
cs_set_user_bpammo(id, wp, g_MaxBPAmmo[wp])
}
}
}
edit:
I added in the whole plugin and it worked fine but when i strip out the whole primary nade and c4 part i get errors any idea why