25.02.2013, 09:56
remove ur old and add this.
and here is
PHP Code:
stock GetPlayerSpeed(playerID)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerID))
GetVehicleVelocity(GetPlayerVehicleID(playerID),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerID,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 200.28625;
return floatround(ST[3]);
}
PHP Code:
format(STRINGSPPEED,50,"* Speed: %f", GetPlayerSpeed(playerID));