This is my deposit command:
Код:
dcmd_deposit(playerid,params[])
{
new deposit;
new file[100],Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,sizeof(Name)); format(file,sizeof(file),PlayerFile,Name);
if(sscanf(params,"d",deposit)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/deposit [Amount]");
else if(deposit > GetPlayerMoney(playerid)) return SendClientMessage(playerid,COLOR_RED,"You Don't Have That Amount!");
else if(deposit < 0) return SendClientMessage(playerid,COLOR_RED,"Invalid Amount!");
{
}
GivePlayerMoney(playerid,-deposit);
pInfo[playerid][Deposit] += deposit;
dini_IntSet(file,"Deposit",pInfo[playerid][Deposit]);
SendClientMessage(playerid,COLOR_GREEN,"BANK");
new string[128]; format(string,sizeof(string),"You Have Deposited : %d$",deposit);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
dini_IntSet(file,"Deposit",pInfo[playerid][Deposit]);
new string2[128]; format(string2,128,"Your New Balance Is : %d$",pInfo[playerid][Deposit]);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string2);
return 1;
}
I just want to let it store if you are in bankmenu.if(Bankmenu[playerid]==1) and you enter a amount in text ,not in command.