04.11.2013, 20:32
Ola meu povo estes codigos estгo causionando crash em meu GM.
Fiz varios testes , ate chegar nesta mconclusao.
Gostaria de saber o porque causa o crash e se hб um metodo de corrigir isso obrigado.
Fiz varios testes , ate chegar nesta mconclusao.
PHP код:
if ((final_speed_int > 10) && (AVehicleData[vehicleid][Fuel] > 0))
AVehicleData[vehicleid][Fuel] = AVehicleData[vehicleid][Fuel] - 1;
if ((AVehicleData[vehicleid][Fuel] > 0) && (AVehicleData[vehicleid][Fuel] < 100000))
format(FuelStatus, 20, "~g~%s~r~%s", "~g~I", "~r~IIIIIIIII"); // Fuel is between 0% and 10% full
if ((AVehicleData[vehicleid][Fuel] >= ((MaxFuel / 10) * 1)) && (AVehicleData[vehicleid][Fuel] < ((MaxFuel / 10) * 2)))
format(FuelStatus, 20, "~g~%s~r~%s", "~g~II", "~r~IIIIIIII"); // Fuel is between 10% and 20% full
if ((AVehicleData[vehicleid][Fuel] >= ((MaxFuel / 10) * 2)) && (AVehicleData[vehicleid][Fuel] < ((MaxFuel / 10) * 3)))
format(FuelStatus, 20, "~g~%s~r~%s", "~g~III", "~r~IIIIIII"); // Fuel is between 20% and 30% full
if ((AVehicleData[vehicleid][Fuel] >= ((MaxFuel / 10) * 3)) && (AVehicleData[vehicleid][Fuel] < ((MaxFuel / 10) * 4)))
format(FuelStatus, 20, "~g~%s~y~%s", "~g~IIII", "~r~IIIIII"); // Fuel is between 30% and 40% full
if ((AVehicleData[vehicleid][Fuel] >= ((MaxFuel / 10) * 4)) && (AVehicleData[vehicleid][Fuel] < ((MaxFuel / 10) * 5)))
format(FuelStatus, 20, "~g~%s~y~%s", "~g~IIIII", "~r~IIIII"); // Fuel is between 40% and 50% full
if ((AVehicleData[vehicleid][Fuel] >= ((MaxFuel / 10) * 5)) && (AVehicleData[vehicleid][Fuel] < ((MaxFuel / 10) * 6)))
format(FuelStatus, 20, "~g~%s~y~%s", "~g~IIIIII", "~r~IIII"); // Fuel is between 50% and 60% full
if ((AVehicleData[vehicleid][Fuel] >= ((MaxFuel / 10) * 6)) && (AVehicleData[vehicleid][Fuel] < ((MaxFuel / 10) * 7)))
format(FuelStatus, 20, "~g~%s~y~%s", "~g~IIIIIII", "~r~III"); // Fuel is between 60% and 70% full
if ((AVehicleData[vehicleid][Fuel] >= ((MaxFuel / 10) * 7)) && (AVehicleData[vehicleid][Fuel] < ((MaxFuel / 10) * 8)))
format(FuelStatus, 20, "~g~%s~y~%s", "~g~IIIIIIII", "~r~II"); // Fuel is between 70% and 80% full
if ((AVehicleData[vehicleid][Fuel] >= ((MaxFuel / 10) * 8)) && (AVehicleData[vehicleid][Fuel] < ((MaxFuel / 10) * 9)))
format(FuelStatus, 20, "~g~%s~y~%s", "~g~IIIIIIIII", "~r~I"); // Fuel is between 80% and 90% full
if ((AVehicleData[vehicleid][Fuel] >= ((MaxFuel / 10) * 9)) && (AVehicleData[vehicleid][Fuel] <= MaxFuel))
format(FuelStatus, 20, "~g~%s", "~g~IIIIIIIIII"); // Fuel is between 90% and 100% full (all bars are green)
if (AVehicleData[vehicleid][Fuel] == 0)
format(FuelStatus, 20, "~r~%s", "Sua Gasolina Acabou");
format(FuelString, 50, TXT_SpeedometerFuel, FuelStatus);
TextDrawSetString(APlayerData[playerid][FuelGauge], FuelString);
new Float:Vida;// Variavel da vida
GetVehicleHealth(GetPlayerVehicleID(playerid), Vida); // getando a vida
new ss[50];
if ((Vida > 0) && (Vida < 1000))
format(ss, 50, "Lataria: ~g~I~r~IIIIIIIII", Vida);
if ((Vida >= ((1000 / 10) * 1)) && (Vida < ((1000 / 10) * 2)))
format(ss, 50, "Lataria: ~g~II~r~IIIIIIII", Vida);
if ((Vida >= ((1000 / 10) * 2)) && (Vida < ((1000 / 10) * 3)))
format(ss, 50, "Lataria: ~g~III~r~IIIIIII", Vida);
if ((Vida >= ((1000 / 10) * 3)) && (Vida < ((1000 / 10) * 4)))
format(ss, 50, "Lataria: ~g~IIII~r~IIIIII", Vida);
if ((Vida >= ((1000 / 10) * 4)) && (Vida < ((1000 / 10) * 5)))
format(ss, 50, "Lataria: ~g~IIIII~r~IIIII", Vida);
if ((Vida >= ((1000 / 10) * 5)) && (Vida < ((1000 / 10) * 6)))
format(ss, 50, "Lataria: ~g~IIIIII~r~IIII", Vida);
if ((Vida >= ((1000 / 10) * 6)) && (Vida < ((1000 / 10) * 7)))
format(ss, 50, "Lataria: ~g~IIIIIII~r~III", Vida);
if ((Vida >= ((1000 / 10) * 7)) && (Vida < ((1000 / 10) * 8)))
format(ss, 50, "Lataria: ~g~IIIIIIII~r~II", Vida);
if ((Vida >= ((1000 / 10) * 8)) && (Vida < ((1000 / 10) * 9)))
format(ss, 50, "Lataria: ~g~IIIIIIIII~r~I", Vida);
if ((Vida >= ((1000 / 10) * 9)) && (Vida <= 1000))
format(ss, 50, "Lataria: ~g~IIIIIIIIII", Vida);
if (Vida == 0)
format(ss, 50, "Lataria: ~r~IIIIIIIIII", Vida);
TextDrawSetString(APlayerData[playerid][Lataria], ss);


