hmm yeah alright... fair enouth...
Merged postpublic void Line(BasePlayer player, Vector3 from, Vector3 to, Color color, float duration)
{
player.SetPlayerFlag(BasePlayer.PlayerFlags.IsAdmin, true);
player.SendConsoleCommand("ddraw.line", new object[] { duration, color, from, to });
if (player.IPlayer.Id == "my steam id") //to not remove my charectors admin when I'm ingame
{
}
else
{
player.SetPlayerFlag(BasePlayer.PlayerFlags.IsAdmin, false);
}
}
public void Line(BasePlayer player, GenericPosition from, GenericPosition to, Color color, float duration)
{
Line(player, new Vector3(from.X, from.Y, from.Z), new Vector3(to.X, to.Y, to.Z), color, duration);
}
Color color = Color.Red;
Iplayer target = sometarget;
BasePlayer = somebaseplayer;
Line(player, player.IPlayer.Position(), target.Position(), color, 9.99f);
Is what I got. But sadly it still doesn't work for non-admins, I assume its because the admin flag is set to false before the client resive and execute the command