Capell
06-27-2010, 07:16
Hey guys. I'm trying to add Deagle and Awp to HNS XP Mod by Exolent.
When you "win" a weapon it gives you 10 bullets(for awp) and 7 bullets(for deagle).
Code looks like this
new const g_weapons_classnames[Weapons][] =
{
"weapon_awp",
"weapon_deagle"
};
I tried making it this so you only get 1 bullet instead of 10 or 7 depending on the weapon.
new const g_weapons_classnames[Weapons][](client) =
{
cs_set_weapon_ammo( give_item(client, "weapon_awp"), 1);
cs_set_weapon_ammo( give_item(client, "weapon_deagle"), 1);
};
But then I get these errors when compiling.
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
D:\Users\Capell\Desktop\hns_xp.sma(142) : error 009: invalid array size (negative or zero)
D:\Users\Capell\Desktop\hns_xp.sma(146) : error 010: invalid function or declaration
2 Errors.
Could not locate output file D:\Users\Capell\Desktop\hns_xp.amx (compile failed).
Compilation Time: 0.62 sec
Anyone know how I can fix?^^ Please.
When you "win" a weapon it gives you 10 bullets(for awp) and 7 bullets(for deagle).
Code looks like this
new const g_weapons_classnames[Weapons][] =
{
"weapon_awp",
"weapon_deagle"
};
I tried making it this so you only get 1 bullet instead of 10 or 7 depending on the weapon.
new const g_weapons_classnames[Weapons][](client) =
{
cs_set_weapon_ammo( give_item(client, "weapon_awp"), 1);
cs_set_weapon_ammo( give_item(client, "weapon_deagle"), 1);
};
But then I get these errors when compiling.
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
D:\Users\Capell\Desktop\hns_xp.sma(142) : error 009: invalid array size (negative or zero)
D:\Users\Capell\Desktop\hns_xp.sma(146) : error 010: invalid function or declaration
2 Errors.
Could not locate output file D:\Users\Capell\Desktop\hns_xp.amx (compile failed).
Compilation Time: 0.62 sec
Anyone know how I can fix?^^ Please.