01.02.2013, 00:34
You placed your if statement in the wrong order
pawn Код:
if(GetPVarInt(playerid, "DepositingMoney") == 1)
{
new b = GetPVarInt(playerid, "BankIDSlot");
if(IsNumeric(text))
{
if(GetPlayerMoney(playerid) >= strval(text)) // Here :P
{
GivePlayerMoney(playerid, -strval(text));
PlayerInfo[playerid][pCash] -= strval(text);
format(szMessage, sizeof(szMessage), "* You have deposited $%d into the account.", strval(text));
SendClientMessage(playerid, COLOR_LIGHTBLUE, szMessage);
DeletePVar(playerid, "DepositingMoney");
BankData[playerid][b][bMoney] += strval(text);
}
else SendClientMessage(playerid, COLOR_GREY, "* You do not have that much to deposit!"); DeletePVar(playerid, "DepositingMoney");
}
else SendClientMessage(playerid, COLOR_WHITE, "* You did not enter a number!"); DeletePVar(playerid, "DepositingMoney");
}