Help with vehicle engine - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with vehicle engine (
/showthread.php?tid=571157)
Help with vehicle engine -
Sc0pion - 16.04.2015
Fixed!
Re: Help with vehicle engine -
Konstantinos - 16.04.2015
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.
Re: Help with vehicle engine -
Sc0pion - 16.04.2015
Fixed!
Re: Help with vehicle engine -
Konstantinos - 16.04.2015
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. ]");
Re: Help with vehicle engine -
Sc0pion - 16.04.2015
Fixed!
Re: Help with vehicle engine -
Sc0pion - 17.04.2015
Fixed!
Re: Help with vehicle engine -
Sc0pion - 18.04.2015
Fixed!
Re: Help with vehicle engine -
fuckingcruse - 18.04.2015
Don't double post , or you may receive warning.
Re: Help with vehicle engine -
Sc0pion - 19.04.2015
Fixed!