to what extent can a clientcommand control a player

Discussion in 'Mapping Questions & Discussion' started by 【EmNudge】, Nov 3, 2015.

  1. 【EmNudge】

    【EmNudge】 L4: Comfortable Member

    Messages:
    183
    Positive Ratings:
    37
    to what extent can the point_clientcommand control a player. it most likely can't touch or create any binds I am assuming. I know it can make the player kill himself, join a class, basic functionality.
    can I, make the player join another server, perhaps?
     
  2. Izotope

    aa Izotope Never releases maps

    Messages:
    622
    Positive Ratings:
    586
    afaik you can do anything to a player that the player could do himself.
    connect <IP> works
    disconnect works
    quit works (actually using that in a joke map for noclippers heh)
     
  3. Coding Ethan

    Coding Ethan L2: Junior Member

    Messages:
    77
    Positive Ratings:
    66
    does connect still work, I though they replaced it with another entity.
     
  4. DonutVikingChap

    DonutVikingChap L5: Dapper Member

    Messages:
    228
    Positive Ratings:
    142
    Whoa, does that mean you could re-bind their keys, or take control over their movement with +forward, +left, etc.?
     
  5. Izotope

    aa Izotope Never releases maps

    Messages:
    622
    Positive Ratings:
    586
    In theory you should be able to, haven't tested it, though.
     
  6. 【EmNudge】

    【EmNudge】 L4: Comfortable Member

    Messages:
    183
    Positive Ratings:
    37
    yeah, thats what I was asking. I hope not, I really do.
    I don't want to go on a map to find that all my keys have been binded to chat commands of racial slurs on every server from then on
    (until I reload my autoexe that is)

    we could probably do an unbindall and then close the console, do some other stuff, forcing the guy to shut off his computer and manually turn binds back to default.
    or just make them type _restart to restart tf2 automatically.
     
    Last edited: Nov 4, 2015
  7. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    836
    This might help you. Type the emboldened text in to console.

    Note you will get a reduced amount if you do this on a SRCDS server (TF2 server) rather than a game client. I take it to mean that servers can't do much. Though I have been able to get the client to execute voice commands in the past, jump and crouch, but the latter two were unreliable. The preferred method of getting a player character to speak is using logic and SpeakResponseConcept.

     
  8. 【EmNudge】

    【EmNudge】 L4: Comfortable Member

    Messages:
    183
    Positive Ratings:
    37
    I don't believe this covers everything.
    proof: I am easily able to force a client to join a class or team, but those commands aren't included in the list.
     
    Last edited: Nov 5, 2015
  9. henke37

    aa henke37

    Messages:
    1,918
    Positive Ratings:
    448
    You mean "aren't".
     
  10. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    836
    You may find that you are unable to force a client to join a team if you run the map on a dedicated Source server, as opposed to a listen server run in the game itself. I did some research last night and found complaints that the clientcommand join method no longer worked. I can't guarantee the information above is correct but I thought it was interesting.
     
    • Thanks Thanks x 1
  11. 【EmNudge】

    【EmNudge】 L4: Comfortable Member

    Messages:
    183
    Positive Ratings:
    37
    oh....well that kinda sucks for me.
    so are we to say that all commands should work in a listen server, but not in a dedicated server?

    I was using the join class command to force a player to spy in a room meant for only spy...don't know how I am going to accomplish that now.

    thanks though
     
  12. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    836
    My advice is try it out. If you have access to a server, do that, or ask someone who does. Perhaps make a test map and ask someone to upload it to TF2maps and change to it on one of the servers.

    There was a new filter entity that came about in the game along with Gun Mettle, I think. It seems to be for TF2 class filtering. It's called filter_tf_class. It has one property named tfclass and its value should be a single number. That number is representative of one of the TF2 classes, like so:
    1. Scout
    2. Sniper
    3. Soldier
    4. Demoman
    5. Medic
    6. Heavy
    7. Pyro
    8. Spy
    9. Engineer
    You might be able to use this in conjunction with a trigger_teleport or something to prevent any non-spies from entering an area. The entity is not part of the default TF2 FGD so you will have to manually type it in and add its properties. You are probably best creating an existing filter entity and going from there.

    I haven't tested this new entity yet myself and haven't heard any reports of its usefulness.
     
    • Thanks Thanks x 1