04.06.2012, 22:38
pawn Код:
if(dialogid == XXXXX)
{
if(response)
{
if(strlen(inputtext))
{
new test[128];
format(test, sizeof(test), "/XXXXX/XXXXX.ini");
new oi = dini_Int(test, "XXXXX");
format(string, sizeof(string), "{FFFAFA}O Saldo atual do cofre й: {32CD32}%dR$\n{FFFAFA}Digite a quantia a sacar:", oi);
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, CPublicoSacar, DIALOG_STYLE_INPUT, "Cofre XXXXX - 'Sacar'", string, "Sacar", "Fechar");
GivePlayerMoneyEx(playerid, strval(inputtext));
format(string, sizeof(string), "* Vocк sacou %dR$ do Cofre XXXXX.", strval(inputtext));
SendClientMessage(playerid, Verde, string);
dini_IntSet(test, "XXXXX", oi - strval(inputtext));
}
}
}