Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: My Servers

  1. #1

    Default My Servers

    how can i move a players ?

    thankx fans
    Last edited by Old Fox; March 25th, 2019 at 10:13 PM.

  2. #2

    Default

    It is possible with a specifically designed script.
    But you should consider that you would need the user to consent, otherwhise it is violating the users free choise to join a specific server.
    This is different from reconnecting or kickig a player.

    I am not sure such a script exists, but it is doable, even without the user to download something from server.
    If the user would download a menu with a agree dialog that would be the best case to get the consent of the user.

  3. #3

    Default

    hmmm
    Last edited by Old Fox; March 25th, 2019 at 10:14 PM.

  4. #4

    Default

    Save it as redirect.scr and execute from DMprecache. It's pretty the same method as guys used in force join team thread. Command is:

    Code:
    rcon redirect idnumber
    or

    Code:
    ad_rcon redirect idnumber
    This is the code to save:


    //=========================================================================
    main:{
    //=========================================================================
    while (1){
    local.player_entnum = getcvar("redirect")
    if(local.player_entnum != ""){
    for (local.i = 1; local.i <= $player.size; local.i++) {
    local.player = $player[local.i]
    if (local.player.entnum == int(local.player_entnum)){
    local.player stufftext("connect 95.97.109.32:12203") //Change it to your ip and port.
    }
    }
    setcvar "redirect" "";
    }
    waitframe
    }
    }end
    Last edited by Criminal; November 8th, 2018 at 03:08 AM.

  5. #5

    Default

    thankx DerFuhrer
    its running well but there is small prob the cosole spamming very much so can i stop the spamming ?
    Attached Images Attached Images

  6. #6

    Default

    Yes, that is because setcvar isn't inside the if, as it really should be. Put it in the if just after the for.

  7. #7

    Default

    I updated code to working one, TY Smithy!

  8. #8

    Default

    no no guys there something went wrong
    Last edited by Old Fox; March 25th, 2019 at 10:15 PM.

  9. #9

    Default

    Ah, It's because you made short statement so I thought that one way redirect is all you need. Give me all IP numbers with ports of your servers and I will create for you redirecting between all of you servers in both ways. Actually you can even tell if you use that Admin Pro and Jims Punishment to force players to join team you want them to join in the end, because if not I can integrate it into that script. But server will probably auto-team balance players after forcing them to join desired team, It's a lot of work(more than hour) to bypass it.
    Last edited by Criminal; November 8th, 2018 at 01:29 AM.

  10. #10

    Default

    Sorry, just realised that my reply was ambiguous looking at your code. I meant inside the first if but after the for closing bracket (perhaps it would be better placed just before the for, but inside the if?). With it inside the second if, it's still looping over if an admin provides a value that doesn't match a player entnum (but in this case it will constantly loop over players).

Posting Permissions

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