forward Log(playerid,string[]);
public Log(playerid,string[])
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
new entry[200];
format(entry, sizeof(entry), "%s\r\n",string);
new f[200];
format(f, sizeof(f), "Records/%s",pName);
new File:hFile;
hFile = fopen(f, io_append);
fwrite(hFile, entry);
fclose(hFile);
}
X blah blah Y blah blah Iskeblahblah |
X blah blah Y blah blah Iskeblahblah |
forward GetAR(playerid,targerid);
public GetAR(playerid,targerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
new f[200];
format(f, sizeof(f), "Records/%s",pName);
new File:hFile;
hFile = fopen(f, io_read);
new string[365];
fread(hFile, string,365,true);
new msg[256];
format(msg, sizeof(msg), "[_____ %s Admin Record _____]",pName);
SCM(targerid,COLOR_WHITE,msg);
format(msg, sizeof(msg), "%s",string);
SCM(targerid,COLOR_LIGHTRED,msg);
format(msg, sizeof(msg), "[_____ %s Admin Record _____]",pName);
SCM(targerid,COLOR_WHITE,msg);
fclose(hFile);
}
CMD:arecord(playerid, params[])
{
if(gPlayerLogged[playerid] == 1)
{
GetAR(playerid, playerid);
}
else
{
SCM(playerid, COLOR_GREY,"You are not logged in!");
}
return 1;
}