Logging PM messages - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Logging PM messages (
/showthread.php?tid=112446)
Logging PM messages -
whitedragon - 07.12.2009
how to log all pm messages?
Re: Logging PM messages -
LarzI - 07.12.2009
open up base.pwn
delete this line (you don't have to, but it's unecesarry)
pawn Код:
printf("PM: %s",Message);
then add this code where the line we deleted in the previous step was:
pawn Код:
new File:pos = fopen("private_messages.txt", io_append);
format(Message, sizeof(Message), "** %s(%d) to %s(%d): %s", pName, playerid, iName, id, gMessage);
fwrite(pos, Message);
fclose(pos);
That should work
Re: Logging PM messages -
whitedragon - 08.12.2009
C:\samp\filterscripts\base.pwn(69) : warning 217: loose indentation
C:\samp\filterscripts\base.pwn(70) : error 017: undefined symbol "pos"
C:\samp\filterscripts\base.pwn(71) : error 017: undefined symbol "pos"
C:\samp\filterscripts\base.pwn(6
: warning 204: symbol is assigned a value that is never used: "hey"
i got those error when i add this
Re: Logging PM messages -
LarzI - 08.12.2009
There, fixed last reply, lol.
Код:
C:\samp\filterscripts\base.pwn(69) : warning 217: loose indentation
For that one, just indent correctly (Search for the topic Correct Indentation (I don't believe it's stickied anymore?) there you will find information if you don't know how to indent).