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

Members Online

»
0 Active | 98 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 subscribe
Author Topic: Function that returns followed player while spectate?
kelik
General Member
Since: Jan 2, 2011
Posts: 13
Last: Dec 8, 2012
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Saturday, Jan. 15, 2011 05:49 pm
Hi there, I was wondering if there is any function that returns followed player while we speactating him. I am sure that there have to be something like that, because when we are in spectator mode and we are following someone his/hers name is displayed on top of our screen. I was looking for that in script files, in documentation and on this forum, but I have found nothing.

Do any of you guys know any function/solution to get name/id or something of player that we are following while spectating ?
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Saturday, Jan. 15, 2011 07:26 pm
iirc, there is a client cvar for this. But, clientcvars cannot be read...
Share |
kelik
General Member
Since: Jan 2, 2011
Posts: 13
Last: Dec 8, 2012
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Saturday, Jan. 15, 2011 07:40 pm
Well, I want to write a script, that allows admin to kick player whose he is actually following, without id/player name. If it is a client cvar I am guessing that it is possible to write a client-side script which would help. I will search through the client cvars then, thanks for help. :)
Share |
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 24, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Jan. 15, 2011 09:02 pm
see what
Code:
self.spectatorclient

can do for you.

It looks like it returns -1 when not following someone, and I ASSUME in other cases it will return the player you're following, though I don't know for sure.
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

»