09.04.2015, 13:10
(
Последний раз редактировалось DarkLouis; 09.04.2015 в 13:56.
)
Hi all.
I created this:
But it don't work very well. It set MONEY and not get the money that the player has.
Example: Lossa has 5.000 $ into the bank. Lusso give her 1.000$ by transfer. Now Lossa has 1.000$ and not 6.000$ What I've to do?
I'm using ZCMD and Y_INI.
Thank you.
I created this:
PHP код:
case DIALOG_BANCA_BONIFICO_2:
{
if(response)
{
new denaro = Somma[playerid];
new string[MAX_PLAYER_NAME+18];
if(strlen(inputtext) == 0) return SendClientMessageEx(playerid, -1, "Devi inserire il nome del beneficiario!");
format(string, sizeof(string), PATH, inputtext);
if(!fexist(string)) return SendClientMessageEx(playerid, -1, "Il nome inserito и inesistente.");
new id;
INI_ParseFile(string, "LoadUser_%s", .bExtra = true, .extra = id );
PlayerInfo[id][Banca] += denaro;
new INI:File = INI_Open(string);
INI_WriteInt(File, "Banca", PlayerInfo[id][Banca]);
INI_Close(File);
PlayerInfo[playerid][Banca] -= denaro;
SalvaDati(playerid);
new string2[150];
format(string2, sizeof(string2), "Hai effettuato un bonifico bancario di %d dollari a %s.", denaro, inputtext);
SendClientMessageEx(playerid, -1, string2);
}
}
Example: Lossa has 5.000 $ into the bank. Lusso give her 1.000$ by transfer. Now Lossa has 1.000$ and not 6.000$ What I've to do?
I'm using ZCMD and Y_INI.
Thank you.