Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # CS2 teleport script by SoMeGoD
- # Version 1.00
- # Please refer to the installation guide where you found this file if you're having trouble
- # CHANGE IF NEEDED - The path to YOUR "console.log" file
- $logFile = "C:\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\console.log"
- # CHANGE IF NEEDED - The path for the cfg file that will receive the "setpos" output. It's the same path as the path above + \cfg\ folder + file name
- $outFile = "C:\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg\teleport_script_setpos.cfg"
- # DO NOT CHANGE!!! - Read the "console.log" file and get the last line that contains "setpos"
- $lastSetPosLine = Get-Content $logFile | Select-String "setpos" | Select-Object -Last 1
- # DO NOT CHANGE!!! - Remove the date and time entries that is added by default from the "setpos" line
- $lastSetPosLine = $lastSetPosLine -replace '^\d{2}/\d{2} \d{2}:\d{2}:\d{2} ', ''
- # DO NOT CHANGE!!! - Creates the cfg file (or replace if it already exists) and write the "setpos" value in it
- $lastSetPosLine | Set-Content $outFile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement