28.06.2015, 19:43
Chat name color.
28.06.2015, 19:51
In OnPlayerText, format your own chat messages and simply add a color code (either using the RGBA in the client message, or the ~{RGB}~ in the client message. Make sure you return 0 (zero) to prevent the default text from being sent.
https://sampwiki.blast.hk/wiki/OnPlayerText
https://sampwiki.blast.hk/wiki/OnPlayerText
28.06.2015, 19:54
I find, i make but now i want to say "NiTr3X [ID:%d] say:" but i don't know how to make...
PHP код:
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "{1AD6C4}%s spune:{FFFFFF} %s", sendername, text);
if(PlayerInfo[playerid][pAdmin] >= 1) SetPlayerChatBubble(playerid, string, 0xFFFF66FF, 20.0, 10000);
if(PlayerInfo[playerid][pHelper] >= 1) SetPlayerChatBubble(playerid, string, 0xa9c4e4FF, 20.0, 10000);
ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
28.06.2015, 20:03
Ah you want to add the player ID?
Simply add the '[ID: %d]' after the first '%s', and after the sendername (inside the format command), add 'playerid'. Quite easy..
Also, I'm not sure if you want especially for you a different color, but it won't work this way. The colours defined in SetPlayerChatBubble/ProxDetector (which eventually is just a SendClientMessage(*)) are overrided by the color codes in the format/text[] string. What you then could do, is add an extra if statement which checks if the 'sendername' is "NiTr3X" (using strcmp) and then create a total new format with different colours.
Simply add the '[ID: %d]' after the first '%s', and after the sendername (inside the format command), add 'playerid'. Quite easy..
Also, I'm not sure if you want especially for you a different color, but it won't work this way. The colours defined in SetPlayerChatBubble/ProxDetector (which eventually is just a SendClientMessage(*)) are overrided by the color codes in the format/text[] string. What you then could do, is add an extra if statement which checks if the 'sendername' is "NiTr3X" (using strcmp) and then create a total new format with different colours.
28.06.2015, 20:14
Thank you + rep
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)