[Ajuda] Loop destruir draw
#1

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;
}
}
Reply
#2

como assim nгo entendi, a quedas de frame ou jogadores teleportando quando o veiculo explode?
Reply
#3

Quote:
Originally Posted by murilo789
Посмотреть сообщение
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;
}
}
Tem
PHP код:
GetPVarInt
SetTimer
("Fora"500true); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)