15.08.2018, 09:19
PHP код:
// take this as parameters of your command like "/pay 100k"
new string[] = "100k";
// working on getting real amount
new amount = strval(string);
if (strfind(string, "m", true) != -1) {
amount *= 1000000;
}
if (strfind(string, "k", true) != -1) {
amount *= 1000;
}
// result
printf("amount is $%i", amount);