johhnhd Posted October 5, 2013 Share Posted October 5, 2013 This is the error This is the script vehicle1 = createVehicle( 433, 2870.1000976563, 963.20001220703, 11.300000190735, 0, 0, 136 ) vehicle = createVehicle( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 1, 1 ) addEventHandler("onVehicleStartEnter", root, function(player) if getPlayerTeam(player) ~= getTeamFromName("MI-6") then cancelEvent() end end) EDIT: It won't let people in the MI-6 team enter the vehicle. Link to comment
JuniorMelo Posted October 5, 2013 Share Posted October 5, 2013 test vehicle = createVehicle( 433, 2870.1000976563, 963.20001220703, 11.300000190735, 0, 0, 136 ) state = setVehicleDoorState ( vehicle, 1, 1 ) addEventHandler("onVehicleStartEnter", root, function(player) if getPlayerTeam(player) ~= getTeamFromName("MI-6") then cancelEvent() end end) Link to comment
Castillo Posted October 5, 2013 Share Posted October 5, 2013 If he wants to make that vehicle restricted to the 'MI-6' team only, then he should change 'root' to 'vehicle' at addEventHandler. Link to comment
JuniorMelo Posted October 5, 2013 Share Posted October 5, 2013 If he wants to make that vehicle restricted to the 'MI-6' team only, then he should change 'root' to 'vehicle' at addEventHandler. Type vehicle = createVehicle( 433, 2870.1000976563, 963.20001220703, 11.300000190735, 0, 0, 136 ) state = setVehicleDoorState ( vehicle, 1, 1 ) addEventHandler("onVehicleStartEnter", vehicle, function(player) if getPlayerTeam(player) ~= getTeamFromName("MI-6") then cancelEvent() end end) 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