14.07.2011, 00:37
Timers em loop ? obvio que vai dar lag...
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new newcar = GetPlayerVehicleID(playerid);
if(Avioes(newcar))
{
SetTimer("DarPontos", 10000, 1);
TimerAtivado[playerid] = 1;
}
if(BaggageCar(newcar))
{
SendClientMessage(playerid, COLOR_GREEN, "Para consertar um Aviгo digite: /reparar [id]");
SendClientMessage(playerid, COLOR_GREEN, "Para soltar o Trailer digite: /detach");
}
VelocidadeB = SetTimer("Barras", 150, 1);
TimerG = SetTimer("GasolinA", 30000, 1);
TextDrawShowForPlayer(playerid, Text:VelocidadeText);
ShowProgressBarForPlayer(playerid, Velocidade[playerid]);
TextDrawShowForPlayer(playerid, Text:Gaso1);
TextDrawShowForPlayer(playerid, Text:Gaso2);
TextDrawShowForPlayer(playerid, Text:Altitude);
TextDrawShowForPlayer(playerid, Text:Altitude2);
return 1;
}