Local chat command for special
#1

Alrighty so in LS-RP it marks the administrator's names whenever they are using PMs or /b (local chat).
How they do so, I know that you need to define whenever the admin is blah blah blah, but every time that I do so It doubles the chat instead of doing it to one chat.

Quote:

CMD:b(playerid, params[])
{
new str[200];
if(sscanf(params, "s[200]", str)) return SendClientMessage(playerid, COLOR_GRAY, "/b [message]");

format(str, sizeof(str), "(( %s: %s ))", GetRoleplayName(playerid), str);
SendLocalMessage(playerid, str,Range_Normal, COLOR_LBLUE, COLOR_LBLUE);
SetPlayerChatBubble(playerid, str, COLOR_LBLUE, Range_Normal, 7000);

return 1;
}
Quote:

CMD:pm(playerid, params[])
{
new pID, pmmsg[200], str[200];
if(sscanf(params, "us[200]", pID, pmmsg)) return SendClientMessage(playerid, COLOR_GRAY, "/pm [playerid] [message]");
format(str, sizeof(str), "[PM from [%d] %s]: %s", playerid, GetRoleplayName(playerid), pmmsg);
SendSplitMessage(pID, COLOR_YELLOW, str);

format(str, sizeof(str), "[PM to [%d] %s]: %s", pID, GetRoleplayName(pID), pmmsg);
SendSplitMessage(playerid, COLOR_YELLOW, str);
return 1;
}

Dont get what I'm saying? watch this screenie: http://prntscr.com/d1io4l
Reply
#2

I think what you're looking for is color embedding.
If that is the case - https://sampwiki.blast.hk/wiki/Colour_Embedding

One way of doing it:
PHP код:
New color[12]
If(
isadmin(sender)) color "FFFFFF" // admim color
else color "FFFFFF" // regular chat color
format(messagesizeof(message), "pm from {%s}%s{FFFFFF}: %s"colorgetname(..), text); // the {FFFFFF} oughtha be replaced w/ the actual pm color 
Wrote this on my phone

You can get the hex-colors here: http://www.colorpicker.com/
Reply
#3

Quote:
Originally Posted by jbankss
Посмотреть сообщение
I think what you're looking for is color embedding.
If that is the case - https://sampwiki.blast.hk/wiki/Colour_Embedding

One way of doing it:
PHP код:
New color[12]
If(
isadmin(sender)) color "FFFFFF" // admim color
else color "FFFFFF" // regular chat color
format(messagesizeof(message), "pm from {%s}%s{FFFFFF}: %s"colorgetname(..), text); // the {FFFFFF} oughtha be replaced w/ the actual pm color 
Wrote this on my phone

You can get the hex-colors here: http://www.colorpicker.com/
Exactly, thanks mate
Reply
#4

Quote:
Originally Posted by jbankss
Посмотреть сообщение
I think what you're looking for is color embedding.
If that is the case - https://sampwiki.blast.hk/wiki/Colour_Embedding

One way of doing it:
PHP код:
New color[12]
If(
isadmin(sender)) color "FFFFFF" // admim color
else color "FFFFFF" // regular chat color
format(messagesizeof(message), "pm from {%s}%s{FFFFFF}: %s"colorgetname(..), text); // the {FFFFFF} oughtha be replaced w/ the actual pm color 
Wrote this on my phone

You can get the hex-colors here: http://www.colorpicker.com/
nvm fixed
Reply
#5

Quote:
Originally Posted by jbankss
Посмотреть сообщение
I think what you're looking for is color embedding.
If that is the case - https://sampwiki.blast.hk/wiki/Colour_Embedding

One way of doing it:
PHP код:
New color[12]
If(
isadmin(sender)) color "FFFFFF" // admim color
else color "FFFFFF" // regular chat color
format(messagesizeof(message), "pm from {%s}%s{FFFFFF}: %s"colorgetname(..), text); // the {FFFFFF} oughtha be replaced w/ the actual pm color 
Wrote this on my phone

You can get the hex-colors here: http://www.colorpicker.com/
Not working, returning the same.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)