Banned logs - 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)
+--- Thread: Banned logs (
/showthread.php?tid=406499)
Banned logs -
DerickClark - 10.01.2013
Hi,How to make a banned logs? like dis
IngameName:
Banned By:
Banned On:
Reason:
Re: Banned logs -
mineralo - 10.01.2013
pawn Код:
forward BanLog(string[]);
public BanLog(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\r\n",string);
new File:hFile;
hFile = fopen("Ban.log", io_append);
if (hFile)
{
fwrite(hFile, entry);
fclose(hFile);
}
}
use the BanLog(string) when you ban a player, and the info will be written in Ban.log file
Re: Banned logs -
DerickClark - 10.01.2013
Do it say ?
IngameName:
Banned By:
Banned On:
Reason:
+ i don't see my ban logs
Re: Banned logs -
mineralo - 10.01.2013
use this lol,
pawn Код:
...//your cmd
format(string,sizeof(string),"IngameName:%s\n,Banned By:%s\nBanned ON:%s"...
BanLog(string)
Re: Banned logs -
u3ber - 10.01.2013
Quote:
Originally Posted by mineralo
pawn Код:
forward BanLog(string[]); public BanLog(string[]) { new entry[256]; format(entry, sizeof(entry), "%s\r\n",string); new File:hFile; hFile = fopen("Ban.log", io_append); if (hFile) { fwrite(hFile, entry); fclose(hFile); } }
use the BanLog(string) when you ban a player, and the info will be written in Ban.log file
|
you do know there are
good ini file systems that makes this job easier right?
Re: Banned logs -
mineralo - 10.01.2013
just gave an exemple, now he could choose in what system to work

its not my problem