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

Members Online

»
0 Active | 63 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: How do I set Dvar for all players?
ReDoX
General Member
Since: Jul 3, 2012
Posts: 32
Last: Jun 27, 2013
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Saturday, Feb. 9, 2013 12:11 pm
I want to set a partivular Dvar for all players. For eg. when I activate a trigger, it will set r_fullbright 1 for all players, not only me. Is that possible?
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Sunday, Feb. 10, 2013 05:23 am
Is it a trigger only 'you" can hit? Which can be done by player name or GUILD.

Also, which I'm not sure about but is that a cheat? If so, I think the server has to have cheats enabled for it to work.

But yes, you just collect all the players and DO something, will it work for "r_fullbright 1", not sure.

You can use the following to collect all the players:

Code:
players = getEntArray ("player", "classname");
Share |
FzBr.d4rk
General Member
Since: Jan 23, 2011
Posts: 86
Last: Jun 7, 2016
[view latest posts]
Level 3
Category: CoD4 Scripting
Posted: Sunday, Feb. 10, 2013 05:23 am
SetClientDvar( dvarName, value )

example:

self SetClientDvar( "cg_drawhud", "0" );



http://zeroy.com/script/
Share |
ReDoX
General Member
Since: Jul 3, 2012
Posts: 32
Last: Jun 27, 2013
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Sunday, Feb. 10, 2013 09:00 am
So, for example to set r_fullbright 1 for all players:

players = getentarray ("player", "classname");
players.self setclientDvar ("r_fullbright", "1");

Is that right?

edited on Feb. 10, 2013 02:21 am by ReDoX
Share |
3st0nian
General Member
Since: Jan 14, 2008
Posts: 291
Last: Dec 4, 2017
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Sunday, Feb. 10, 2013 10:33 am
Code:
players = getentarray ("player", "classname");
for(i=0; i<players.size; i++)
    players[i] setclientDvar ("r_fullbright", "1");
Share |
ReDoX
General Member
Since: Jul 3, 2012
Posts: 32
Last: Jun 27, 2013
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Monday, Feb. 11, 2013 11:58 am
So I put that in the custom_public.gsc inside z_custom_ruleset of a promod. It turns fullbright on for me, but not for other players.
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

»