Logging a PM problem.
#1

Hi guys, today I am having a problem with logging PM's, when someone PM's someone it does not log anything.
Here is my entire PM command.
pawn Код:
CMD:pm(playerid, params[])
   {
     new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
    if(sscanf(params, "us[256]", id, str2))
    {
        SendClientMessage(playerid, 0xFF0000FF, "Usage: /pm <id> <message>");
        return 1;
    }
    if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
    GetPlayerName(playerid, Name1, sizeof(Name1));
    GetPlayerName(id, Name2, sizeof(Name2));
    format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
    SendClientMessage(playerid, Yellow, str);
    format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
    SendClientMessage(id, Yellow, str);
    for(new i= 0; i < MAX_PLAYERS; i++)
     {
     if(IsPlayerConnected(i))
        {
           new zName[MAX_PLAYER_NAME];
           new str12[500];
           GetPlayerName(i, zName, sizeof(zName));
           if(PlayerInfo[i][pAdmin] < 3)
           {
            format(str12, sizeof(str12), "[LOG]PM from %s(%d) to %s(%d):%s", Name1,playerid,Name2,id,str2);
            SendClientMessage(i,Yellow, str12);
           }
        }
    }
    return 1;
   }
Any suggestions?
Reply
#2

Delete this
Reply
#3

Quote:
Originally Posted by PrivatioBoni
Посмотреть сообщение
Huh, which line/s are the "logging" lines. I do not see it at all.
Sorry, I meant sending the PM message from the 2 players to Level 4 Admins and higher, my mistake
Reply
#4

I fixed it now , I accidentally made it if you were lower than a Level 3 it would show it for you, now its fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)