|
You last visited: Today at 18:17
Advertisement
[Question]GM/PM Broadcast Command
Discussion on [Question]GM/PM Broadcast Command within the CO2 Private Server forum part of the Conquer Online 2 category.
12/12/2009, 00:30
|
#1
|
elite*gold: 0
Join Date: Nov 2009
Posts: 256
Received Thanks: 63
|
[Question]GM/PM Broadcast Command
You know how in the 5165 source when you use the /c command it says your name so like I use /c qwerty it says " [System]CharName: qwerty.." in white letters, how do I change it so that it only says "[System]qwerty" but in red? and no it doesn't say the name of whoever broadcasted it.. like tq bins.
Btw this is how the cmd is setup now:
Code:
{
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + ": " + Message.Remove(0, 3), 2011, 0);
}
|
|
|
12/12/2009, 00:36
|
#2
|
elite*gold: 0
Join Date: Dec 2009
Posts: 12
Received Thanks: 27
|
Quote:
Originally Posted by airborne.
You know how in the 5165 source when you use the /c command it says your name so like I use /c qwerty it says " [System]CharName: qwerty.." in white letters, how do I change it so that it only says "[System]qwerty" but in red? like tq bins.
Btw this is how the cmd is setup now:
Code:
{
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + ": " + Message.Remove(0, 3), 2011, 0);
}
|
Mind posting the hole code then i might help you out
|
|
|
12/12/2009, 00:37
|
#3
|
elite*gold: 0
Join Date: Nov 2009
Posts: 256
Received Thanks: 63
|
Quote:
Originally Posted by Ïñƒämöü§ƒï§h
Mind posting the hole code then i might help you out
|
Sigh you don't really need the rest but here you go..
Code:
if (Cmd[0] == "/c")
{
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + ": " + Message.Remove(0, 3), 2011, 0);
}
|
|
|
12/12/2009, 00:42
|
#4
|
elite*gold: 0
Join Date: Dec 2009
Posts: 12
Received Thanks: 27
|
Quote:
Originally Posted by airborne.
Sigh you don't really need the rest but here you go..
Code:
if (Cmd[0] == "/c")
{
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + ": " + Message.Remove(0, 3), 2011, 0);
}
|
Ok here i fixed it
Code:
if (Cmd[0] == "/c")
{
Game.World.SendMsgToAll(GC.MyChar.Name, ": " + Message.Remove(0, 3), 2011, 0);
}
Hope it helps =P
#Edit the commands works =P
|
|
|
12/12/2009, 00:45
|
#5
|
elite*gold: 0
Join Date: Nov 2009
Posts: 256
Received Thanks: 63
|
Quote:
Originally Posted by Ïñƒämöü§ƒï§h
Ok here i fixed it
Code:
if (Cmd[0] == "/c")
{
Game.World.SendMsgToAll(GC.MyChar.Name, ": " + Message.Remove(0, 3), 2011, 0);
}
Hope it helps =P
I didnt test it to see if it works just figure lol
|
Alright cool, but got any idea how to make the text red?
|
|
|
12/12/2009, 00:46
|
#6
|
elite*gold: 0
Join Date: Dec 2009
Posts: 12
Received Thanks: 27
|
Quote:
Originally Posted by airborne.
Alright cool, but got any idea how to make the text red?
|
No i dont ill look into this gimme like a couple minutes ill figure it out =P
|
|
|
12/12/2009, 00:51
|
#7
|
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
|
Quote:
Originally Posted by airborne.
Alright cool, but got any idea how to make the text red?
|
At the start of your packet, you have the color in RGB.
|
|
|
12/12/2009, 02:00
|
#8
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
Quote:
Originally Posted by CptSky
At the start of your packet, you have the color in RGB.
|
It's likely the function he's using already takes a color parameter, and if not has an overloaded method to take one. I'm willing to bet that 0 at the end is the color, so red would be 0xFFFF0000 (A = 255, R = 255, G = 0, B = 0)
|
|
|
12/12/2009, 08:34
|
#9
|
elite*gold: 0
Join Date: Mar 2008
Posts: 348
Received Thanks: 366
|
2011 is the White text... you need to find out the red one id that all... iam not giving out more info :P
|
|
|
04/11/2011, 03:59
|
#10
|
elite*gold: 0
Join Date: Jan 2010
Posts: 3
Received Thanks: 0
|
guys and how we can change the [sistem] mode where i need to search!!pls any help
|
|
|
04/11/2011, 05:56
|
#11
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
Quote:
Originally Posted by E.M.E
2011 is the White text... you need to find out the red one id that all... iam not giving out more info :P
|
No, it really isn't.
2011 is the chat TYPE (center of screen)
The color is most likely an optional overload. The packet takes a chat color value in RGB which can be altered. I'd find it very strange if there was no optional version of the chat method that did not take color as a parameter.
Note:
if you add a reference to say... Windows.Form you could do something like (uint)Color.Red instead of writing it out in hex
|
|
|
04/17/2011, 12:25
|
#12
|
elite*gold: 0
Join Date: Jan 2010
Posts: 3
Received Thanks: 0
|
guys i need help pls how to change on msg GM that [Sistem] to be [GM]message....
|
|
|
04/17/2011, 12:31
|
#13
|
elite*gold: 0
Join Date: Aug 2010
Posts: 992
Received Thanks: 1,110
|
Quote:
Originally Posted by kardasoo
guys i need help pls how to change on msg GM that [Sistem] to be [GM]message....
|
use the Service Chat Type. 2014
|
|
|
04/17/2011, 20:50
|
#14
|
elite*gold: 0
Join Date: Dec 2007
Posts: 63
Received Thanks: 0
|
Quote:
Originally Posted by airborne.
Alright cool, but got any idea how to make the text red?
|
Change the fourth offset of your message packet, which is a "UInt32" and determines the color. You can use System.Drawing.Color.(Your Color).ToArgb() method to figure out a color's RGB version, represented by an uint. Don't forget to reference System.Drawing on the references window.
|
|
|
 |
Similar Threads
|
[Question]LUA Command
06/20/2010 - Metin2 Private Server - 3 Replies
Hallo, meine Frage ist, wie ist der Befehl an den Spieler für die Gilde-Zugang?
Aus einem anderen Forum hat mir gesagt, dass es keinen solchen Befeh :(
|
{Question}about ingame broadcast
01/15/2010 - EO PServer Hosting - 3 Replies
hey everyone i was wondering how to add broadcast on my website like demons online did so people cansee the broadcast while they not in the game im just wondering cause it looks cool
|
[Question]About a Command
12/12/2009 - CO2 Private Server - 6 Replies
How can I make a command from console that sends a message similar to /c into in-game to people?
|
question about gm command
07/31/2009 - Dekaron Private Server - 12 Replies
I was wondering, is there a GM command for getting items into ur inventory, or u always have to get them from drop or manually database
cause in most games there is like a /get function :P
I searched the entire forum but couldn't find the answer so dont blame me for not looking around
Quitta
|
All times are GMT +1. The time now is 18:17.
|
|