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

Members Online

»
0 Active | 59 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
Page
Next Page
subscribe
Author Topic: Help me.
michak55
General Member
Since: Aug 25, 2008
Posts: 19
Last: Jul 21, 2009
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Tuesday, Aug. 26, 2008 02:05 pm
Hi,
I am writing my first mod. I would like have capability of change fire type in it but I don't know how to do that. I know only that for change it I must edit e.g. ak47 file. I would like to change it after clicking any button. I would like too to all have their level (when I am playing my mod i have 1 level).
Please help me [wink]

edited on Aug. 26, 2008 10:06 am by michak55
Share |
michak55
General Member
Since: Aug 25, 2008
Posts: 19
Last: Jul 21, 2009
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Wednesday, Aug. 27, 2008 12:44 pm
Anybody can help me?
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Wednesday, Aug. 27, 2008 02:05 pm
where the game gives the weapons to the players

\raw\maps\mp\gametypes\_class.gsc, line 627

giveLoadout( team, class ) { //... }


you could give each player the weapon with your desired fire mode (new weapon files for each weapon with a specific fire mode).

i worry it won't work with such a lot weapon files, 'cause cod4 is limited to 128 weapon assets in MP, and about 110 are already in use!
Share |
michak55
General Member
Since: Aug 25, 2008
Posts: 19
Last: Jul 21, 2009
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Thursday, Aug. 28, 2008 06:44 am
Ok but how can I change weapon file after clicking e.g. shift?
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Thursday, Aug. 28, 2008 02:53 pm
either by menu workaround / hack or obtain the key status via script (buttonpressed, meleebuttonpressed - sprint or knife?)
Share |
michak55
General Member
Since: Aug 25, 2008
Posts: 19
Last: Jul 21, 2009
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Thursday, Aug. 28, 2008 04:31 pm
Ok, can You give me a script for edit file?
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Thursday, Aug. 28, 2008 05:09 pm
no, and i think what you are about to try is much too complex for your first mod.

check out the stock menus if you like, \raw\ui_mp\
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Thursday, Aug. 28, 2008 05:47 pm
have a look at the source code of OpenWarfare:

http://openwarfaremod.com/

new feature in 1.1.1:
Quote:
Option to enable weapon jams where weapons can stop firing at certain point and the player needs to clear the jam to be able to use that weapon again.


you could modify the code to simulate fire modes


Share |
michak55
General Member
Since: Aug 25, 2008
Posts: 19
Last: Jul 21, 2009
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Friday, Aug. 29, 2008 07:44 am
Can You tell me where is error in this code?
Code:
while( self ButtonPressed( "BUTTON_U" ) ) 
{
filenum = OpenFile( "mp\m16_gl_mp", "write" );
FPrintLn( 1, WEAPONFILE\...\....\....\fireType\Full Auto\...\...\...\
weap_m16_clipout_plr weap_m16_clipout_plr 
weap_m16_clipin_plr weap_m16_clipin_plr
weap_m16_chamber_close_plr weap_m16_chamber_close_plr
melee_knife_stab melee_knife_stab
weap_m4m16_switch_grenade weap_m4m16_switch_grenade
weap_m4m16_switch_back weap_m4m16_switch_back" );
}


Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Friday, Aug. 29, 2008 12:22 pm
what's the error message?
Share |
Restricted Access Topic is Locked
Page
Next Page
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

»