09.11.2018, 03:31
(
Последний раз редактировалось murilo789; 09.11.2018 в 15:46.
)
olб uso um loop aqui para destruir/setar o velocimetro mas tб com um certo lag quando o player cria um veiculo ou explode. tem algo errado?
for(new s; s < 13; s++)
{
if(s == 11) continue;
if(s == 12) continue;
if(APlayerData[playerid][VeloDraw][s] == PlayerText:INVALID_TEXT_DRAW) continue;
PlayerTextDrawShow(playerid, APlayerData[playerid][VeloDraw][s]);
}
// Check if the player is not in any plane or helicopter (those cannot be caught by speedcamera's)
if (IsVehicleAirVehicle(vehicleid) == 0)
if (APlayerData[playerid][PlayerClass] != ClassPolice) // Check if the player isn't speeding (cops won't get caught)
CheckPlayerSpeeding(playerid);
}
else
{
for(new i; i < 13; i++)
if(APlayerData[playerid][VeloDraw][i] != PlayerText:INVALID_TEXT_DRAW)
PlayerTextDrawHide(playerid, APlayerData[playerid][VeloDraw][i]);
if(GetPVarInt(playerid, "mostrar_fotov"))
DeletePVar(playerid, "mostrar_fotov");
if(GetPVarInt(playerid, "mostrar_trailer"))
DeletePVar(playerid, "mostrar_trailer");
SetTimer("Fora", 500, true);
APlayerData[playerid][PlayerSpeed] = 0;
}
}
for(new s; s < 13; s++)
{
if(s == 11) continue;
if(s == 12) continue;
if(APlayerData[playerid][VeloDraw][s] == PlayerText:INVALID_TEXT_DRAW) continue;
PlayerTextDrawShow(playerid, APlayerData[playerid][VeloDraw][s]);
}
// Check if the player is not in any plane or helicopter (those cannot be caught by speedcamera's)
if (IsVehicleAirVehicle(vehicleid) == 0)
if (APlayerData[playerid][PlayerClass] != ClassPolice) // Check if the player isn't speeding (cops won't get caught)
CheckPlayerSpeeding(playerid);
}
else
{
for(new i; i < 13; i++)
if(APlayerData[playerid][VeloDraw][i] != PlayerText:INVALID_TEXT_DRAW)
PlayerTextDrawHide(playerid, APlayerData[playerid][VeloDraw][i]);
if(GetPVarInt(playerid, "mostrar_fotov"))
DeletePVar(playerid, "mostrar_fotov");
if(GetPVarInt(playerid, "mostrar_trailer"))
DeletePVar(playerid, "mostrar_trailer");
SetTimer("Fora", 500, true);
APlayerData[playerid][PlayerSpeed] = 0;
}
}