Right, and guid arg is useless too. I really like feedback, but you behave like a child.
But OK... If the baby cry, I'll try to help...
********THREADS UPDATED:
Code:
loadMoneyFile(start)
{
if(!isPlayer(self))
return;
guid=self getGuid();
if(!isDefined(guid) || guid==0)
return;
if(!isDefined(start))
start=0;
fid=openFile("money\\"+guid+".acc","read");
if(fid!=-1)
{
self.money=int(fGetArg(fid,0));
closeFile(fid);
}
else // If no saved file found
{
self.money=start;
self manageMoneyFile(); // Create and update the saved file with every kill
}
}
manageMoneyFile()
{
if(!isPlayer(self))
return;
guid=self getGuid();
if(!isDefined(guid) || guid==0)
return;
fid=openFile("money\\"+guid+".acc","write");
closeFile(fid);
fid=openFile("money\\"+guid+".acc","append");
fPrintLn(fid,self.money);
closeFile(fid);
}