Add tax and wealth cmds

This commit is contained in:
Vortrex
2022-01-04 15:12:36 -06:00
parent e170be914d
commit 931f38a5e6

View File

@@ -84,4 +84,31 @@ function forcePlayerPayDayCommand(command, params, client) {
playerPayDay(targetClient);
}
// ===========================================================================
function taxInfoCommand(command, params, client) {
if(areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command));
return false;
}
let wealth = calculateWealth(client);
let tax = calculateIncomeTax(wealth);
messagePlayerInfo(client, `Your tax on payday is: $${tax}. Use {ALTCOLOUR}/help tax {MAINCOLOUR}for more information.`);
}
// ===========================================================================
function wealthInfoCommand(command, params, client) {
if(areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command));
return false;
}
let wealth = calculateWealth(client);
messagePlayerInfo(client, `Your wealth is: $${wealth}. Use {ALTCOLOUR}/help wealth {MAINCOLOUR}for more information.`);
}
// ===========================================================================