MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
taske [Downl]
ghostryder07 [Tutor]
SparkyMcSp... [Today]
der_scharf... [Forum]

4 Members and 8 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Sunday, Jan. 4th
MODSonair 161 Live
Friday, Jan. 2nd
MODSonair Episode 160
Thursday, Jan. 1st
HAPPY NEW YEAR MODSONLINE AND ALL
Sunday, Dec. 28th
MODSonair 160 Live
Saturday, Dec. 27th
MODSonline Holiday Pwnage
Latest Poll
Modsonair audio or video?
Video from here on. 48.57%
Sticking with audio. 2.86%
Either is good. 17.14%
What is modsonair? 31.43%
Read More...
4 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
More dead bodies
CoD 4 Scripting.. Posts: (3) Views: (22) by INSANE{H|S}
Final Error... Hopefully!!!
CoD 4 Level Desi.. Posts: (6) Views: (98) by INSANE{H|S}
~ CodCreators.com ~
Offsite Links an.. Posts: (1) Views: (16) by eXsolved
Zombies Crashing?
CoD:WW Zombie/Co.. Posts: (4) Views: (33) by nirvashtype007
Art of War Central Half-Life 2 Mods for Dummies
CoDWW Download
Forums
MODSonline.com 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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, rEdrUmMDK, Foxhound, Wyatt_Earp, Rasta, StrYdeR, The_Caretaker, Cypher2004, supersword, batistablr, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: dissallow attack?
Webber105
General Member
Since: Aug 2, 2007
Posts: 23
Last: Jul 21, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Monday, Sep. 10, 2007 06:22 pm
is there a way to dissallow a player to attack?

And then to allow that player after a function in COD2.
[2guns]
nedgerblansky
General Member
Since: Jan 28, 2005
Posts: 57
Last: Nov 9, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Tuesday, Sep. 11, 2007 04:53 am
No.

You could create alternate weapon files with no attack, and switch the player's weapon to the alternate one, but that would be a bit complicated.

You can also remove all ammo temporarily. This does not disable the attack function, but obviously will have the same effect.

The simplest thing to do is probably to disable the weapon completely, by calling disableWeapon() on the player.
Call enableWeapon() to re-enable it.
Webber105
General Member
Since: Aug 2, 2007
Posts: 23
Last: Jul 21, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Sep. 11, 2007 02:55 pm
[machine_gun]
Thks....Does that work for COD2 MP?
I didn't see those commands in the DOCs file.[crazy]

edited on Sep. 11, 2007 03:01 pm by Webber105
nedgerblansky
General Member
Since: Jan 28, 2005
Posts: 57
Last: Nov 9, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Wednesday, Sep. 12, 2007 05:17 am
Webber105 writes...
Quote:
[machine_gun]
Thks....Does that work for COD2 MP?
I didn't see those commands in the DOCs file.[crazy]

edited on Sep. 11, 2007 03:01 pm by Webber105


Of course, otherwise I would'nt have mentioned them...
Webber105
General Member
Since: Aug 2, 2007
Posts: 23
Last: Jul 21, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Thursday, Sep. 13, 2007 11:43 am
[wave]Thks That did the trick.
toggle
General Member
Since: Dec 11, 2004
Posts: 27
Last: Feb 23, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Thursday, Sep. 13, 2007 03:06 pm
webber have you installed the mod tools...you should have a list of script functions?
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting
All logos and trademarks and information in this site are property of MODSonline LLC © 2009.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
Art of War Central
Partners
Call of Duty Headquarters
modbase.be
The Firing Box
XoXide
Frag Universe
Battle for Europe COD2
CODAddicts - Call of Duty News & Downloads
Ask About
Advertising
Friends
Canada Kicks Ass Clan
Volcano
After Life Gaming
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 160
MODSonair Episode 159
MODSonair Episode 158
MODSonair Episode 157
MODSonair Episode 156
Next Show
The next MODSonair show will air LIVE on:
01/11/2009 12:00 EST

Time remaining:
Copyright © 2009 MODSonline
Tresware Content Management System Copyright © 2009 Tresware
Website Designed and Hosted   Tresware