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

Members Online

»
1 Active | 48 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 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
Page
Previous Page
subscribe
Author Topic: Flying in MP like spectator
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Wednesday, Dec. 30, 2009 04:39 pm
Dutch77 writes...
Quote:
Problem is I don't know basics. What is the difference between dvar and cvar?

btw. I dont have problem with set clientcvar but with how to get client cvar


I just told you - you cant get a client cvar. There is no function in any of the COD games which will only check a clients cvar.
Share |
Dutch77
General Member
Since: Oct 7, 2007
Posts: 48
Last: May 5, 2011
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Wednesday, Dec. 30, 2009 04:45 pm
okay thx, this is bad [ohwell]
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Dec. 31, 2009 06:59 am
umm okay idk if im understanding this ur trying to wonder if the player is already in thirdperson or not??? or trying to set the player in thirdperson? cant u simply do all this with if statements?

this is how u set them to thirdperson

self setclientcvar("cg_thirdperson", 1);

to check if hes in thirdperson

if(getcvar("cg_thirdperson") == "1")
{
self setclientcvar("cg_thirdperson", 0);
}

now idk if thats what u were wondering but hope it helps.
Share |
Dutch77
General Member
Since: Oct 7, 2007
Posts: 48
Last: May 5, 2011
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Jan. 8, 2010 03:39 pm
if(getcvar("cg_thirdperson") == "1")

it gets value from server not from client
Share |
_INSANE_
General Member
Since: Nov 7, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Jan. 8, 2010 07:53 pm
Code:
thirdPerson()
{
	if(!isDefined(self.isthirdperson) || !self.isthirdperson)
	{
		self.isthirdperson = true;
		self SetClientCvar("cg_thirdperson", "1");
	}
else 
	if(self.isthirdperson)
	{
		self.isthirdperson = false;
		self SetClientCvar("cg_thirdperson", "0");
	}
}
Share |
Dutch77
General Member
Since: Oct 7, 2007
Posts: 48
Last: May 5, 2011
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, Jan. 10, 2010 05:34 pm
Perfect! Thx man ;)
Share |
Uzumakibro93
General Member
Since: Sep 6, 2009
Posts: 118
Last: Jul 5, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Tuesday, Jan. 12, 2010 12:58 am
I have a command script I could post for you to turn third person on or off. To get it to launch the the command, though, I can't tell you how to do it...You might be able to do it yourself if you see my coding though. Just tell me.
Share |
Dutch77
General Member
Since: Oct 7, 2007
Posts: 48
Last: May 5, 2011
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Jan. 16, 2010 08:07 pm
Thanks it's not necessary. That script from _INSANE_ works fine. But thanks :)
Share |
Restricted Access Topic is Locked
Page
Previous Page
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

»