SA-MP Forums Archive
pm system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: pm system (/showthread.php?tid=351830)



pm system - thefatshizms - 17.06.2012

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?


Re: pm system - Jarnu - 17.06.2012

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?


Re: pm system - thefatshizms - 17.06.2012

ye thanks