Drakath Posted December 30, 2013 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 )
Fantanic Posted January 7, 2014 Author Posted January 7, 2014 Sorry for sort of spam / doubleposts but this topic seems to be ignored
Plean Posted January 7, 2014 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 )
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