18.04.2015, 02:34
pawn Код:
Velocimeter();
public Velocimeter()
{
foreach(Player, i )
{
if( GetPlayerState( i ) == PLAYER_STATE_DRIVER )
{
new vid, modelo;
vid = GetPlayerVehicleID(i);
modelo = GetVehicleModel(vid);
new stringvelo[256];
if(modelo == 509 || modelo == 510 || modelo == 481) return 1;
if(AeronavesLIC(vid) || BarcosLIC(vid) || MotoLIC(vid) || CarroLIC(vid) || Caminho_Onibus_LIC(vid))
{
format(stringvelo, sizeof(stringvelo), "%d ~b~~h~KM/H", GetPlayerSpeed(i));
TextDrawSetString(Velocimetro4[i], stringvelo);
TextDrawShowForPlayer(i, Velocimetro4[i]);
format(stringvelo, sizeof(stringvelo), "%s", GetPlayerArea(i));
TextDrawSetString(Velocimetro1[i], stringvelo);
TextDrawShowForPlayer(i, Velocimetro1[i]);
format(stringvelo, sizeof(stringvelo), "%s", vNome[ GetVehicleModel( GetPlayerVehicleID( i ))-400 ]);
TextDrawSetString(Velocimetro2[i], stringvelo);
TextDrawShowForPlayer(i, Velocimetro2[i]);
format(stringvelo, sizeof(stringvelo), "~g~~h~Combustivel: ~w~%d L", Gasolina[i]);
TextDrawSetString(Velocimetro3[i], stringvelo);
TextDrawShowForPlayer(i, Velocimetro3[i]);
}
}
else
{
TextDrawHideForPlayer(i, Velocimetro1[i]);
TextDrawHideForPlayer(i, Velocimetro2[i]);
TextDrawHideForPlayer(i, Velocimetro3[i]);
TextDrawHideForPlayer(i, Velocimetro4[i]);
}
SetTimerEx("Velocimeter", 100, false, "i", i);
}
return 1;
}