Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 93 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Question about attachments
bazukist
General Member
Since: Jan 20, 2010
Posts: 32
Last: May 1, 2011
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Friday, Jul. 16, 2010 11:46 am
My question is how to do something like GL or Grip, so it blocks 1st perk.?
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Friday, Jul. 16, 2010 11:53 am
You would need to explain more as what you've said doesnt make much sense.
Share |
bazukist
General Member
Since: Jan 20, 2010
Posts: 32
Last: May 1, 2011
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Friday, Jul. 16, 2010 12:01 pm
I want to make one attachment disables perk 1, and thas it, how to change it
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Friday, Jul. 16, 2010 12:53 pm
The GL or Grip attachments already disable perk 1 so I dont get what you are asking for.
Share |
bazukist
General Member
Since: Jan 20, 2010
Posts: 32
Last: May 1, 2011
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Friday, Jul. 16, 2010 03:31 pm
so what if i want to make red dot disable perk 1, HOW THE F**** SHOULD I EDIT THE CAC_SOMETHING
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Friday, Jul. 16, 2010 04:53 pm
There is no point thinking about disabling perk 1 in cac.inc as you cannot compile all 5 of the cac_ menus. You will get the exceeding 328 menu defs error. But you do it at the spawn player. So, in maps\mp\gametypes\_class::cac_getdata():

Code:
		if ( primary_attachment_ref == "grip" || primary_attachment_ref == "gl" || || primary_attachment_ref == "reflex" || secondary_attachment_ref == "grip" || secondary_attachment_ref == "gl" || secondary_attachment_ref == "reflex")
		{
			if ( specialty1 != 190 && specialty1 != 191 && specialty1 != 192 && specialty1 != 193 )
			{
				println( "^1Warning: (" + self.name + ") grip or grenade launcher is used but perk 1 was index " + specialty1 + ". Setting perk 1 to none." );
				specialty1 = 193; // 193 = there's an attachment, so no perk
			}
		}


If you want it so that perk 1 is disabled if any attachment is used:

Code:
		if ( primary_attachment_ref != "" || || secondary_attachment_ref != "" )
		{
			if ( specialty1 != 190 && specialty1 != 191 && specialty1 != 192 && specialty1 != 193 )
			{
				println( "^1Warning: (" + self.name + ") grip or grenade launcher is used but perk 1 was index " + specialty1 + ". Setting perk 1 to none." );
				specialty1 = 193; // 193 = there's an attachment, so no perk
			}
		}
Share |
bazukist
General Member
Since: Jan 20, 2010
Posts: 32
Last: May 1, 2011
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Friday, Jul. 16, 2010 06:02 pm
Yeah, thats it
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»