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

Members Online

»
0 Active | 77 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
Category: CoD+UO General
General game questions, comments, and chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Read client cvar
dobledosis
General Member
Since: Apr 1, 2007
Posts: 22
Last: Apr 25, 2016
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Saturday, Oct. 11, 2014 02:57 pm
Hi i want to read a client cvar when a player connects with an "if". Somethig like this:

if(ClientCvar["r_mode"] == "-1")

I cant get the correct sentence and i dnt know where to learn this,
I hope someone can help me.
Thanks!


Share |
modsfabio
General Member
Since: Aug 10, 2014
Posts: 23
Last: May 18, 2017
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Sunday, Oct. 12, 2014 02:59 pm
Reading client cvars is not possible.
May i ask what do you want to do?
Share |
dobledosis
General Member
Since: Apr 1, 2007
Posts: 22
Last: Apr 25, 2016
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Tuesday, Oct. 14, 2014 07:38 am
modsfabio writes...
Quote:
Reading client cvars is not possible.
May i ask what do you want to do?


My mod allow players to setup wide screen resolution from menu, but the players sees all closer, so its not really usefull.
User can't change fov, because it's a cheat protected cvar but i discovered that i can change the user fov cvar from the server when player connects
I want to detect who has r_mode -1 and change that player fov.


Thanks
Share |
morgawr
General Member
Since: Dec 15, 2004
Posts: 377
Last: Mar 19, 2023
[view latest posts]
Level 5
Category: CoD+UO General
Posted: Tuesday, Oct. 14, 2014 09:57 pm
I recall capturing players configs using pb.
Share |
dobledosis
General Member
Since: Apr 1, 2007
Posts: 22
Last: Apr 25, 2016
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Thursday, Oct. 16, 2014 02:47 am
morgawr writes...
Quote:
I recall capturing players configs using pb.


Hi morgawr, i thought about that but i don't know how to do it from the mod.
Can you explain me please?
Thanks!
Share |
modsfabio
General Member
Since: Aug 10, 2014
Posts: 23
Last: May 18, 2017
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Thursday, Oct. 16, 2014 06:55 am
You could also make a server sided var.. For example:

setCvar("mode_" + self getGuid(), "r_mode:1;b_mode:2;c_mode:3");

And read it like data = getCvar("mode_" + self getGuid());
Then you can explode the : and the ; to extract the data.

This is the way how i store levels in my mod by server side.
You can add as much player vars and data as you want in one server sided var.

I scripted a little program that reads the data by RCon and automatically writes it in a MySQL database.
So i have all data stored central.
Check this out: http://modszombies.com/serverstats/?rotu

Is a little bit complex but if you need help, please feel free to contact me :)

Regards

edited on Oct. 15, 2014 11:55 pm by modsfabio
Share |
dobledosis
General Member
Since: Apr 1, 2007
Posts: 22
Last: Apr 25, 2016
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Friday, Oct. 17, 2014 10:00 am
modsfabio writes...
Quote:
You could also make a server sided var.. For example:

setCvar("mode_" + self getGuid(), "r_mode:1;b_mode:2;c_mode:3");

And read it like data = getCvar("mode_" + self getGuid());
Then you can explode the : and the ; to extract the data.

This is the way how i store levels in my mod by server side.
You can add as much player vars and data as you want in one server sided var.

I scripted a little program that reads the data by RCon and automatically writes it in a MySQL database.
So i have all data stored central.
Check this out: http://modszombies.com/serverstats/?rotu

Is a little bit complex but if you need help, please feel free to contact me :)

Regards

edited on Oct. 15, 2014 11:55 pm by modsfabio


Thanks Fabio. This is too complex for my knowledge, but for what i understand of what you are telling me, what happens if a player that never entered before enters with the command r_mode in -1? The server won't detect the change and store?

Thanks
Share |
morgawr
General Member
Since: Dec 15, 2004
Posts: 377
Last: Mar 19, 2023
[view latest posts]
Level 5
Category: CoD+UO General
Posted: Monday, Oct. 20, 2014 01:29 am
I will look see if I can find it in pb files.
Share |
modsfabio
General Member
Since: Aug 10, 2014
Posts: 23
Last: May 18, 2017
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Monday, Oct. 20, 2014 06:39 am
dobledosis writes...
Quote:
modsfabio writes...
Quote:
You could also make a server sided var.. For example:

setCvar("mode_" + self getGuid(), "r_mode:1;b_mode:2;c_mode:3");

And read it like data = getCvar("mode_" + self getGuid());
Then you can explode the : and the ; to extract the data.

This is the way how i store levels in my mod by server side.
You can add as much player vars and data as you want in one server sided var.

I scripted a little program that reads the data by RCon and automatically writes it in a MySQL database.
So i have all data stored central.
Check this out: http://modszombies.com/serverstats/?rotu

Is a little bit complex but if you need help, please feel free to contact me :)

Regards

edited on Oct. 15, 2014 11:55 pm by modsfabio


Thanks Fabio. This is too complex for my knowledge, but for what i understand of what you are telling me, what happens if a player that never entered before enters with the command r_mode in -1? The server won't detect the change and store?

Thanks


When a player enters the server you check if the server sided var exists.
for example you check for the var (with getcvar()) mode_123456 (when player has guid 123456).

If the var exists it will probably contain the r_mode of the player.
If it doesnt exist you do setcvar() with the default value of r_mode.

Idk if it is unterstandable :D

Regards
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoD+UO General

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

»