04.12.2012, 09:05
Firstly.
Use sscanf (for better parameters and usage).
Edit the above according to your need! thats just an example.
Use sscanf (for better parameters and usage).
pawn Код:
CMD:osetcash(playerid,params[])
{
new name[100], amount;
if(sscanf(params,"s[100]d", name, amount)) return SendClientMessage(playerid, 0xFF0000FF,"Syntax: /osetcash [name][amount]");
new string[128];
format(string,sizeof(string),"Users/%s.ini",name);
if(fexist(name))
{
new INI:File = INI_Open(string);
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash", amount);
INI_Close(File);
}
else { SendClientMessage(playerid,COLOR_YELLOW,"{FF0000}..::{FF6347}[Database]:Account not found{FF0000}::.."); }
return 1;
}