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

Members Online

»
0 Active | 9 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: dissallow attack?
Webber105
General Member
Since: Aug 2, 2007
Posts: 23
Last: Jul 22, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Monday, Sep. 10, 2007 10:22 pm
is there a way to dissallow a player to attack?

And then to allow that player after a function in COD2.
[2guns]
Share |
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 08: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.
Share |
Webber105
General Member
Since: Aug 2, 2007
Posts: 23
Last: Jul 22, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Sep. 11, 2007 06: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
Share |
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 09: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...
Share |
Webber105
General Member
Since: Aug 2, 2007
Posts: 23
Last: Jul 22, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Thursday, Sep. 13, 2007 03:43 pm
[wave]Thks That did the trick.
Share |
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 07:06 pm
webber have you installed the mod tools...you should have a list of script functions?
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 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

»