SpriN' Posted January 18, 2013 Share Posted January 18, 2013 (edited) Well, I made taxi job and I have a problem which is small bug I did function startJob ( playerSource ) ....... end addEventHandler ("onVehicleEnter", getRootElement(), startJob) but with that the taxi driver can enter any car the job will starts I wanna know if there's any way to make onVehicleEnter with specific vehicles only Edited January 18, 2013 by Guest Link to comment
Baseplate Posted January 18, 2013 Share Posted January 18, 2013 Check this The example is what you want there Link to comment
SpriN' Posted January 18, 2013 Author Share Posted January 18, 2013 (edited) I didn't meant that. I want when the taxi get spawned by a taxi driver the job starts I made it with onVehicleEnter and it works fine, but the taxi driver can enter any type of vehicle to start the job and I want it with Taxi only Edited January 18, 2013 by Guest Link to comment
Baseplate Posted January 18, 2013 Share Posted January 18, 2013 function startJob ( playerSource ) if ( getElementModel ( source ) == 420 ) then -- do what u wanna do end addEventHandler ("onVehicleEnter", getRootElement(), startJob) Link to comment
SpriN' Posted January 18, 2013 Author Share Posted January 18, 2013 lol I didn't thought it is so easy like that thanks. Link to comment
Baseplate Posted January 18, 2013 Share Posted January 18, 2013 No problem onVehicleEnter's source is the vehicle you entered. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now