PDA

View Full Version : Bonus driving help


kdo
1st November 2011, 08:48
Hello, i do this :

if (Connections[GetConnIdx(NPL.UCID)].DistanceSincePit >= 20)
{
Connections[GetConnIdx(NPL.UCID)].Cash += 2500;
InSim.Send_MST_Message("/msg ^6•^8 " + Connections[GetConnIdx(NPL.UCID)].PlayerName + " ^7received ^6€2500");
InSim.Send_MST_Message("/msg ^6•^2 Reason:^7 Distance bonus");
Connections[GetConnIdx(NPL.UCID)].DistanceSincePit = 0;
}

But it won't work! if i do "DistanceSincePit >=0" i got the bonus.
for be sure the distancesincepit counter work i add

Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].DistanceSincePit += Convert.ToInt32(SpeedMS);

on the km counter, and i have add in showoff

Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].DistanceSincePit
when i drive and i type !showoff, i can see the distance i do since pit, it work, but not the bonus !

How to correct it ?

Azzano62
1st November 2011, 09:51
You will need to do. distancesincepit > 2000

kdo
1st November 2011, 10:24
Not working