Stopcars blowing up
#1

how do i stop the cars setting on fire and blowing up ? instead i would like it to say your vehicle has roken down use /assistance to repair the vehicle
Reply
#2

You should check if the vehicle's health is less than so much. If it is, switch the vehicle's engine off, and then switch it back on after you type /assistance or whenever
Reply
#3

pawn Код:
new Float:vHealth;
GetVehicleHealth(vehicleid, vHealth);

if(vHealth < 450)
{
//engine code here
SendClientMessage(playerid, color, "You car has broken down!");
}
Untested.
Reply
#4

i got some code other day by someone and when the vehicle was repaired the engine wasnt switched on
Reply
#5

when the vehicle is repaired, put this:
pawn Код:
new vengine,vlights,valarm,vdoors,vbonnet,vboot,vobjective;
GetVehicleParamsEx(GetPlayerVehicleID(playerid),vengine,vlights,valarm,vdoors,vbonnet,vboot,vobjective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid),1,vlights,valarm,vdoors,vbonnet,vboot,vobjective);
That will switch the engine back on
Reply
#6

If you combine AstonDA's code with my mockup, that should do ya.
Reply
#7

anyone have teamviewer to help out ?
Reply
#8

Yay, Teamwork :3
Put my code where Rebel wrote '//engine code here' ;d
Reply
#9

but i have a repairall command so how would all this work using my command ? and i have a mechanic class that works off keys like lctrl
Reply
#10

i have tried all this with no joy need some help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)