I need help with some codes in Cruise inSim.
1.So I wanted to get the command that disable all buttons on screen. For example I write !hide and all buttons are hiddden like cash, cars, Kms.
2. How can I make these jobs to go random places? They are all to 1 place only.
Waiting for answers
1.So I wanted to get the command that disable all buttons on screen. For example I write !hide and all buttons are hiddden like cash, cars, Kms.
2. How can I make these jobs to go random places? They are all to 1 place only.
case "!job":
if (StrMsg.Length == 1)
{
if (Connections[GetConnIdx(MSO.UCID)].JobToKinderGarten == 1 || Connections[GetConnIdx(MSO.UCID)].JobToFrank == 1 || Connections[GetConnIdx(MSO.UCID)].JobToLarry == 1 || Connections[GetConnIdx(MSO.UCID)].JobToJosh == 1 || Connections[GetConnIdx(MSO.UCID)].JobToPeter == 1)
{
InSim.Send_MTC_MessageToConnection("^1 Vienlaikus tu vari darit tikai vienu darbu!", Connections[GetConnIdx(MSO.UCID)].UniqueID, 0);
}
else if (Connections[GetConnIdx(MSO.UCID)].InShop == 1)
{
int Jobnum = new Random().Next(1, 8);
if (Jobnum == 1 || Jobnum == 5)
{
InSim.Send_MST_Message("/msg ^6> ^1 " + (Connections[GetConnIdx(MSO.UCID)].PlayerName) + " ^6Apstiprina darbu!");
InSim.Send_MTC_MessageToConnection("^6> Nogadat picu uz Simpsonu maju!", Connections[GetConnIdx(MSO.UCID)].UniqueID, 0);
Connections[GetConnIdx(MSO.UCID)].JobToJosh = 1;
}
if (Jobnum == 2 || Jobnum == 6)
{
InSim.Send_MST_Message("/msg ^6> ^1 " + (Connections[GetConnIdx(MSO.UCID)].PlayerName) + " ^6Apstiprina darbu!");
InSim.Send_MTC_MessageToConnection("^6> Nogadat picu uz ^2Autoservisu!", Connections[GetConnIdx(MSO.UCID)].UniqueID, 0);
Connections[GetConnIdx(MSO.UCID)].JobToPeter = 1;
}
if (Jobnum == 3 || Jobnum == 7)
{
InSim.Send_MST_Message("/msg ^6> ^1 " + (Connections[GetConnIdx(MSO.UCID)].PlayerName) + " ^6Apstiprina darbu!");
InSim.Send_MTC_MessageToConnection("^6> Nogadat picu uz KEN BLOCK DRIFT LAUKUMU!!", Connections[GetConnIdx(MSO.UCID)].UniqueID, 0);
Connections[GetConnIdx(MSO.UCID)].JobToFrank = 1;
}
if (Jobnum == 4 || Jobnum == 8)
{
InSim.Send_MST_Message("/msg ^6> ^1 " + (Connections[GetConnIdx(MSO.UCID)].PlayerName) + " ^6Apstiprina darbu!");
InSim.Send_MTC_MessageToConnection("^6> Nogadat picu uz striptiza namu!", Connections[GetConnIdx(MSO.UCID)].UniqueID, 0);
Connections[GetConnIdx(MSO.UCID)].JobToLarry = 1;
}
}
else if (Connections[GetConnIdx(MSO.UCID)].InFrank == 1 || Connections[GetConnIdx(MSO.UCID)].InJosh == 1 || Connections[GetConnIdx(MSO.UCID)].InPeter == 1 || Connections[GetConnIdx(MSO.UCID)].InLarry == 1)
{
InSim.Send_MST_Message("/msg ^6> ^1 " + (Connections[GetConnIdx(MSO.UCID)].PlayerName) + " ^6Apstiprina darbu!");
InSim.Send_MTC_MessageToConnection("^6> Nogadat bernu uz Esential Clubu!", Connections[GetConnIdx(MSO.UCID)].UniqueID, 0);
Connections[GetConnIdx(MSO.UCID)].JobToKinderGarten = 1;
}
}
else
{
InSim.Send_MTC_MessageToConnection("^1Nepareiza komada. Ludzu skaties ^2!help^7 komandu saraksta", MSO.UCID, 0);
}
break;
Waiting for answers