AlexCelTare Posted October 23, 2022 Report Share Posted October 23, 2022 { new Float:health; new veh = GetPlayerVehicleID(playerid); GetVehicleHealth(veh, health); if(health > 500) return SendClientMessage(playerid, COLOR_RED, "Engine cannot start!"); } salut ma puteti ajuta, vreau sa fac o chestie, cand vehiculul are sub 500 viata, sa nu mai mearga vehiculul. stiti voi la ce ma refer Quote Link to comment Share on other sites More sharing options...
iamCibu Posted October 23, 2022 Report Share Posted October 23, 2022 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. Quote Link to comment Share on other sites More sharing options...
AlexCelTare Posted October 23, 2022 Author Report Share Posted October 23, 2022 si cum pot face sa nu poata masina sa plece de pe loc? gen deloc Quote Link to comment Share on other sites More sharing options...
MiritaXD Posted October 23, 2022 Report Share Posted October 23, 2022 Adaugi la un timer "SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);" daca are sub 500 Hp Quote Link to comment Share on other sites More sharing options...
AlexCelTare Posted October 23, 2022 Author Report Share Posted October 23, 2022 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? Quote Link to comment Share on other sites More sharing options...
MiritaXD Posted October 23, 2022 Report Share Posted October 23, 2022 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!"); Quote Link to comment Share on other sites More sharing options...
AlexCelTare Posted October 23, 2022 Author Report Share Posted October 23, 2022 { 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.