examples

package
v2.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 10 Imported by: 6

README

Examples

Here you can find a overview of examples on how to use demoinfocs-golang.

ℹ Example code may not be production ready - specifically error handling and such is done in a simplified way and should not be used in critical systems as-is.

Example Description
heatmap Creating a heatmap from positions where players fired shots from
nade-trajectories Map overview with grenade trajectories
entities Using unhandled data from entities (Parser.ServerClasses())
net-messages Parsing and handling custom net-messages
encrypted-net-messages Parsing and handling encrypted net-messages (e.g. text chat in MM demos)
print-events Printing kills, scores & chat messages
mocking Using the fake package to write unit tests for your code
web-assembly Using the library from JavaScript (browser/node) with WebAssembly
more examples A collection of unpolished GitHub Gists based on past requests

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DemoPathFromArgs

func DemoPathFromArgs() string

DemoPathFromArgs returns the value of the -demo command line flag. Panics if an error occurs.

func GetMapMetadata added in v2.13.3

func GetMapMetadata(name string, crc uint32) metadata.Map

GetMapMetadata fetches metadata for a specific map version from `https://radar-overviews.csgo.saiko.tech/<map>/<crc>/info.json`. Panics if any error occurs.

func GetMapRadar added in v2.13.3

func GetMapRadar(name string, crc uint32) image.Image

GetMapMetadata fetches metadata for a specific map version from `https://radar-overviews.csgo.saiko.tech/<map>/<crc>/info.json`. Panics if any error occurs.

func RedirectStdout

func RedirectStdout(f func())

RedirectStdout redirects standard output to dev null. Panics if an error occurs.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL