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

Members Online

»
0 Active | 53 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 subscribe
Author Topic: Some quick questions
Phl3x_
General Member
Since: Jun 4, 2011
Posts: 19
Last: Jun 14, 2012
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Saturday, Jun. 4, 2011 07:21 am
Hey everyone,

I have two simple questions that I hope someone can help me with:

1. How can I get the value of a players' dvar, when I can't call the 'getDvar' function on the player? If I just use the 'getDvar' function, where does it get the value from?

2. Does the 'conditional ternary operator' work in this language? Example:
Code:
st1 ? st2 : st3


Thanks very much :)
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD4 Scripting
Posted: Saturday, Jun. 4, 2011 08:05 am
1. You cannot.
Share |
Xylozi
General Member
Since: Jul 12, 2008
Posts: 218
Last: Mar 1, 2012
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Saturday, Jun. 4, 2011 08:07 am
Oops.
Share |
Phl3x_
General Member
Since: Jun 4, 2011
Posts: 19
Last: Jun 14, 2012
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Saturday, Jun. 4, 2011 08:44 am
IzNoGoD writes...
Quote:
1. You cannot.


Yeh, I didn't think so, but I'm confused about promod. In promod, it can check your FPS and detect when it's greater than 250. Do you know how this works?
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD4 Scripting
Posted: Saturday, Jun. 4, 2011 12:56 pm
I have heard of a method that makes a player open a menu file, and does something with dvartest+shading to send information to the server.

But i think promod just uses punkbuster to kick players with a too high fps. Punkbuster has support for this.
Share |
scillman
General Member
Since: Nov 23, 2006
Posts: 360
Last: Sep 1, 2012
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Tuesday, Jun. 7, 2011 09:44 pm
1. No as described by an IW member in one of the scripts. It can only get serverside dvars. You can use variables to this sort of work.

2. No, sorry this does not work either, you will have to do it the old fashioned way:
Code:
// st0 = st1 ? st2 : st3;
if ( st1 )
	st0 = st2;
else
	st0 = st3;
Share |
Restricted Access Topic is Locked 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

»