20.11.2011, 15:37
Quote:
Hi, I am planning a bank system for my server and I would like to know how I can make it so when a player goes to withdraw it'll say his balance is, example:
Your balance is $542, today you may withdraw $500. Is it possible, if so how would it be done? |
pawn Код:
stock bankRound(number)
{
new
szNumStr[10],
iLen
;
format(szNumStr, sizeof(szNumStr), "%i", number);
iLen = strlen(szNumStr);
format(szNumStr, sizeof(szNumStr), "%s", szNumStr[0]);
for(new i; i < (iLen - 1); i++) format(szNumStr, sizeof(szNumStr), "%s0", szNumStr);
return strval(szNumStr);
}