PDA

View Full Version : How to save scripts?



Loveboy
9th June 2013, 19:44
Hi Guys, i need really very soon a new control how to save stats. So if somebody join and he make money and he disconnect then the money should save if he come back. Sombody can make a tutorial about that if somebody can help?

Thank you

kung foo man
9th June 2013, 20:00
It's in IzNoGod's CoD4Mod: http://www.iznogod.tweak.nl/CoD4MoD.rar

Loveboy
9th June 2013, 20:18
Thank you kung. I will look tomorrow. Now i have no time.

IzNoGoD
9th June 2013, 21:12
Please dont try to use the full featured cod4mod for this. Find the _stattracking.gsc file i designed to give an effective account system as a plugin :)

randall
9th June 2013, 21:26
It's from my mod, there is all functions you need.


isFile( file )
{
f = openFile(file, "read");

if (f != -1)
{
closeFile( f );
return true;
}
else
{
closeFile( f );
return false;
}
}

write( file, var )
{
f = openFile(file, "write");
fPrintln(f, var);
closeFile( f );
}

append( file, var )
{
f = openFile(file, "append");
fPrintln(f, var);
closeFile( f );
}

read( file )
{
f = openFile(file, "read");

if (f == -1)
{
closeFile( f );
return;
}

size = fReadln( f );

array = [];
for (i = 0; i < size; i++)
array[i] = fGetArg(f, i);

closeFile( f );

return array;
}

read_index( file, index )
{
f = openFile(file, "read");

if (f == -1)
{
closeFile( f );
return;
}

fReadln( f );
ret = fGetArg(f, index);
closeFile( f );

return ret;
}

Loveboy
10th June 2013, 15:06
IzNoGod: Hi, thank you but i haven't found the file _stattracking.gsc on your cod4mod. And i have a question: On your CoD4Mod is a UAV, how did you made it? I can find this in your CoD4 Mod?

randall: Hi, thank you for this script, but i don't know where i can set it for saving stats. Can you give a example?