Local chat command for special - 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: Local chat command for special (
/showthread.php?tid=620612)
Local chat command for special -
DemME - 01.11.2016
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
Re: Local chat command for special -
jbankss - 01.11.2016
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(message, sizeof(message), "pm from {%s}%s{FFFFFF}: %s", color, getname(..), 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/
Re: Local chat command for special -
DemME - 01.11.2016
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(message, sizeof(message), "pm from {%s}%s{FFFFFF}: %s", color, getname(..), 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
Re: Local chat command for special -
DemME - 01.11.2016
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(message, sizeof(message), "pm from {%s}%s{FFFFFF}: %s", color, getname(..), 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
Re: Local chat command for special -
DemME - 01.11.2016
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(message, sizeof(message), "pm from {%s}%s{FFFFFF}: %s", color, getname(..), 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.