Help with vehicle engine
#1

Fixed!
Reply
#2

OnPlayerEnterVehicle is called when a player starts to enter a vehicle but they're not in it yet so calling GetPlayerVehicleID will return 0. You got the vehicle ID already though assigned to "vehicleid".

Also make sure you have ManualVehicleEngineAndLights enabled.
Reply
#3

Fixed!
Reply
#4

You should have it enabled so you can turn on/off the engine and lights by script.

And remove those lines as are not needed:
pawn Код:
new id = GetPlayerVehicleID(playerid);
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(id, engine, lights, alarm, doors, bonnet, boot, objective);
I only see "engine" used here which is invalid the way you have it:
pawn Код:
if(vehicleid, engine == 1)
And by the way, you do not need a string and format:
pawn Код:
SendClientMessage(playerid, COLOR_PURPLE, "[ VEHICLE NOTIFICATION: This vehicle's engine is turned off, use '/v' to view vehicle menu. ]");
Reply
#5

Fixed!
Reply
#6

Fixed!
Reply
#7

Fixed!
Reply
#8

Don't double post , or you may receive warning.
Reply
#9

Fixed!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)