[Help] Pm Script
#3

you mean a /pm command?

pawn Код:
CMD:pm(playerid, params[]) {
    new id;
    if(sscanf(params, "us[128]", id, params)) {
        if(id != INVALID_PLAYER_ID) {
            new name1[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], str1[128], str2[128];
            GetPlayerName(playerid, name1, MAX_PLAYER_NAME);
            GetPlayerName(id, name2, MAX_PLAYER_NAME);
            format(str1, sizeof(str1), "PM send to %s: %s", name2, params);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, str1);
            format(str2, sizeof(str2), "PM received from %s: %s", name1, params);
            SendClientMessage(id, COLOR_LIGHTBLUE, str2);
        }
        else return SendClientMessage(playerid, COLOR_GREY, "Error: Player not found");
    }
    else return SendClientMessage(playerid, COLOR_ORANGE, "Syntax Error: /pm [playerid] [text]");
    return 1;
}
I think this should work fine
Reply


Messages In This Thread
[Help] Pm Script - by Monster[HD] - 13.04.2011, 15:00
Re: [Help] Pm Script - by BASITJALIL - 13.04.2011, 15:03
Re: [Help] Pm Script - by Rivera - 13.04.2011, 15:13

Forum Jump:


Users browsing this thread: 1 Guest(s)