Raised This Month: $12 Target: $400
 3% 

Weapons War v7.5 (26 Weapons)


Post New Thread Reply   
 
Thread Tools Display Modes
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-01-2018 , 07:47   Re: Weapons War v7.5 (26 Weapons)
Reply With Quote #291

Working Perfect , Thanks ZMD
instinctpt1 is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-02-2018 , 07:00   Re: Weapons War v7.5 (26 Weapons)
Reply With Quote #292

@zmd94 Plugin is now Working Fine in all Conditions and there are no Bugs
But if users want to Reduce the size of WEAPONSDATA , i mean want to reduce no. of weapons from here , they can't simply do that as WEAPONSDATA if further used in whole source
I Changed size of indexes everywhere in code acc to my need But Plugin got Bugged :/
And hopefully i guess only you can help now

Q : Where Plugin get Bugged ?
A : On Weapon_Deploy i guess coz everything except this is working fine , just WEAPON_DEPLOY code to malfunction 1st attack and sec. attack is not working ( Which i probably guess is bcoz of my wrong Indexing i guess ) Can you help from here ?

Last edited by instinctpt1; 02-02-2018 at 07:00. Reason: formating
instinctpt1 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-03-2018 , 20:42   Re: Weapons War v7.5 (26 Weapons)
Reply With Quote #293

I'm glad all is working fine.

By the way, as you have modified the code, just find the code below from you modified code and change it:

HTML Code:
	new szItem[64]
	for(new i; i < sizeof(WeaponsData); i++)
	{
		RegisterHam(Ham_Item_Deploy, WeaponsData[i][WeaponID], "cs_war_WeaponsDeploy", true)
		
		formatex(szItem, charsmax(szItem), "\y%s", WeaponsData[i], WeaponsData[i][WeaponName])
		menu_additem(g_WarMenu, szItem)
	}
-->
HTML Code:
	new szItem[64]
	for(new i; i < sizeof(WeaponsData); i++)
	{
		RegisterHam(Ham_Item_Deploy, WeaponsData[i][WeaponID], "cs_war_WeaponsDeploy", true)
		
		formatex(szItem, charsmax(szItem), "\y%s", WeaponsData[i][WeaponName])
		menu_additem(g_WarMenu, szItem)
	}

Last edited by zmd94; 02-03-2018 at 20:50.
zmd94 is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-04-2018 , 03:43   Re: Weapons War v7.5 (26 Weapons)
Reply With Quote #294

No Success :/
Still same
instinctpt1 is offline
WhiteFang1319
Senior Member
Join Date: Jan 2017
Old 02-04-2018 , 05:22   Re: Weapons War v7.5 (26 Weapons)
Reply With Quote #295

Hi. I've been using this plugin so far it works good except one thing:
Players don't get respawned a lot of times. Some do and some don't.
WhiteFang1319 is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-04-2018 , 06:54   Re: Weapons War v7.5 (26 Weapons)
Reply With Quote #296

Quote:
Originally Posted by WhiteFang1319 View Post
Hi. I've been using this plugin so far it works good except one thing:
Players don't get respawned a lot of times. Some do and some don't.
Respawning works fine bud No issues in respawning i guess , i used it too
Whats you Amxx build ?
instinctpt1 is offline
WhiteFang1319
Senior Member
Join Date: Jan 2017
Old 02-04-2018 , 10:46   Re: Weapons War v7.5 (26 Weapons)
Reply With Quote #297

Quote:
Originally Posted by instinctpt1 View Post
Respawning works fine bud No issues in respawning i guess , i used it too
Whats you Amxx build ?
The latest version: Dev 5151
I use it on server when there are lots of players. If there are less it doesn't happen
WhiteFang1319 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-05-2018 , 10:24   Re: Weapons War v7.5 (26 Weapons)
Reply With Quote #298

White Fang, do you get any errors?

Instinctpt1, please show code for below part:
Code:
// Weapon IDs for ammo types
zmd94 is offline
WhiteFang1319
Senior Member
Join Date: Jan 2017
Old 02-05-2018 , 11:02   Re: Weapons War v7.5 (26 Weapons)
Reply With Quote #299

