02.11.2011, 10:56
I can't think straight at the moment to come up with an example script but basically you'd have BankCash split into an array which hold a maximum of ~2billion each cell, then when it subtracts it tries subtracting from the highest index and works its way down, and when it adds cash it'll add from the lowest index and try filling up, when one cell equals 2billion it'll go into the next one.
so if you had 1,000 it'd be
BankCash[playerid][0] = 1000
BankCash[playerid][1] = 0
BankCash[playerid][2] = 0
BankCash[playerid][3] = 0
if you had 2,300,000,000 it'd be
BankCash[playerid][0] = 2000000000
BankCash[playerid][1] = 300000000
BankCash[playerid][2] = 0
BankCash[playerid][3] = 0
and to display it you could look at how many of them are full, if the first is full then they have over 2 billion
so if you had 1,000 it'd be
BankCash[playerid][0] = 1000
BankCash[playerid][1] = 0
BankCash[playerid][2] = 0
BankCash[playerid][3] = 0
if you had 2,300,000,000 it'd be
BankCash[playerid][0] = 2000000000
BankCash[playerid][1] = 300000000
BankCash[playerid][2] = 0
BankCash[playerid][3] = 0
and to display it you could look at how many of them are full, if the first is full then they have over 2 billion
pawn Код:
if(BankCash[playerid][0] == MAX_BANK_LIMIT && BankCash[playerid][1] < MAX_BANK_LIMIT) format(string,sizeof(string),"$2.%d Billion",BankCash[playerid][1]);