Bean666 Posted April 30, 2015 Posted April 30, 2015 (edited) hi guys , is there anyway there will be 2 skins that can enter this vehicle with restriction? i have 125 as restriction and i also want to add 285. function cars () c1 = createVehicle ( 520, -2891.84765625, 460.4560546875, 4.9140625, 0, 0, 90 ) end addEventHandler ( "onResourceStart", resourceRoot, cars ) function onEnter(thePlayer) if (getElementModel(thePlayer) ~= 125) then cancelEvent() outputChatBox("This Vehicle Is Locked for The Soprano Vipers", thePlayer, 0, 255, 0) end end addEventHandler("onVehicleStartEnter", getRootElement(), onEnter) Edited April 30, 2015 by Guest
Tomas Posted April 30, 2015 Posted April 30, 2015 function cars () c1 = createVehicle ( 520, -2891.84765625, 460.4560546875, 4.9140625, 0, 0, 90 ) end addEventHandler ( "onResourceStart", resourceRoot, cars ) function onEnter(thePlayer) if (getElementModel(thePlayer) ~= 125 or getElementModel(thePlayer) ~= 285) then cancelEvent() outputChatBox("This Vehicle Is Locked for The Soprano Vipers", thePlayer, 0, 255, 0) end end addEventHandler("onVehicleStartEnter", getRootElement(), onEnter)
Bean666 Posted April 30, 2015 Author Posted April 30, 2015 doesnt work. if i ride the car with both skins it still says This Vehicle is locked for the soprano vipers.
Dimos7 Posted April 30, 2015 Posted April 30, 2015 function cars() c1 = createVehicle(520, -2891,84765625, 460.4560546875, 4.9140625, 0, 0, 90) end addEventHandler("onResourceStart", resourceRoot, cars) function onEnter(thePlayer) if getElementModel(thePlayer) ~= 125 and getElementModel(thePlayer) ~= 285 then cancelEvent() outputChatBox("This Vehicle Is Locked for The Soprano Vipers", thePlayer, 0, 255, 0) end end addEventHandler("onVehicleStartEnter", root, onEnter)
Walid Posted April 30, 2015 Posted April 30, 2015 doesn't work please help. local skins = {[125]=true,[285]=true} function cars () c1 = createVehicle ( 520, -2891.84765625, 460.4560546875, 4.9140625, 0, 0, 90 ) end addEventHandler ( "onResourceStart", resourceRoot, cars ) function onEnter(thePlayer) if thePlayer and isElement(thePlayer) and getElementType(therPlayer) == "player" then if source == c1 then local model = getElementModel(thePlayer) if not (skins[model]) then outputChatBox("This Vehicle Is Locked for The Soprano Vipers", thePlayer, 0, 255, 0) cancelEvent() end end end end addEventHandler("onVehicleStartEnter", getRootElement(), onEnter)
Walid Posted April 30, 2015 Posted April 30, 2015 This topic is already titled as "SOLVED". @Walid Yes i can see but he still asking for help read his last post doesn't work please help.
Irish Posted April 30, 2015 Posted April 30, 2015 Hmm...didn't know because he has created another topic regarding this help.
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