Add some more functionality to structured team

This commit is contained in:
Lol3rrr
2024-10-15 21:27:57 +02:00
parent 35302891e3
commit 195d2fbc15

View File

@@ -52,6 +52,14 @@ pub mod ccsteam {
.map(|v| super::pawnid::PawnID::from(v))
.collect()
}
pub fn score(&self) -> Option<i32> {
self.0.get_prop("CCSTeam.m_iScore").map(|p| p.value.as_i32()).flatten()
}
pub fn team_number(&self) -> Option<u32> {
self.0.get_prop("CCSTeam.m_iTeamNum").map(|p| p.value.as_u32()).flatten()
}
}
}