Drakath Posted December 30, 2013 Share Posted December 30, 2013 local vehicle = createVehicle(506, 2100.2697, 1397.4947, 10.3, 0, 0, 0) setElementData(vehicle, "HLS", "groupname") setElementData(vehicle, "HLS2", "groupname") addEventHandler("onVehicleStartEnter", root, function(thePlayer, seat, jacked, door) local vehicleOwner = getElementData(source, "HLS") or getElementData(source, "HLS2") local gangGroup = getElementData(thePlayer, "HLS") or getElementData(thePlayer, "HLS2") if (not vehicleOwner) then return end if (gangGroup ~= vehicleOwner) then outputChatBox("This car is locked and belongs to the following class: Admins", thePlayer, 245, 20, 20, false) cancelEvent() end end ) Link to comment
Fantanic Posted December 30, 2013 Author Share Posted December 30, 2013 Doesnt seem to work Link to comment
Fantanic Posted January 5, 2014 Author Share Posted January 5, 2014 *bumb* still need help Link to comment
Fantanic Posted January 7, 2014 Author Share Posted January 7, 2014 Sorry for sort of spam / doubleposts but this topic seems to be ignored Link to comment
Plean Posted January 7, 2014 Share Posted January 7, 2014 local vehicle = createVehicle(506, 2100.2697, 1397.4947, 10.3, 0, 0, 0) setElementData(vehicle, "HLS", {"SWAT HQ", "SWAT Member"}) addEventHandler("onVehicleStartEnter", root, function(thePlayer, seat, jacked, door) local vehicleOwners = getElementData(source, "HLS") local gangGroup = getElementData(thePlayer, "HLS") if (not vehicleOwners) then return end local canUseVehicle = false for i = 1, #vehicleOwners do if gangGroup == vehicleOwners[i] then canUseVehicle = true end end if not canUseVehicle then outputChatBox("This car is locked and belongs to the following class: Admins", thePlayer, 245, 20, 20, false) 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