Hi!
Can you give me a code for detect AI in C# .NET?
I can't found code for this.
Can you give me a code for detect AI in C# .NET?
I can't found code for this.
if(NPL.PType & 2)
[COLOR=SeaGreen] // A player joins the race. If PLID already exists, then player leaves pit.[/COLOR]
[COLOR=Blue]private void[/COLOR] NPL_PlayerJoinsRace(Packets.IS_NPL NPL)
{
[COLOR=Blue] bool[/COLOR] LeavesPits = AddToPlayersList(NPL); [COLOR=SeaGreen]// Update Players[] list[/COLOR]
[COLOR=Blue]if [/COLOR](NPL.PType.Equals(6))
{
InSim.Send_MST_Message([COLOR=DarkOrange]"/spec "[/COLOR] + NPL.PName);
InSim.Send_MTC_MessageToConnection([COLOR=DarkOrange]"^3#^1 It isnt allowed to add AI drivers"[/COLOR], NPL.UCID, NPL.PLID);
}
[COLOR=SeaGreen] // Your code here[/COLOR]
}
byte PType; // bit 0 : female / bit 1 : AI / bit 2 : remote
[COLOR=SeaGreen] // A player joins the race. If PLID already exists, then player leaves pit.[/COLOR]
[COLOR=Blue]private void[/COLOR] NPL_PlayerJoinsRace(Packets.IS_NPL NPL)
{
[COLOR=Blue] bool[/COLOR] LeavesPits = AddToPlayersList(NPL); [COLOR=SeaGreen]// Update Players[] list[/COLOR]
[COLOR=Blue]if [/COLOR]((NPL.PType.Equals(2)) || (NPL.PType.Equals(3)) || (NPL.PType.Equals(6)) || (NPL.PType.Equals(7)))
{
InSim.Send_MST_Message([COLOR=DarkOrange]"/spec "[/COLOR] + NPL.PName);
InSim.Send_MTC_MessageToConnection([COLOR=DarkOrange]"^3#^1 It isnt allowed to add AI drivers"[/COLOR], NPL.UCID, NPL.PLID);
}
[COLOR=SeaGreen] // Your code here[/COLOR]
}
if (NPL.PType & 2)
if(NPL.PType & 2 > 0)
if (Convert.ToBoolean(NPL.PType & 2))
if ((npl.PType & 2) == 2)
{
// Pass
}