how to make people see effects

10/07/2010 23:31 tomtucker#1
I made this command:

Code:
if (Cmd[0] == "/seffect")
                        {
                                GC.AddSend(Packets.String(GC.MyChar.EntityID, 10, Cmd[1]));
                        }
But other people can't see the effects when I send them off.

How can I do this?
10/08/2010 00:22 Macnoo#2
dont know about this as im still very new to coding but mite help you on the right path :)

Code:
if (Cmd[0] == "/seffect")
{
foreach (DictionaryEntry DE in Game.World.H_Chars)
{
Game.Character Chaar = (Game.Character)DE.Value;
if (Chaar.Name != GC.MyChar.Name)
{
Chaar.MyClient.AddSend(Packets.String(GC.MyChar.EntityID, 10, Cmd[1]));
}
}
GC.MyChar.MyClient.AddSend(Packets.String(GC.MyChar.EntityID, 10, Cmd[1]));
}
if its no help i think this has been asked befor try search mite find how in that..
10/08/2010 01:47 pro4never#3
You don't need that complecated a function. You need to send to all locally though (do a foreach, check dist to where you are and then send)
10/08/2010 02:08 tomtucker#4
I got it already. Thanks though.
10/08/2010 02:39 Macnoo#5
Quote:
Originally Posted by pro4never View Post
You don't need that complecated a function. You need to send to all locally though (do a foreach, check dist to where you are and then send)
pro4 Thanks

so you mean

Code:
if (Cmd[0]) 
{
foreach (Player)
{
if (check loc for within range)
send (Cmd[1])
}
}
@tomtucker :D
10/08/2010 03:54 tomtucker#6
sorry i thought i pressed thanks but it didnt work the first time, i pressed it
10/09/2010 01:28 Arcо#7
Quote:
Originally Posted by tomtucker View Post
#reported
Spam
Your post itself is as much spam as his was :rolleyes:

Anywho the source has this in it, learn to use it.
Code:
        public static bool InBox(double x1, double y1, double x2, double y2, byte Range)
        {
            return (Math.Max(Math.Abs(x1 - x2), Math.Abs(y1 - y2)) <= Range);
        }