Raised This Month: $12 Target: $400
 3% 

How to save player movement and recreate it later


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 01-30-2022 , 18:54   How to save player movement and recreate it later
Reply With Quote #1

I was looking online for a kz plugin that records the player's movement that saves it and recreates it using a fake player, basically acting as a demo recorder. I came around a similar one to this but demos where recorded locally and uploaded on online sites which were done years ago but it's not what im looking for. Any suggestions, some place to start, or any function that i can hook up these movements is appreciated.
bigdaddy424 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-31-2022 , 05:16   Re: How to save player movement and recreate it later
Reply With Quote #2

Creating a dynamic array, and using entity think with length of 0.1 seconds seems reasonable length of time? then you copy player position, +animation, +viewangles into the array.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 01-31-2022 at 05:18.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-31-2022 , 21:36   Re: How to save player movement and recreate it later
Reply With Quote #3

The best way to get a demo on the server side is to use an HLTV to record a demo. This is a built-in feature of the HLTV. It won't cause issues that a plugin may cause and you can play back the demo easily with just your client game.

Quote:
Originally Posted by Natsheh View Post
Creating a dynamic array, and using entity think with length of 0.1 seconds seems reasonable length of time? then you copy player position, +animation, +viewangles into the array.
That could very likely create a massive memory usage.
__________________
fysiks is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 02-01-2022 , 00:23   Re: How to save player movement and recreate it later
Reply With Quote #4

Quote:
Originally Posted by Natsheh View Post
Creating a dynamic array, and using entity think with length of 0.1 seconds seems reasonable length of time? then you copy player position, +animation, +viewangles into the array.
I was about do this but on a server with around 20 players active during the day it would probably lag and crash like @fysiks mentioned.
Quote:
Originally Posted by fysiks View Post
The best way to get a demo on the server side is to use an HLTV to record a demo. This is a built-in feature of the HLTV. It won't cause issues that a plugin may cause and you can play back the demo easily with just your client game.
Will I be able to read the contents of the demo without the map ending? I was thinking adding a fake player to replay what the #1 ranked player did, like many csgo kz servers have these bots and you just spectate them to see how the ended up first on the leaderboard.
bigdaddy424 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-01-2022 , 05:45   Re: How to save player movement and recreate it later
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
The best way to get a demo on the server side is to use an HLTV to record a demo. This is a built-in feature of the HLTV. It won't cause issues that a plugin may cause and you can play back the demo easily with just your client game.



That could very likely create a massive memory usage.
Indeed it does, but you can use it carefully per player.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 02-01-2022 at 05:46.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-01-2022 , 22:31   Re: How to save player movement and recreate it later
Reply With Quote #6

Quote:
Originally Posted by bigdaddy424 View Post
Will I be able to read the contents of the demo without the map ending? I was thinking adding a fake player to replay what the #1 ranked player did, like many csgo kz servers have these bots and you just spectate them to see how the ended up first on the leaderboard.
No, a demo is a file that you would load into your game as if you were joining an HLTV server to watch all players play the game. You would probably need to do something like what Natsheh said to be able to play it back live.
__________________
fysiks is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 02-02-2022 , 00:00   Re: How to save player movement and recreate it later
Reply With Quote #7

Quote:
Originally Posted by Natsheh View Post
Creating a dynamic array, and using entity think with length of 0.1 seconds seems reasonable length of time? then you copy player position, +animation, +viewangles into the array.
Found this gem on github
https://github.com/MichaelKheel/ProKreedz
It records and saves all those info into a text file and uses arrays to save player pos and viewangles and all that.
bigdaddy424 is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 02-02-2022 , 19:52   Re: How to save player movement and recreate it later
Reply With Quote #8

created long time ago
you can use this one by Kpoluk: https://kz-rush.ru/en/forum/topic/64/
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode