I have last question, when I try to put it into a read command it just shows:
PHP код:
adminjail/%username.txt
and here is the reading file code:
pawn Код:
if (strcmp(cmd, "/killrecord", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "adminjail/%s.ini", sendername);
new File:example = fopen(string, io_read);
if (example)
fread(example, string)
fclose(example); // Close the file
format(string, 256, "Admin kills: %s", string);
SendClientMessage(playerid, COLOR_GRAD1, string);
printf("%s",string); // Print what was read
return 1;
}
and here is the openfile script:
pawn Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
new fname[32];
format(fname, 32, "adminjail/%s.ini", sendername);
new File:example = fopen(fname, io_write);
format(string, 256, "%s was killed by Admin %s time: %d min ago, weapons: %s", giveplayer, sendername, jailtime, (result));
fwrite(example, string);
fclose(example);