PM command
#1

I have a simple PM command but how do I make a command which allows people to see the lastpm they've got?

pawn Код:
CMD:pm(playerid, params[]) {
    new id, message[1024];
    if(sscanf(params,"ds[1024]",id,message))return SendClientMessage(playerid, COLOR_RED, "USAGE: /pm <playerid> <message>");
    if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected.");
    if(playerid != id) {
        new PlayerName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        new ReturnName[MAX_PLAYER_NAME];
        GetPlayerName(id, ReturnName, sizeof(ReturnName));
        format(szString,sizeof(szString), ">> PM To %s (ID:%d): %s", ReturnName, id, message);
        SendClientMessage(playerid, 0xFFCC2299, szString);
        format(szString,sizeof(szString),"<< PM From %s (ID:%d): %s",PlayerName, playerid, message);
        SendClientMessage(id, 0xFFFF22AA, szString);
        PlayerPlaySound(id, 1085, 0.0, 0.0, 0.0);
        format(szString, sizeof(szString), "5*** [PM] From %s (ID:%d) To %s (ID:%d): %s",PlayerName,playerid,ReturnName,id,message);
        IRC_GroupSay(gGroupID, IRC_CHANNEL2, szString);
    }
    else {
        SendClientMessage(playerid, COLOR_RED, "ERROR: You cannot PM yourself");
    }
    return 1;
}
Reply


Messages In This Thread
PM command - by JEkvall95 - 26.10.2012, 22:14
Re: PM command - by Skillet` - 26.10.2012, 22:22
Re: PM command - by JEkvall95 - 26.10.2012, 22:29
Re: PM command - by Anthony © - 26.10.2012, 22:31
Re: PM command - by JEkvall95 - 26.10.2012, 22:32
Re: PM command - by Skillet` - 26.10.2012, 22:36
Re: PM command - by Anthony © - 26.10.2012, 22:50
Re: PM command - by ♣Frosty♣ - 26.10.2012, 23:58
Re: PM command - by JEkvall95 - 27.10.2012, 06:40

Forum Jump:


Users browsing this thread: 7 Guest(s)