[HELP] Loading a code from a file? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Loading a code from a file? (
/showthread.php?tid=119897)
[HELP] Loading a code from a file? -
[NYRP]Mike. - 09.01.2010
Well i'm creating a system to allow faction leaders to set codes ig, and this is my savecode function.
pawn Код:
public SaveCode()
{
new coordsstring[128];
format(coordsstring, sizeof(coordsstring), "Current Security Code: %d", SEC_CODE);
new File: file2 = fopen("SecurityCode.ini", io_write);
fwrite(file2, coordsstring);
fclose(file2);
return 1;
}
how would i do the LoadCode() function to go with it?