04.03.2014, 02:33
PHP код:
public Velocimetro()
{
for( new i = 0; i <GetMaxPlayers( ) ; i++ )
{
if(IsPlayerInAnyVehicle(i) == 1)
{
new string[255];
new vid = GetPlayerVehicleID(i);
format(string, sizeof(string), "Velocidade: ~w~%d", GetVehicleSpeed(vid));
TextDrawSetString(Velocidade[i],string);
TextDrawShowForPlayer(i, Velocidade[i]);
format(string, sizeof(string), "Modelo: ~w~%s", VehicleNames[GetVehicleModel(GetPlayerVehicleID(i))-400]);
TextDrawSetString(Modelo[i],string);
TextDrawShowForPlayer(i, Modelo[i]);
TextDrawShowForPlayer(i, Combustivel[i]);
TextDrawShowForPlayer(i, Textdraw0);
TextDrawShowForPlayer(i, Textdraw1);
TextDrawShowForPlayer(i, Textdraw2);
TextDrawShowForPlayer(i, Textdraw3);
TextDrawShowForPlayer(i, Textdraw4);
TextDrawShowForPlayer(i, Textdraw5);
}
else
{
TextDrawHideForPlayer(i, Velocidade[i]);
TextDrawHideForPlayer(i, Modelo[i]);
TextDrawHideForPlayer(i, Combustivel[i]);
TextDrawHideForPlayer(i, Textdraw0);
TextDrawHideForPlayer(i, Textdraw1);
TextDrawHideForPlayer(i, Textdraw2);
TextDrawHideForPlayer(i, Textdraw3);
TextDrawHideForPlayer(i, Textdraw4);
TextDrawHideForPlayer(i, Textdraw5);
}
}
return 1;
}