SA-MP Forums Archive
[Ajuda] Loop destruir draw - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Loop destruir draw (/showthread.php?tid=660643)



Loop destruir TextDraw - murilo789 - 09.11.2018

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;
}
}


Re: Loop destruir draw - RazorGuigo - 13.11.2018

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


Re: Loop destruir TextDraw - Bruno13 - 13.11.2018

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);