Raised This Month: $ Target: $400
 0% 

[HNS XP Mod] Help Adding Deagle and Awp Chance


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Capell
Member
Join Date: Feb 2009
Old 06-27-2010 , 07:16   [HNS XP Mod] Help Adding Deagle and Awp Chance
Reply With Quote #1

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
Code:
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.
Code:
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.
Code:
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.
Capell is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 06-27-2010 , 11:33   Re: [HNS XP Mod] Help Adding Deagle and Awp Chance
Reply With Quote #2

Code:
#define WEAPON_AMT 2 new const g_weapons[WEAPON_AMT][] = {     "weapon_awp",     "weapon_deagle" } new const g_ammo[WEAPON_AMT] = {     1, // awp     1 // deagle } // Usage // Let's say he chose the deagle from a menu and choice holds the value 1. cs_set_weapon_ammo( give_item( id, g_weapons[choice] ), g_ammo[choice] ) // He now has a deagle with 1 bullet.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Old 06-27-2010, 15:36
Capell
This message has been deleted by Capell.
Old 06-29-2010, 10:07
Capell
This message has been deleted by Capell.
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode