pm system
#1

Hello, i made a pm system/cmd
pawn Код:
CMD:pm(playerid, params[])
{
    new string[50];
    new sent[128];
    new id;
    if(sscanf(params,"us[50]",id,string)) return SendClientMessage(playerid, COLOR_PURPLE, "USGAE: /pm <id> <message>");
    format(string, sizeof(string),"**PM From %s**: %s", PlayerName(playerid), string);
    format(sent, sizeof(sent),"Message: Sent to %s", PlayerName(id));
    SendClientMessage(playerid, COLOR_LIGHTGREEN, sent);
    SendClientMessage(id, COLOR_PURPLE, string);
    GameTextForPlayer(playerid, "~r~Message ~b~Sent", 2000, 1);
    GameTextForPlayer(id, "~r~New Message ~b~Recived", 2000, 1);
    PlayerPlaySound(playerid, 1057, 0, 0, 0);
    PlayerPlaySound(id, 1057, 0, 0, 0);
    return 1;
}
basicly first how do i make that the person that sent the msg can see what he sent but with out the pm from ect
and how could i make the "**PM from**" yellow but the rest of the message purple?
Reply
#2

pawn Код:
CMD:pm(playerid, params[])
{
    new string[50];
    new sent[128];
    new id;
    if(sscanf(params,"us[50]",id,string)) return SendClientMessage(playerid, COLOR_PURPLE, "USGAE: /pm <id> <message>");
    format(string, sizeof(string),"**PM From %s**: {690069}%s", PlayerName(playerid), string);
    format(sent, sizeof(sent),"Message: Sent to %s", PlayerName(id));
    SendClientMessage(playerid, COLOR_LIGHTGREEN, sent);
    SendClientMessage(id, COLOR_PURPLE, string);
    GameTextForPlayer(playerid, "~r~Message ~b~Sent", 2000, 1);
    GameTextForPlayer(id, "~r~New Message ~b~Recived", 2000, 1);
    PlayerPlaySound(playerid, 1057, 0, 0, 0);
    PlayerPlaySound(id, 1057, 0, 0, 0);
    return 1;
}
You want this? it will be like this "PM from" will be in Yellow and text "blablablabla" will be in Purple..that you want?
Reply
#3

ye thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)