Quote:
Originally Posted by zmd94 View Post
White Fang, do you get any errors?


Code:
// Weapon IDs for ammo types
Nope. No errors in logs and no errors at server startup
WhiteFang1319 is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-05-2018 , 23:04   Re: Weapons War v7.5 (26 Weapons)
Reply With Quote #300

Hey @zmd This is , whats in my source
HTML Code:
// Weapon IDs for ammo types
new const WEAPONID[] = {0, CSW_AWP, CSW_SCOUT, CSW_M249, CSW_AUG, CSW_XM1014, CSW_MAC10, CSW_FIVESEVEN, CSW_DEAGLE,
	CSW_P228, CSW_ELITE, CSW_FLASHBANG, CSW_HEGRENADE, CSW_SMOKEGRENADE, CSW_C4}

// Ammo type names for weapons
new const AMMOTYPE[][] = {"", "357sig", "", "762nato", "", "buckshot", "", "45acp", "556nato", "", "9mm", "57mm", "45acp",
	"556nato", "556nato", "556nato", "45acp", "9mm", "338magnum", "9mm", "556natobox", "buckshot",
	"556nato", "9mm", "762nato", "", "50ae", "556nato", "762nato", "", "57mm" }

// Max BP ammo for weapons
new const MAXBPAMMO[] = {-1, 52, -1, 90, 1, 32, 1, 100, 90, 1, 120, 100, 100, 90, 90, 90, 100, 120,
	30, 120, 200, 32, 90, 120, 90, 2, 35, 90, 90, -1, 100}

new const WeaponsData[][WEAPONSWAR] =
{
	{ "9x19mm Side-arm", "weapon_glock18", CSW_GLOCK18}, 
	{ "KM.45 Tactical", "weapon_usp", CSW_USP}, 
	{ "Deagle", "weapon_deagle", CSW_DEAGLE}, 
	{ "Dual Elites", "weapon_elite", CSW_ELITE}, 
	{ "12 Gauge", "weapon_m3", CSW_M3}, 
	{ "Auto-Shotgun", "weapon_xm1014", CSW_XM1014},
	{ "Pichkari", "weapon_tmp", CSW_TMP},
	{ "P90", "weapon_p90", CSW_P90},
	{ "Scout", "weapon_scout", CSW_SCOUT},
	{ "AWP", "weapon_awp", CSW_AWP},
	{ "Gay GuN", "weapon_g3sg1", CSW_G3SG1},
	{ "Machine-gun", "weapon_m249", CSW_M249},
	{ "Chakku", "weapon_knife", CSW_KNIFE},
	{ "Unlimited Nades", "weapon_hegrenade", CSW_HEGRENADE}
}
And this is my Weapon Deploy
HTML Code:
new szItem[64]
	for(new i; i < sizeof(WeaponsData); i++)
	{
		RegisterHam(Ham_Item_Deploy, WeaponsData[i][WeaponID], "cs_war_WeaponsDeploy", true)
		
		formatex(szItem, charsmax(szItem), "\y%s", WeaponsData[i][WeaponName])
		menu_additem(g_WarMenu, szItem)
	}
HTML Code:
public cs_war_WeaponsDeploy(iWeapon)
{
	if(pev_valid(iWeapon) == 2)
	{
		if(g_bInWar)
		{
			if(get_pcvar_num(g_iWeaponDrop))
			{
				new iId = get_pdata_int(iWeapon, m_iId, XO_WEAPONS)
				if(iId != g_WeaponIndex)
				{
					set_pdata_float(iWeapon, m_flNextPrimaryAttack, 99999.0, XO_WEAPONS)
					set_pdata_float(iWeapon, m_flNextSecondaryAttack, 99999.0, XO_WEAPONS)
				}
			}
		}
		else if(g_bLastRoundIsWar)
		{
			set_pdata_float(iWeapon, m_flNextPrimaryAttack, 0.0, XO_WEAPONS)
			set_pdata_float(iWeapon, m_flNextSecondaryAttack, 0.0, XO_WEAPONS)
		}
	}
}
Please Check and Help in here brother
instinctpt1 is offline
Reply


Thread Tools
Display Modes

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 06:41.


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