Results 1 to 9 of 9

Thread: cod2 get cvar from client

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    ... connecting
    Join Date
    May 2019
    Posts
    8
    Thanks
    7
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by maxdamage99 View Post
    WHAT FOR?)

    People so stupidly disguise their fraudulent intentions...
    Sorry I didn't explain it very well, no fraudulent intentions mate.

    Let's say I open a contest blue team vs red team and in 10 days I announce the winning team.
    Everyone can choose(and change later) a team and every kill gets +1 to the team you cheer for (doesn't matter if you allies or axis), so you set yourself a custom cvar team_name "red" or "blue", but the server has to be able to read this cvar in some way from client.
    For now i have done different working approach but i don't like them very much:
    - set the team you cheer for in your name; every kill read get_userinfo( "name" ); then parse if there is team name inside and give +1;
    - after connect write the team you cheer for in chat with some flag to make parsing easy, then associate team cheer with GetEntityNumber(); and track kills by that entity number, but you still need to parse every chat message.

    I wanted to do something like client add cvar team_name "color" in his autoexec.cfg so is set at game launch and can change it when he wants.

    In older posts it was only written that it can be done is some way but not how, that's why I'm asking.

    Quote Originally Posted by voron00 View Post
    It's possible, however with a little trick that code allows to get player's cd-key and proably shouldn't be posted here.
    There isn't some neutered function where I can read only that cvar without leaking player cd-keys?

    Or do you think I can execute it without a cvar but still make it already available on next connection?
    Last edited by Miri; 22nd May 2019 at 17:30.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •