GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: ]XziBiT[ - 2011. november 17. - 14:27:44

Cím: Sebességmérõ
Írta: ]XziBiT[ - 2011. november 17. - 14:27:44
ÜDv all!
 
stock GetPlayerSpeed(playerid)
{
new speed;
if(!IsPlayerInAnyVehicle(playerid)) return -1;
new Float:VelocityX;
new Float:VelocityY;
new Float:VelocityZ;
GetVehicleVelocity(GetPlayerVehicleID(playerid),VelocityX,VelocityY,VelocityZ);
speed = floatround(floatpower((VelocityX*VelocityX)+(VelocityY*VelocityY)+(VelocityZ*VelocityZ),0.5)*125);
return speed;
}

 
Van ez a sebességmérõ stock-om és az lenne a kérésem, hogy valaki beállítaná, hogy gyorsan mérjen és pontosan?
Aki segít meg a +!
Cím: Sebességmérõ
Írta: Sramm - 2011. november 17. - 14:29:25
Ezzel semmi baj, nekem az egész forráskód kell ...
Cím: Sebességmérõ
Írta: Pedró - 2011. november 17. - 14:57:57
stock GetPlayerSpeed(playerid)
{
new speed;
if(!IsPlayerInAnyVehicle(playerid)) return -1;
new Float:VelocityX;
new Float:VelocityY;
new Float:VelocityZ;
GetVehicleVelocity(GetPlayerVehicleID(playerid),VelocityX,VelocityY,VelocityZ);
speed = floatround(floatpower((VelocityX*VelocityX)+(VelocityY*VelocityY)+(VelocityZ*VelocityZ),0.5)*217.5);
return speed;
}
Cím: Sebességmérõ
Írta: ]XziBiT[ - 2011. november 17. - 15:11:26
Kösz nagyon. megy a + zárok!