05.07.2018, 07:17
AmigaBlizzard has got a point. Instead of saving money as string, you can have 2 integer arrays. One being for money and the other for coins. Showing the money would look like this (an example):
The need of splitting is now unnecessary.
%02d ads zero in front in case it is 1 digit. "9" becomes "09".
pawn Код:
format(string, sizeof string, "My money: %d.%02d$", gPlayer[playerid][Money], gPlayer[playerid][Coins]);
%02d ads zero in front in case it is 1 digit. "9" becomes "09".