Closed nickdnk closed 3 years ago
IIRC, this is due to the reasons being off by one between CS:S and CS:GO (and the include predating CS:GO). The SourceMod and CStrike extension natives and forwards that specifically deal with round end reason do account for this. For reading from the event, you do have to handle it manually.
Cool. Thanks for clearing it up. I'll just adjust my code to compensate for it. I just wanted to make sure I wasn't doing something wrong.
Help us help you
Environment
Description
When fetching the
round_end
event (https://wiki.alliedmods.net/Counter-Strike:_Global_Offensive_Events#round_end) and reading thereason
property usingevent.GetInt("reason")
, it returns an integer that's 1 larger than defined in https://sm.alliedmods.net/new-api/cstrike/__raw, i.e. when the bomb explodes,CSRoundEnd_TargetBombed
becomes1
, not0
,CSRoundEnd_TargetSaved
becomes12
instead of11
and so on.Is this me being an idiot? Does
GetInt()
not work when the field is of type "byte" (there's noGetByte()
method it seems). I'm pretty new to SourceMod/SourcePawn so this might be my fault.Problematic Code (or Steps to Reproduce)
Logs
n/a