BBCODE in SAMP - 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: BBCODE in SAMP (
/showthread.php?tid=644392)
BBCODE in SAMP -
Auri - 06.11.2017
Hallo, I asking how to create in OnPlayerText BBCODE
I use {FF000}** hi hi **
Result
Henryk what's up
** hi hi **
Re: BBCODE in SAMP -
Kane - 06.11.2017
You can use a string replace function everytime {FF0000} is used in chat.
Re: BBCODE in SAMP -
Kraeror - 07.11.2017
Try something like that:
PHP код:
new string[256], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s: %s {FF0000}**hi hi**", name, text);
SendClientMessageToAll(0xFFFFFFFF,string);
EDITED: Don't forget
return 0; in Your OnPlayerText callback!
Re: BBCODE in SAMP -
Auri - 07.11.2017
The more I like something like it is on the forum
So I write something in the chat Example:
Will you help me? < smile >
And it looks so:
Will you help me?
* smile *
Re: BBCODE in SAMP -
Lucases - 08.11.2017
Quote:
Originally Posted by Auri
The more I like something like it is on the forum
So I write something in the chat Example:
Will you help me? < smile >
And it looks so:
Will you help me? * smile *
|
I know what you meant, but that needs scripting. You should find " [COLOR] " tags in their message and then appy the color.