Load crashdetect plugin for that. Until then, I found 2 things.
pawn Код:
printf("* zBlock: LOGIN! %s has logged in the zBlock 'CP'!", GetName(playerid), SecondParam);
1 placeholder and 2 arguments.
The last one and most important, you should check if the file handle is valid before using any file function because it can crash the server. For example, this (from your code) is incorrect:
pawn Код:
new
File: zBlockstuff = fopen("/zblock/password.txt", io_read)
;
fread(zBlockstuff, string);
fclose(zBlockstuff);
It should be:
pawn Код:
new
File: zBlockstuff = fopen("/zblock/password.txt", io_read)
;
if (zBlockstuff)
{
fread(zBlockstuff, string);
fclose(zBlockstuff);
}
Then in changepassword, you have:
pawn Код:
if(zBlockstuff)
{
fopen("/zblock/password.txt", io_write);
fwrite(zBlockstuff, SecondParam);
fclose(zBlockstuff);
format(messagestring, sizeof(messagestring), "zBlock: %s(%d) has changed the password to %s", GetName(playerid), playerid, SecondParam);
SendMessageToAdmins(COLOR_NOTES2, messagestring);
printf("* zBlock: PASS CHANGE! %s has changed the password to %s!", GetName(playerid), SecondParam);
}
opening a file without storing the file handle to a variable and closing another file handle.