31.01.2013, 11:44
dunno if u still need this.
try this
try this
pawn Код:
CMD:deposit(playerid, params[])
{
new money=strval(params);
new file[100],Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
if(GetPlayerMoney(playerid) < money) return SendClientMessage(playerid,COLOR_LIGHTBLUE,"You do not have that much money to deposit");
if(money <= 0 ) return SendClientMessage(playerid,COLOR_LIGHTBLUE,"Enter the amount of money you want to deposit: Please use numbers");
GivePlayerMoney(playerid,-money);
pInfo[playerid][Deposit] += money;
new string[128];
format(string,sizeof(string), "You have deposit: %d$",money);
SendClientMessage(playerid,COLOR_RED,string);
//you must add INI_Open here
INI_WriteInt(file,"Deposit",pInfo[playerid][Deposit]);
INI_Close(file);
format(string,sizeof(string),"Your current balance is: %d$",pInfo[playerid][Deposit]);
SendClientMessage(playerid,COLOR_RED,string);
return 1;
}