Logging PM messages
#1

how to log all pm messages?
Reply
#2

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
Reply
#3

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
Reply
#4

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).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)