1. @Wulf ,
    OnPlayerInput hook can't cancel the Player Input? Just reads it?
     
  2. Wulf

    Wulf Community Admin

    Correct, there's no return behavior right now.
     
  3. ok : (

    Solved.
     
  4. Wulf

    Wulf Community Admin

    I'm not sure if there was a reason not to originally, but I added it locally.
     
  5. It's ok.

    I just wanted to cancel player movement and later activate again.

    I managed to do it by doing WorldPlayerEntity.SetActive(false|true) for now.

    Edit: I just remember I could, on the Hook, put the movement input to false and update the InputControls from CharacterMotorSimple also, lol.
     
  6. Wulf

    Wulf Community Admin

    Yeah, may be best to do that I guess. Right now the Rust OnPlayerInput hook doesn't return either.
     
  7. @Wulf sorry again, I managed to cancel player movement by changing the input to false on the hook. But i can't cancel player attack (like shoot bow and swing spear). Tried all inputs to false. You know something about it?
     
  8. Wulf

    Wulf Community Admin

    It's possible that those are never sent to the server, just that they performed that action.
     
  9. Why not just use CharacterMotorSimple.CanMove = false;
    Would be more efficient than returning false on every input.

    Also, you could use FireServer.ShotPower(0f); (float value of zero) to make bullets do no damage.
    Or you could just unequipt them, or remove their bullets and give them back when you allow them to shoot, or give them godmode and turn it off when wanted.
     
    Last edited by a moderator: May 10, 2016