Szerző Téma: SpeedoMeter  (Megtekintve 592 alkalommal)

Nem elérhető Nátha

  • 1036
    • Profil megtekintése
SpeedoMeter
« Dátum: 2012. Augusztus 21. - 23:46:46 »
0 Show voters
Sziasztok
Valaki be linkelné nekem a képen látható SpeedoMeter scriptet ? Már mindenhol kerestem sehol sem találom.
Kép:
http://kep.psharing.com/674920.jpg
Elõre is köszönöm

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
SpeedoMeter
« Válasz #1 Dátum: 2012. Augusztus 22. - 00:04:26 »
+1 Show voters
Régóta megvan nekem, lehet bugos nem tudom..
 
#include <a_samp>
enum td
{
Text:TDSpeedClock[15]
}
new TextDraws[td];
new Text:TextDrawsd[MAX_PLAYERS][4];
public OnFilterScriptInit()
{
print(\"Kolowy licznik predkosci zaladowany\");
TextDraws[TDSpeedClock][0] = TextDrawCreate(496.000000,400.000000,\"~r~20\");
TextDraws[TDSpeedClock][1] = TextDrawCreate(487.000000,388.000000,\"~r~40\");
TextDraws[TDSpeedClock][2] = TextDrawCreate(483.000000,375.000000,\"~r~60\");
TextDraws[TDSpeedClock][3] = TextDrawCreate(488.000000,362.000000,\"~r~80\");
TextDraws[TDSpeedClock][4] = TextDrawCreate(491.000000,349.000000,\"~r~100\");
TextDraws[TDSpeedClock][5] = TextDrawCreate(508.000000,336.500000,\"~r~120\");
TextDraws[TDSpeedClock][6] = TextDrawCreate(536.000000,332.000000,\"~r~140\");
TextDraws[TDSpeedClock][7] = TextDrawCreate(567.000000,337.000000,\"~r~160\");
TextDraws[TDSpeedClock][8] = TextDrawCreate(584.000000,348.000000,\"~r~180\");
TextDraws[TDSpeedClock][9] = TextDrawCreate(595.000000,360.000000,\"~r~200\");
TextDraws[TDSpeedClock][10] = TextDrawCreate(603.000000,374.000000,\"~r~220\");
TextDraws[TDSpeedClock][11] = TextDrawCreate(594.000000,386.000000,\"~r~240\");
TextDraws[TDSpeedClock][14] = TextDrawCreate(585.000000,399.000000,\"~r~260\");
TextDraws[TDSpeedClock][12] = TextDrawCreate(534.000000,396.000000,\"~r~/ \\\\\");
TextDrawLetterSize(TextDraws[TDSpeedClock][12], 1.059999, 2.100000);
TextDraws[TDSpeedClock][13] = TextDrawCreate(548.000000,401.000000,\".\");
TextDrawLetterSize(TextDraws[TDSpeedClock][13], 0.73, -2.60);
TextDrawSetOutline(TextDraws[TDSpeedClock][13], 0);
TextDrawSetShadow(TextDraws[TDSpeedClock][13], 1);
TextDrawSetShadow(TextDraws[TDSpeedClock][14], 0);
for(new i; i < 13; i++)
   TextDrawSetShadow(TextDraws[TDSpeedClock], 0);
 
return 1;
}
public OnFilterScriptExit()
{
print(\"Kolowy licznik predkosci odlaczony\");
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
for(new i; i < 15; i++)
   TextDrawShowForPlayer(playerid, TextDraws[TDSpeedClock]);
for(new i; i < 4; i++)
        TextDrawsd[playerid] = TextDrawCreate(555.0, 402.0, \"~b~.\");
}
else
{
for(new i; i < 4; i++)
    TextDrawHideForPlayer(playerid, TextDrawsd[playerid]);
for(new i; i < 15; i++)
   TextDrawHideForPlayer(playerid, TextDraws[TDSpeedClock]);
}
return 1;
}
public OnPlayerUpdate(playerid)
{
new
    Float:fPos[3],
    Float:Pos[4][2],
    Float:fSpeed;
   
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
GetVehicleVelocity(GetPlayerVehicleID(playerid), fPos[0], fPos[1], fPos[2]);
fSpeed = floatsqroot(floatpower(fPos[0], 2) + floatpower(fPos[1], 2) +
 floatpower(fPos[2], 2)) * 200;
new Float:alpha = 320 - fSpeed;
for(new i; i < 4; i++)
{
    TextDrawHideForPlayer(playerid, TextDrawsd[playerid]);
    TextDrawDestroy(TextDrawsd[playerid]);
        GetDotXY(548, 401, Pos[0], Pos[1], alpha, (i + 1) * 8);
        TextDrawsd[playerid] = TextDrawCreate(Pos[0], Pos[1], \"~b~.\");
           TextDrawLetterSize(TextDrawsd[playerid], 0.73, -2.60);
   TextDrawSetOutline(TextDrawsd[playerid], 0);
   TextDrawSetShadow(TextDrawsd[playerid], 1);
   TextDrawShowForPlayer(playerid, TextDrawsd[playerid]);
}
}
 
return 1;
}
stock GetDotXY(Float:StartPosX, Float:StartPosY, &Float:NewX, &Float:NewY, Float:alpha, Float:dist)
{
 NewX = StartPosX + (dist * floatsin(alpha, degrees));
 NewY = StartPosY + (dist * floatcos(alpha, degrees));
}

Nem elérhető Nátha

  • 1036
    • Profil megtekintése
SpeedoMeter
« Válasz #2 Dátum: 2012. Augusztus 22. - 10:25:21 »
0 Show voters
Igen ez az, de a színét azt hol tudom állítani ? Mert nekem full pirosak a számok és nekem azok zöldbe kellenének, mint a képen.
Nem szóltam, már meg van !  :D
Még egyszer kösz a segítséget !  ;)
« Utoljára szerkesztve: 2012. Augusztus 22. - 10:34:33 írta Nátha »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal