Posts: 63
Threads: 16
Joined: Nov 2012
Reputation:
0
Hey Community,
Last few Days i was very insterested if its possible to add a new color to Mw3 Ingame Chat with a new tag like ^. or ^, or something else for Admins and Mods.
So a color which you can only use if you get the Permission. If this isnt possible , will it be possible to disallow normal Player to use a specified color?
THX in Advice
Posts: 245
Threads: 79
Joined: Feb 2013
(12-31-2013, 12:31)Hallla Wrote: Hey Community,
Last few Days i was very insterested if its possible to add a new color to Mw3 Ingame Chat with a new tag like ^. or ^, or something else for Admins and Mods.
So a color which you can only use if you get the Permission. If this isnt possible , will it be possible to disallow normal Player to use a specified color?
THX in Advice no, not possible
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
12-31-2013, 14:15
(This post was last modified: 12-31-2013, 14:21 by Nekochan.)
It's possible, you are noob, learn English please, tony.
You can get necessary person by his XUID.
Example:
Code: Put this to OnSay:
if(Client.XUID == "person's xuid")
{
ServerSay(string.Format("^2{0}^7: {1}", Client.Name, Message), true);
return ChatType.None; // remove uncolored one
}
Replace '^2' by another colors. No need to add 'else', another players will get default colors.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Posts: 63
Threads: 16
Joined: Nov 2012
Reputation:
0
Sailor how its possible? adding a new color? any idea for a code ?
PLS Help me
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
(12-31-2013, 14:16)Hallla Wrote: Sailor how its possible? adding a new color? any idea for a code ?
PLS Help me
Read previous post again, I've updated it.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Posts: 245
Threads: 79
Joined: Feb 2013
12-31-2013, 14:48
(This post was last modified: 12-31-2013, 14:54 by [HARD] Tony..)
(12-31-2013, 14:24)SailorMoon Wrote: (12-31-2013, 14:16)Hallla Wrote: Sailor how its possible? adding a new color? any idea for a code ?
PLS Help me
Read previous post again, I've updated it. it you should learn English as you don't understand that it wants.
russian text
Posts: 299
Threads: 1
Joined: Aug 2013
Reputation:
10
(12-31-2013, 14:15)SailorMoon Wrote: It's possible, you are noob, learn English please, tony.
You can get necessary person by his XUID.
Example:
Code: Put this to OnSay:
if(Client.XUID == "person's xuid")
{
ServerSay(string.Format("^2{0}^7: {1}", Client.Name, Message), true);
return ChatType.None; // remove uncolored one
}
Replace '^2' by another colors. No need to add 'else', another players will get default colors.
@SailorMoon, He wants to add more "New" Colors.
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
I think he meant by 'new colors' not something like ^24, ^31 etc.. he wants to replace default white/blue/red/green ones.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Posts: 63
Threads: 16
Joined: Nov 2012
Reputation:
0
yeah thats right i want neon green for example . I hope you know what i mean ;D
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
12-31-2013, 15:36
(This post was last modified: 12-31-2013, 15:44 by Nekochan.)
(12-31-2013, 15:30)Hallla Wrote: yeah thats right i want neon green for example . I hope you know what i mean ;D
Well sorry, I was wrong buuuuut...
It's possible.
TL;DR
But "a bit" harder. Just add 'return ChatType.None' or You can move away chat from screen and make custom one via HUD elements. That shouldn't be that hard, but it will look even better. ( like glowing, effects etc ) <- That will be level hud so it won't crash your game or server. I tried to make something like that in my mw2 rotu mod.
Example:
This struct would look like
Code: struct playerchat
{
uint time;
string words;
int colorR;
int colorG;
int colorB;
// add glow etc
}
When he types something just do:
playerchat s = new playerchat();
// and add this to hud elem ARRAY! and move
Liiikeee:
Fade out here and move down ( also scale if you needed )
|
Player: something said
|
Fade in here and move up
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
|