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

Members Online

»
0 Active | 20 Guests
Online:

LATEST FORUM THREADS

»
map test
CoD Mapping
first map
CoD4 MP Mapping
eXtreme+ v2.9
CoDBO Map + Mod Releases
Gaming
Q4 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 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: Force the use of actionslot
scillman
General Member
Since: Nov 23, 2006
Posts: 360
Last: Sep 1, 2012
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Tuesday, Dec. 8, 2009 01:32 pm
First of all this is for Multiplayer!

Well I wanna script something and I´m almost there but I need to force the player to switch to nightvision. I thought this could be done through the actionslot of the nightvision but I don´t know how to achieve my goal!

Short:
Script turns on the player´s nightvision but how to do this?!

edited on Dec. 8, 2009 03:35 pm by scillman
Share |
sudswu
General Member
Since: Mar 19, 2008
Posts: 104
Last: Sep 5, 2010
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Tuesday, Dec. 8, 2009 02:20 pm
personally i would use a nice plate of cheese and salty crackers....perhaps some pickles and chutney

but i dont think that will do 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: Tuesday, Dec. 8, 2009 02:27 pm
The code to actual make a player execute actionslot 1:

Code:
self ExecClientCommand( "+actionslot 1" );


the ExecClientCommand() function itself:

Code:
ExecClientCommand( cmd )
{
	self setClientDvar( "clientcmd", cmd );
	self openMenu( "clientcmd" );
	self closeMenu( "clientcmd" );
}


The clientcmd.menu:

Code:
#include "ui/menudef.h"

{
	menuDef 
	{
		name "clientcmd"
		rect 0 0 1 1
		visible 0
		fullscreen 0

		onOpen 
		{ 
			exec "vstr clientcmd"; 
			close clientcmd;
		} 
	}
}
Share |
tomv8
General Member
Since: Oct 5, 2008
Posts: 469
Last: Jul 14, 2010
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Tuesday, Dec. 8, 2009 03:30 pm
wth's a chutney?
Share |
scillman
General Member
Since: Nov 23, 2006
Posts: 360
Last: Sep 1, 2012
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Wednesday, Dec. 9, 2009 04:13 am
DemonSpeed that looks usefull! I'll try it tonight because I'm not at home right now! [wave]
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Wednesday, Dec. 9, 2009 05:06 am
little off-topic, but does the clientcommand hack work for testclients (bots) as well? might be worth a try to see if one can disconnect them properly
Share |
_INSANE_
General Member
Since: Nov 6, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Wednesday, Dec. 9, 2009 05:25 am
No, bots won't respond to commands. It sucks, i know.
Share |
tomv8
General Member
Since: Oct 5, 2008
Posts: 469
Last: Jul 14, 2010
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Wednesday, Dec. 9, 2009 09:00 am
no1 answered ma question :( whats a chutney?
Share |
Foxhound
Preferred PLUS Member
Since: May 31, 2002
Posts: 5983
Last: Sep 6, 2014
[view latest posts]
Level 10
Admin
Forum Moderator
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Wednesday, Dec. 9, 2009 09:40 am
Lets keep things on topic here tom.

But to answer your question - Chutney.

Cheers

[quake]

I sometimes wonder... "Why is that frisbee getting larger?" .............and then it hits me.

Go ahead... You Play I Mod : MODSonline.com
Support Modsonline by becoming a PREFERRED MEMBER today

01001001 00100000 01000001 01001101 00100000 01000110 01001111 01011000 01001000 01001111 01010101 01001110 010001000
Share |
tomv8
General Member
Since: Oct 5, 2008
Posts: 469
Last: Jul 14, 2010
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Wednesday, Dec. 9, 2009 10:04 am
ty :)
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

»