summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/g_cmds.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 01dcdc2..b27e3ad 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -5461,7 +5461,28 @@ static void Cmd_Ignore_f( gentity_t *ent )
va( "print \"Donated %.0f %s to the cause.\n\"",
total-value, type ) );
}
-
+
+/*
+=================
+Cmd_Funds_f
+
+Check available funds and (TODO) related information
+=================
+*/
+void Cmd_Funds_f(gentity_t *ent)
+{
+ const char *fmt;
+
+ if (!ent->client)
+ return;
+
+ if (ent->client->pers.teamSelection == PTE_ALIENS)
+ fmt = "print \"You have %.3f evo(s).\n\"";
+ else
+ fmt = "print \"You have %.0f credit(s).\n\"";
+
+ trap_SendServerCommand(ent - g_entities, va(fmt, ent->client->pers.funds));
+}
commands_t cmds[ ] = {
// normal commands
@@ -5543,7 +5564,10 @@ commands_t cmds[ ] = {
{ "donate", CMD_TEAM, Cmd_Donate_f },
{ "protect", CMD_TEAM|CMD_LIVING, Cmd_Protect_f },
{ "resign", CMD_TEAM, Cmd_Resign_f },
- { "builder", 0, Cmd_Builder_f }
+ { "builder", 0, Cmd_Builder_f },
+
+ { "funds", CMD_TEAM, Cmd_Funds_f },
+ { "curriculum_stalinae", CMD_TEAM, Cmd_Funds_f },
};
static int numCmds = sizeof( cmds ) / sizeof( cmds[ 0 ] );