Szerző Téma: Sebességmérõ  (Megtekintve 578 alkalommal)

]XziBiT[

  • Vendég
Sebességmérõ
« Dátum: 2011. november 17. - 14:27:44 »
0 Show voters
Ü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 +!

Nem elérhető Sramm

  • 596
    • Profil megtekintése
Sebességmérõ
« Válasz #1 Dátum: 2011. november 17. - 14:29:25 »
0 Show voters
Ezzel semmi baj, nekem az egész forráskód kell ...

Nem elérhető Pedró

  • 3341
  • 2014 © Az év Szkriptere
    • Profil megtekintése
Sebességmérõ
« Válasz #2 Dátum: 2011. november 17. - 14:57:57 »
+1 Show voters
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;
}

]XziBiT[

  • Vendég
Sebességmérõ
« Válasz #3 Dátum: 2011. november 17. - 15:11:26 »
0 Show voters
Kösz nagyon. megy a + zárok!

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal