rakijah / CSGSI

A simple C# library to interface with Counter-Strike: Global Offensive's Game State Integration
Other
129 stars 27 forks source link

gs.Map.HasData always returns true #35

Open zzhabib opened 3 years ago

zzhabib commented 3 years ago

When using gs.Map.HasData to detect whether the user is in game or on the main menu, I noticed that it seems to always return true regardless of condition. I did find a workaround which is to use gs.Map.JSON.Equals("{}") which will return true if when the player is on the main menu.

spreedated commented 1 year ago

Just use something like if (gs.Map.Phase != CSGSI.Nodes.MapPhase.Live) to check if the player is in a match or not.