Quick reply to PM's
#1

Hey,

I've had a PM command for a while, and I found that it would be easier if people could reply to the last person who PM'd or the last person who they had PM'd. And if the last person who they PM'd had disconnected, it would tell them that the player has disconnect. And if they had not PM'd anyone or received any PM's it would say that there is no one to reply to. But I'm not sure how to make it. Here is my 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", id, str2))
    {
        SendUsageError( playerid, "/pm [ID] [Message]" );
        return 1;
    }

    if( playerid == id )
        return SendClientMessage(playerid, 0xFF0000FF, "ERROR:{FFFFFF} You cannot send a PM to yourself!");

    if( id == INVALID_PLAYER_ID )
        return InvalidPlayerError(playerid);

    if( NOPM{ id } == true)
        return SendClientMessage(playerid, 0xFF0000FF, "ERROR:{FFFFFF} This person has turned off their PM's");

    GetPlayerName(playerid, Name1, sizeof(Name1));
    GetPlayerName(id, Name2, sizeof(Name2));
    format(str, sizeof(str), "PM sent to %s[%d]: %s", Name2, id, str2);
    SendClientMessage(playerid, 0xFFF700FF, str);
    format(str, sizeof(str), "PM from %s[%d]: %s", Name1, playerid, str2);
    SendClientMessage(id, 0xFFF700FF, str);
    return 1;
}
Thanks,

FunnyBear
Reply


Messages In This Thread
Quick reply to PM's - by FunnyBear - 14.12.2014, 15:31
Re: Quick reply to PM's - by Abagail - 14.12.2014, 15:35
Re: Quick reply to PM's - by Lordzy - 14.12.2014, 15:57

Forum Jump:


Users browsing this thread: 1 Guest(s)