Hello,
For my insim when someone renames:
if (Connections[GetConnIdx(CPR.UCID)].PlayerName.StartsWith("^0[^1COP^0]"))
{
if (Connections[GetConnIdx(CPR.UCID)].Stat == 2)
{
InSim.Send_MTC_MessageToConnection("^2•^7 You are a On-Duty cop so FOLLOW THE RULES!", CPR.UCID, 0);
Connections[GetConnIdx(CPR.UCID)].IsOfficer = 1;
//ChaserUCID = Connections[GetConnIdx(CPR.UCID)].Username;
}
else
{
InSim.Send_MST_Message("/spec " + Connections[GetConnIdx(CPR.UCID)].Username);
InSim.Send_MTC_MessageToConnection("^1You are Not a Officer!", CPR.UCID, 0);
Connections[GetConnIdx(CPR.UCID)].IsOfficer = 0;
}
}
else
{
Connections[GetConnIdx(CPR.UCID)].IsOfficer = 0;
}
if (Connections[GetConnIdx(CPR.UCID)].PlayerName.StartsWith("^0[^2COP^0]"))
{
if (Connections[GetConnIdx(CPR.UCID)].Stat == 2)
{
InSim.Send_MTC_MessageToConnection("^2•^7 You are a On-Duty cop so FOLLOW THE RULES!", CPR.UCID, 0);
Connections[GetConnIdx(CPR.UCID)].IsCadet = 1;
}
else
{
InSim.Send_MST_Message("/spec " + Connections[GetConnIdx(CPR.UCID)].Username);
InSim.Send_MTC_MessageToConnection("^1You are Not a Cadet!", CPR.UCID, 0);
Connections[GetConnIdx(CPR.UCID)].IsCadet = 0;
}
}
else
{
Connections[GetConnIdx(CPR.UCID)].IsCadet = 0;
}
As a Cop This Popup Comes Up:
CODE FOR IT:
if (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].Chase == 1)
{
InSim.Send_BTN_CreateButton("^7Suspect: " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].Chase_Username, Flags.ButtonStyles.ISB_LIGHT, 5, 25, 7, 148, 22, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);
//Condition
InSim.Send_BTN_CreateButton("^7Condition: " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].Chase_Condition, Flags.ButtonStyles.ISB_CLICK | Flags.ButtonStyles.ISB_LIGHT, 5, 25, 12, 148, 23, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);
//Meters Away from Suspect
InSim.Send_BTN_CreateButton("^7Meters Away: " + Connections[GetConnIdx(Players[GetPlyIdx(ChaseeUCID)].UniqueID)].DistanceFromOfficer, Flags.ButtonStyles.ISB_LIGHT, 5, 25, 7, 173, 24, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);
//Speed
InSim.Send_BTN_CreateButton("^7Suspects Speed: 0KMH", Flags.ButtonStyles.ISB_LIGHT, 5, 25, 12, 173, 25, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);
}
else
{
//Suspect
InSim.Send_BTN_CreateButton("^7Suspect: None", Flags.ButtonStyles.ISB_LIGHT, 5, 25, 7, 148, 22, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);
//Condition
InSim.Send_BTN_CreateButton("^7Condition: None", Flags.ButtonStyles.ISB_LIGHT, 5, 25, 12, 148, 23, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);
//Meters Away from Suspect
InSim.Send_BTN_CreateButton("^7Meters Away: None", Flags.ButtonStyles.ISB_LIGHT, 5, 25, 7, 173, 24, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);
//Condition
InSim.Send_BTN_CreateButton("^7Suspects Speed: None", Flags.ButtonStyles.ISB_LIGHT, 5, 25, 12, 173, 25, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);
}
If you Ask the suspects speed,distance from officer don't really work.
ANYWAY
when I remove my cop tag and someone else puts a cop tag on I see the Start/End Chase Button but not the rest. The other player sees it all but not the start/stop chase button.
I have NO idea why it does that. Thanks
[DcS] stuntguy3000