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

Members Online

»
0 Active | 11 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: Bind key to a sound file
Borske
General Member
Since: Feb 10, 2006
Posts: 5
Last: Mar 5, 2006
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Monday, Feb. 27, 2006 07:39 pm
Is it possible to bind my grenade key to a soundfile?
What I would like is to put a keybind in CoD2 so that when I press "grenade" it will put up a text message saying grenade thrown (or something like that) and have a sound file play of a voice yelling out a grenade has been thrown. I realise that if people do not have the sound file they wont hear it but those that do would hear it.
My whole idea for this, is for my clan. Everyone in my clan would have the sound file on their computer so they will hear it.
Can this be done?

(Sorry for the long winded post)
Share |
toggle
General Member
Since: Dec 11, 2004
Posts: 27
Last: Feb 23, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Mar. 4, 2006 01:45 pm
You dont need any seperate sound files etc if you dont want.and everybody will hear regardless

open your config_mp.cfg and add,and save

bind 1 "openScriptMenu quickstatements 5; +frag;-frag"

Pressing the 1 key will now throw a grenade with you shouting Grenade! and the text appearing in chat.

You cannot cook with this method.


Share |
deus
General Member
Since: Jul 19, 2005
Posts: 30
Last: Apr 11, 2006
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, Mar. 5, 2006 02:37 pm
Alternatively
bind 1 "+frag; openScriptMenu quickstatements 5;"
will allow nade cooking

EDIT the trouble is it will yell grenade everytime you press and release the key regardless of whether your typing

edited on Mar. 5, 2006 09:40 am by deus
Share |
Borske
General Member
Since: Feb 10, 2006
Posts: 5
Last: Mar 5, 2006
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Sunday, Mar. 5, 2006 04:59 pm
Thanks for the replies Toggle & Deus.
These do work but I was wondering if there is a way I can make it so that only members of my clan can hear the soundfile. Like make my own sound file?
The reason I would like to do this is because when we are playing people sometimes complain about hearing everytime we throw a grenade. We've been told its annoying.

*Also Deus I get a error up on my screen when I use your code. "unknown cmd 101" Is there a way I can fix this?

Thanks again.
Share |
deus
General Member
Since: Jul 19, 2005
Posts: 30
Last: Apr 11, 2006
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Monday, Mar. 6, 2006 06:04 pm
The only way to acheive that would be via a mod (no idea how)
The error im getting to, as this is something i tried adding recently not sure why
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

»