I wanted to ask ,how to make a Timer which starts to counting when the player dont move for 30sec and after stops the game?
You will need to check each tick/timer for the pawn/character’s Velocity. If it is 0 then begin your timer. Depending on your final goal you may need to check the rotation as well.
Stopping the game is up to you though. If you mean to close the application completely then you can just do a console command “exit” but if you just want to stop the current gameplay and go to some other menu/game state then that is up to your specific game.