Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Recommended Posts

Posted

Incearca sa pui

if(health < 500) return SendClientMessage(playerid, COLOR_RED, "Engine cannot start!");

Verifici cand pornesti motorul daca HP-ul vehiculului este mai mic decat 500 atunci sa iti returneze mesajul respectiv.

unknown.png

Posted

Adaugi la un timer "SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);" daca are sub 500 Hp

Posted
51 minutes ago, MiritaXD said:

Adaugi la un timer "SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);" daca are sub 500 Hp

ok dar am deja comanda de /engine, ei daca dau /engine, pot porni?

Posted

Ai deja asta, dar daca este motorul pornit poti merge cu masina.. Daca atasezi aia de mai sus la un timer o sa-ti opreasca motorul daca este pornit(trebuie facuta si o verificare daca e oprit sa nu ruleze functia aiurea)

if(health < 500) return SendClientMessage(playerid, COLOR_RED, "Engine cannot start!");
Posted

{
    SendClientMessage(playerid, 0xFFCCCC, "(IN-CAR)*Press 2 or type /engine to start/stop vehicle engine.*");
    SendClientMessage(playerid, 0xFFCCCC, "(IN-CAR)*Type /lights to enable/disable vehicle lights.*");
    SendClientMessage(playerid, 0xFFCCCC, "(IN-CAR)*Type /seatbelt to enable/disable your seatbelt.*");
    new Float:health;
    new veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, health);
    if(health < 430) return SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, 0, 0, 0, 0, 0, 0);
    SendClientMessage(playerid, COLOR_RED, "Engine has serious problems! Please Call A Mechanic!");
    return 1;
}

acuma ideea e ca merge, dar idee e ca nu prea merge verificarea, intru in masina, si chiar daca ea are 1000 hp, tot ruleaza functia.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.