Changing mph to kmh
#3

public StoppedVehicle()
{
new Float,Float:y,Float:z;
new Float:distance,value;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInAnyVehicle(i))
{
new VID;
VID = GetPlayerVehicleID(i);
GetPlayerPos(i, x, y, z);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePla yerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
value = floatround(distance * 3600);
if(UpdateSeconds > 1)
{
value = floatround(value / UpdateSeconds);
}
if(SpeedMode)
{
}
if(value == 0)
{
Gas[VID]++;
}
SavePlayerPos[i][LastX] = x;
SavePlayerPos[i][LastY] = y;
SavePlayerPos[i][LastZ] = z;
}
}
}
return 1;
}
Reply


Messages In This Thread
Changing mph to kmh - by Chivava - 05.02.2010, 19:52
Re: Changing mph to kmh - by MadeMan - 05.02.2010, 20:09
Re: Changing mph to kmh - by Chivava - 05.02.2010, 21:06

Forum Jump:


Users browsing this thread: 1 Guest(s)