sure i know how to change the key. i have another problem.
PHP Code:
speed = vector_length(velocity)
new Float:real_drehzahl
if( speed == 0.0)
{
//emit_sound( 0 ,CHAN_ITEM, "rally/drehzahl.wav", 1.0, ATTN_NORM, 0, PITCH_HIGH);
client_cmd(0,"spk rally/drehzahl")
gang = 0
drehzahl = 1000.0
if(g_y >= 5.0)
{
real_drehzahl = 1000.0 - g_y
}
else
{
real_drehzahl = 1000.0 + g_y
}
}
if( speed >= 0.1 && speed <= 100.0)
{
gang = 1
drehzahl = 1000.0
if(speed >= 1.0 && speed <= 10.0)
{
real_drehzahl = drehzahl + 130
}
else if(speed >=11.0 && speed <= 20.0)
{
real_drehzahl = drehzahl + 260
}
else if(speed >=21.0 && speed <= 30.0)
{
real_drehzahl = drehzahl + 308
}
else if(speed >=31.0 && speed <= 40.0)
{
real_drehzahl = drehzahl + 405
}
else if(speed >=41.0 && speed <= 50.0)
{
real_drehzahl = drehzahl + 540
}
else if(speed >=51.0 && speed <= 60.0)
{
real_drehzahl = drehzahl + 680
}
else if(speed >=61.0 && speed <= 70.0)
{
real_drehzahl = drehzahl + 701
}
else if(speed >=71.0 && speed <= 80.0)
{
real_drehzahl = drehzahl + 803
}
else if(speed >=81.0 && speed <= 90.0)
{
real_drehzahl = drehzahl + 909
}
else if(speed >=91.0 && speed <= 100.0)
{
real_drehzahl = drehzahl + 1050
}
}
else if( speed >= 101.0 && speed <= 200.0)
{
gang = 2
drehzahl = 2000.0
if(g_y >= 5.0)
{
real_drehzahl = 2000.0 - g_y
}
else
{
real_drehzahl = 2000.0 + g_y
}
if(speed >= 101.0 && speed <= 100.0)
{
real_drehzahl = drehzahl + 130
}
else if(speed >=110.0 && speed <= 120.0)
{
real_drehzahl = drehzahl + 260
}
else if(speed >=121.0 && speed <= 130.0)
{
real_drehzahl = drehzahl + 308
}
else if(speed >=131.0 && speed <= 140.0)
{
real_drehzahl = drehzahl + 405
}
else if(speed >=141.0 && speed <= 150.0)
{
real_drehzahl = drehzahl + 540
}
else if(speed >=151.0 && speed <= 160.0)
{
real_drehzahl = drehzahl + 680
}
else if(speed >=161.0 && speed <= 170.0)
{
real_drehzahl = drehzahl + 701
}
else if(speed >=171.0 && speed <= 180.0)
{
real_drehzahl = drehzahl + 803
}
else if(speed >=181.0 && speed <= 190.0)
{
real_drehzahl = drehzahl + 909
}
else if(speed >=191.0 && speed <= 200.0)
{
real_drehzahl = drehzahl + 1050
}
}
else if( speed >= 201.0 && speed <= 300.0)
{
gang = 3
drehzahl = 3000.0
if(g_y >= 5.0)
{
real_drehzahl = 3000.0 - g_y
}
else
{
real_drehzahl = 3000.0 + g_y
}
if(speed >= 201.0 && speed <= 210.0)
{
real_drehzahl = drehzahl + 130
}
else if(speed >=211.0 && speed <= 220.0)
{
real_drehzahl = drehzahl + 260
}
else if(speed >=221.0 && speed <= 230.0)
{
real_drehzahl = drehzahl + 308
}
else if(speed >=231.0 && speed <= 240.0)
{
real_drehzahl = drehzahl + 405
}
else if(speed >=241.0 && speed <= 250.0)
{
real_drehzahl = drehzahl + 540
}
else if(speed >=251.0 && speed <= 260.0)
{
real_drehzahl = drehzahl + 680
}
else if(speed >=261.0 && speed <= 270.0)
{
real_drehzahl = drehzahl + 701
}
else if(speed >=271.0 && speed <= 280.0)
{
real_drehzahl = drehzahl + 803
}
else if(speed >=281.0 && speed <= 290.0)
{
real_drehzahl = drehzahl + 909
}
else if(speed >=291.0 && speed <= 300.0)
{
real_drehzahl = drehzahl + 1050
}
}
else if( speed >= 301.0 && speed <= 400.0)
{
gang = 4
drehzahl = 4000.0
if(g_y >= 5.0)
{
real_drehzahl = 4000.0 - g_y
}
else
{
real_drehzahl = 4000.0 + g_y
}
if(speed >= 301.0 && speed <= 310.0)
{
real_drehzahl = drehzahl + 130
}
else if(speed >=311.0 && speed <= 320.0)
{
real_drehzahl = drehzahl + 260
}
else if(speed >=321.0 && speed <= 330.0)
{
real_drehzahl = drehzahl + 308
}
else if(speed >=331.0 && speed <= 340.0)
{
real_drehzahl = drehzahl + 405
}
else if(speed >=341.0 && speed <= 350.0)
{
real_drehzahl = drehzahl + 540
}
else if(speed >=351.0 && speed <= 360.0)
{
real_drehzahl = drehzahl + 680
}
else if(speed >=361.0 && speed <= 370.0)
{
real_drehzahl = drehzahl + 701
}
else if(speed >=371.0 && speed <= 380.0)
{
real_drehzahl = drehzahl + 803
}
else if(speed >=381.0 && speed <= 390.0)
{
real_drehzahl = drehzahl + 909
}
else if(speed >=391.0 && speed <= 400.0)
{
real_drehzahl = drehzahl + 1050
}
}
else if( speed >= 401.0 && speed <= 600.0)
{
gang = 5
drehzahl = 5000.0
if(g_y >= 5.0)
{
real_drehzahl = 5000.0 - g_y
}
else
{
real_drehzahl = 5000.0 + g_y
}
if(speed >= 401.0 && speed <= 420.0)
{
real_drehzahl = drehzahl + 130
}
else if(speed >=421.0 && speed <= 440.0)
{
real_drehzahl = drehzahl + 260
}
else if(speed >=441.0 && speed <= 460.0)
{
real_drehzahl = drehzahl + 308
}
else if(speed >=461.0 && speed <= 480.0)
{
real_drehzahl = drehzahl + 405
}
else if(speed >=481.0 && speed <= 500.0)
{
real_drehzahl = drehzahl + 540
}
else if(speed >=501.0 && speed <= 520.0)
{
real_drehzahl = drehzahl + 680
}
else if(speed >=521.0 && speed <= 540.0)
{
real_drehzahl = drehzahl + 701
}
else if(speed >=541.0 && speed <= 560.0)
{
real_drehzahl = drehzahl + 803
}
else if(speed >=561.0 && speed <= 480.0)
{
real_drehzahl = drehzahl + 909
}
else if(speed >=581.0 && speed <= 600.0)
{
real_drehzahl = drehzahl + 1050
}
}
else if( speed >= 601.0 )
{
gang = 6
drehzahl = 6000.0
if(g_y >= 5.0)
{
real_drehzahl = 6000.0 - g_y
}
else
{
real_drehzahl = 6000.0 + g_y
}
if(speed >= 601.0 && speed <= 620.0)
{
real_drehzahl = drehzahl + 130
}
else if(speed >=621.0 && speed <= 640.0)
{
real_drehzahl = drehzahl + 260
}
else if(speed >=641.0 && speed <= 660.0)
{
real_drehzahl = drehzahl + 308
}
else if(speed >=661.0 && speed <= 680.0)
{
real_drehzahl = drehzahl + 405
}
else if(speed >=681.0 && speed <= 700.0)
{
real_drehzahl = drehzahl + 540
}
else if(speed >=701.0 && speed <= 720.0)
{
real_drehzahl = drehzahl + 680
}
else if(speed >=721.0 && speed <= 740.0)
{
real_drehzahl = drehzahl + 701
}
else if(speed >=741.0 && speed <= 760.0)
{
real_drehzahl = drehzahl + 803
}
else if(speed >=761.0 && speed <= 780.0)
{
real_drehzahl = drehzahl + 909
}
else if(speed >=781.0 && speed <= 800.0)
{
real_drehzahl = drehzahl + 1050
}
else if(speed >= 801)
{
real_drehzahl = drehzahl + 1203
}
}
set_hudmessage(255, 255, 255, -1.0, 0.7, 0, 0.0, FREQ, 0.01, 0.0)
speed = speed / 5.5
ShowSyncHudMsg(i, SyncHud, "%2.1f KMH^n%d^n %3.1f DREHZAHL", speed, gang,real_drehzahl)
set_user_health(i, floatround( speed ) + 1)
set_user_armor(i, gang);
}
}
the sound must be changed every sec. / by every speed up & in my code by every rehzahl up.
__________________