BlockPm help REP+
#1

pawn Код:
CMD:pm(playerid, params[])
{
    new str[256], str2[128], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
    if(sscanf(params, "us[128]", id, str2))
    {
        SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /pm [playerid] [message]");
        return 1;
    }
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFFFF00AA, "ERROR: Player not connected");
    if(playerid == id) return SendClientMessage(playerid, 0xFFFF00AA, "ERROR: You cannot pm yourself!");
    GetPlayerName(playerid, Name1, sizeof(Name1));
    GetPlayerName(id, Name2, sizeof(Name2));
    format(str, sizeof(str), "pm sent To %s(ID %d): %s", Name2, id, str2);
    SendClientMessage(playerid, COLOR_YELLOW, str);
    format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
    SendClientMessage(id, COLOR_YELLOW, str);
    new File:log = fopen("/ServerLog.txt", io_append); // Open the file and prepares for writing inside
    format(str, sizeof(str), "pm recived from %s to %s: %s\r\n", Name1, Name2, str2);//makes string that will be printed
    fwrite(log, str); // Write to the file (\r\n is for a new line)printing the string
    fclose(log); // Close the file
    return 1;
}
How can I make a BLOCKPM command for this I am confused help please
Reply


Messages In This Thread
BlockPm help REP+ - by Dare Devil..... - 09.08.2012, 11:07
Re: BlockPm help REP+ - by IceMeteor - 09.08.2012, 11:23

Forum Jump:


Users browsing this thread: 1 Guest(s)