diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2019-02-15 18:32:44 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2019-02-15 18:32:44 +0100 |
commit | f88d93f125354edfc3c86b976fd6ec1233e81af0 (patch) | |
tree | 1b9393d0eba5c7f85b3f39c4ce4ab64856b7ae3f | |
parent | 39a787b1ce947e04ed6011d0dc555cfb2ba8f8f1 (diff) |
Implement /curriculum_stalinae.
-rw-r--r-- | src/game/g_cmds.c | 28 |
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 ] ); |