Hi all!
I have a problem with a ticket:
All is ok, but when I'm Disconnect and Connect I can buy ticket :/
I want to make a 3 hours, with a disconnect and connect work.
Sry for my bad english.
I have a problem with a ticket:
case "!ticket":
if (Connections[GetConnIdx(MSO.UCID)].InLotto == 1 && Environment.TickCount - Connections[GetConnIdx(MSO.UCID)].LastLotto > 1296000) //3 hours
{
Connections[GetConnIdx(MSO.UCID)].Cash -= 50;
int prize = new Random().Next(0, 2000);
Connections[GetConnIdx(MSO.UCID)].Prize += prize;
Connections[GetConnIdx(MSO.UCID)].Cash += Connections[GetConnIdx(MSO.UCID)].Prize;
InSim.Send_MTC_MessageToConnection("^5>^7You have received ^2€" + Connections[GetConnIdx(MSO.UCID)].Prize + " ^7from Lotto", MSO.UCID, 0);
Connections[GetConnIdx(MSO.UCID)].LastLotto = Environment.TickCount;
}
else if (Environment.TickCount - Connections[GetConnIdx(MSO.UCID)].LastLotto < 1296000)
{
InSim.Send_MTC_MessageToConnection("^6>You have to wait ^73 ^6hours to buy another one!", MSO.UCID, 0);
Connections[GetConnIdx(MSO.UCID)].InLotto = 1;
}
else
{
Connections[GetConnIdx(MSO.UCID)].InLotto = 0;
}
Connections[GetConnIdx(MSO.UCID)].Lotto = 0;
Connections[GetConnIdx(MSO.UCID)].LastLotto = Environment.TickCount;
break;
All is ok, but when I'm Disconnect and Connect I can buy ticket :/
I want to make a 3 hours, with a disconnect and connect work.
Sry for my bad english.