bans - 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: bans (
/showthread.php?tid=290070)
bans -
DaRkAnGeL[NBK] - 14.10.2011
Hey,
I would like to know how i would create a log of bans with my users ? using y_ini as save/load sys
Re: bans -
[GOD]Dragonster82 - 14.10.2011
Read it from
the following filter scripts:
LuxAdmin
JunkBuster
0Admin
---------------------------
Please do not ask questions when the answers are right in front of you.
Re: bans -
Yamoo - 14.10.2011
Quote:
Originally Posted by [GOD]Dragonster82
Read it from
the following filter scripts:
LuxAdmin
JunkBuster
0Admin
---------------------------
Please do not ask questions when the answers are right in front of you.
|
Or you just don't know heh, back on topic.
Are you using y_ini, Dini or what?
Re: bans -
MonkZemun - 14.10.2011
Put this at the top of the script:
PHP код:
forward BanLog(string[]);
Put this in your ban command:
PHP код:
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "[ADMIN]: %s was banned by %s, Reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
BanLog(string);
Put this at the end of the script:
PHP код:
public BanLog(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\n",string);
new File:hFile;
hFile = fopen("Logs/ban.txt", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
You must create new folder in your scriptfiles called Logs and in that folder create Text Document.txt and rename it to ban.txt ..thats it
Re: bans -
DaRkAnGeL[NBK] - 14.10.2011
thanks you