Firespider Posted May 16, 2023 Share Posted May 16, 2023 Hello! I would like to have this function enabled for several cars. But can you help me? addEventHandler("onClientVehicleEnter", root, function(thePed, seat) local vehid = getElementModel(source) local playerskin = getElementModel(localPlayer) if (vehid ~= 596 or vehid ~= 597) then return end if (playerskin == 280) then playSound("beep.mp3") outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikeress belépés", 255, 255, 255, true) PDMenu = true else playSound("beep.mp3") outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikertelen belépés", 255, 255, 255, true) end end) Link to comment
βurak Posted May 16, 2023 Share Posted May 16, 2023 (edited) local validVehicles = { [596] = true, [597] = true, --continue from here you want [vehicleid] = true } addEventHandler("onClientVehicleEnter", root, function(thePed, seat) local vehid = getElementModel(source) local playerskin = getElementModel(localPlayer) if (not validVehicles[vehid]) then return end if (playerskin == 280) then playSound("beep.mp3") outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikeress belépés", 255, 255, 255, true) PDMenu = true else playSound("beep.mp3") outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikertelen belépés", 255, 255, 255, true) end end) Edited May 16, 2023 by Burak5312 1 Link to comment
βurak Posted May 16, 2023 Share Posted May 16, 2023 (edited) When there is something you do not know, open a topic, I will help you as much as I can. Edited May 16, 2023 by Burak5312 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