26.11.2014, 23:27
You can probably use normal file functions. In that case,
And then simply,
pawn Код:
stock SaveMOTD()
{
if(fexists("motd.ini"))
{
new File:motd = fopen("motd.ini", io_write);
fwrite(motd, serverMOTD);
fclose(motd);
return 1;
}
return true;
}
stock LoadMOTD()
{
if(fexists("motd.ini"))
{
new File:motd = fopen("motd.ini", io_read);
fread(file, serverMOTD);
fclose(file);
return 1;
}
return true;
}
pawn Код:
public OnPlayerConnect(playerid)
{
new string[64];
format(string, sizeof(string), "MOTD: %s", serverMOTD);
SendClientMessage(playerid, -1, string);
return 1;
}