18.09.2015, 18:30
Try this, you have this in plus if(sscanf(params,"nd", amount))
PHP код:
CMD:deposit(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 2, -2455.4519, 503.9336, 30.0781))
{
if(GetPlayerMoney(playerid) < 0) return SendClientMessage(playerid, COLOR_RED, "ERROR:You don't have any money on you!");
new amount;
if(sscanf(params,"d", amount)) return SendClientMessage(playerid, -1,"USAGE: /deposit [amount]");
if(amount < 0 ) return SendClientMessage(playerid,-1,"You can not withdraw money with minus");
GivePlayerMoney(playerid, -amount);
pInfo[playerid][Bank]++;
}
return 1;
}
CMD:withdraw(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 2, -2455.4519, 503.9336, 30.0781))
{
if(pInfo[playerid][Bank] < 0) return SendClientMessage(playerid, COLOR_RED, "ERROR:You Don't Have Money In Your Bank Account!");
new amount;
if(sscanf(params,"d", amount)) return SendClientMessage(playerid, -1,"USAGE: /withdraw [amount]");
if(amount < 0 ) return SendClientMessage(playerid,-1,"You can not withdraw money with minus");
GivePlayerMoney(playerid, amount);
pInfo[playerid][Bank]--;
}
return 1;
}