toptional Posted May 31, 2013 Share Posted May 31, 2013 (edited) This script is supposed to bassically, it checks if your in a vehicle and if you are it fixes it, if your not in a vehicle it tells you. Problem is i'm in a vehicle and get the message saying I'm not in a vehicle, no debug errors UKMarker = createMarker ( -2079.88, 2099.58, 15.5,"cylinder",7.0,255,255,0,125) function fixUK ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer ) then local vehicle = getPedOccupiedVehicle ( thePlayer ) if vehicle then fixVehicle ( vehicle ) outputChatBox ( "Your vehicle was fixed!", player, 0, 255, 0 ) else outputChatBox ( "You need to be in a vehicle!", player, 255, 0, 0 ) end end end addEventHandler ( "onClientMarkerHit", UKMarker, fixUK ) Edited May 31, 2013 by Guest Link to comment
Castillo Posted May 31, 2013 Share Posted May 31, 2013 local vehicle = getPedOccupiedVehicle ( thePlayer ) You are trying to get the vehicle from the wrong argument, your argument is "hitPlayer". 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