Raised This Month: $ Target: $400
 0% 

[ANY/CSGO] Get data on every server tick? (e.g. player position)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pabertay
Junior Member
Join Date: Oct 2023
Old 11-02-2023 , 13:25   [ANY/CSGO] Get data on every server tick? (e.g. player position)
Reply With Quote #1

I'm curious if it's possible to execute code every time the server ticks. For example, I want to get a player's position and keep a record of it for every server tick. Was hoping there was some kind of 'OnTickStart()' listener/forward but would appear not.

I know that I can record a demo and parse it for this data after a match has ended, but I'm keen to do this through sourcemod so I can perform actions based out this data in-between rounds (rather than having to wait for a match to finish).

What's hurting my head is a belief I've seen this addressed before (and that conversation/documentation made it clear to not do anything expensive, for obvious reasons), but my searching can't dig that back up. Typical!
pabertay is offline
pabertay
Junior Member
Join Date: Oct 2023
Old 11-02-2023 , 14:11   Re: [ANY/CSGO] Get data on every server tick? (e.g. player position)
Reply With Quote #2

Had this answered on the discord. The forward I was looking for was 'OnGameFrame()'.
pabertay is offline
little_froy
Senior Member
Join Date: May 2021
Old 11-02-2023 , 14:15   Re: [ANY/CSGO] Get data on every server tick? (e.g. player position)
Reply With Quote #3

OnGameFrame - for server generic,
OnPlayerRunCmd*, SDKHook_*Think* - for each player

Last edited by little_froy; 11-02-2023 at 14:15.
little_froy 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 14:22.


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