Hello
I have a problem with my InSim, so I have this code:
...and other admin / moderator can add distance, than it is written in code "(Conn.Username ==" Andi1999 ")"
I tried to delete the code, but then I can not add any distance
What can I do to be able to add all admins / moderators distance?
Sorry for my bad english :/
I have a problem with my InSim, so I have this code:
[Command("refdist", "refdist <distance> <username>")]
public void refdist(string Msg, string[] StrMsg, Packets.IS_MSO MSO)
{
var Conn = Connections[GetConnIdx(MSO.UCID)];
if (StrMsg.Length > 2)
{
if (Conn.IsAdmin == 1 && Conn.IsSuperAdmin == 1 && Conn.IsModerator == 1 || Conn.Username == "Andi1999")
{
string Username = Msg.Remove(0, StrMsg[0].Length + StrMsg[1].Length + 2);
bool Found = false;
int Amount = int.Parse(StrMsg[1]);
try
{
if (Amount.ToString().Contains("-"))
{
MsgPly("^7» Input Invalid. Don't use minus on the Values!", MSO.UCID);
}
else
{
#region ' Online '
foreach (clsConnection i in Connections)
{
if (i.Username == Username)
{
Found = true;
MsgAll("^7» " + i.NoColPlyName + " (" + i.Username + ") was refunded in Distance");
MsgAll("^7»Refunded by: " + Conn.NoColPlyName + " (" + Conn.Username + ")");
MsgAll("^7»Refund Distance: ^2" + Amount + " km");
i.TotalDistance += Amount * 1000;
}
}
#endregion
...and other admin / moderator can add distance, than it is written in code "(Conn.Username ==" Andi1999 ")"
I tried to delete the code, but then I can not add any distance
What can I do to be able to add all admins / moderators distance?
Sorry for my bad english :/