#pragma once
+// TODO: find a better location for these?
+int total_players;
+
// todo: accept the number of teams as a parameter
void GameRules_teams(bool value);
* @param spprio player score priority (if frags aren't enabled)
* @param stprio team score priority (if frags aren't enabled)
*/
-#define GameRules_scoring(teams, spprio, stprio, fields) MACRO_BEGIN { \
+#define GameRules_scoring(teams, spprio, stprio, fields) MACRO_BEGIN \
_GameRules_scoring_begin((teams), (spprio), (stprio)); \
noref void(entity, string, float) field = _GameRules_scoring_field; \
/* todo: just have the one `field` function */ \
noref void(int, string, float) field_team = _GameRules_scoring_field_team; \
LAMBDA(fields); \
_GameRules_scoring_end(); \
-} MACRO_END
+MACRO_END
void _GameRules_scoring_begin(int teams, float spprio, float stprio);
void _GameRules_scoring_field(entity i, string label, int scoreflags);
*/
void GameRules_scoring_vip(entity player, bool value);
bool GameRules_scoring_is_vip(entity player);
+
+#define GameRules_scoring_add(client, fld, value) _GameRules_scoring_add(client, SP_##fld, value)
+float _GameRules_scoring_add(entity client, entity sp, float value);
+#define GameRules_scoring_add_team(client, fld, value) _GameRules_scoring_add_team(client, SP_##fld, ST_##fld, value)
+float _GameRules_scoring_add_team(entity client, entity sp, int st, float value);