Jump to content

[HELP]


Recommended Posts

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
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 by Burak5312
  • Like 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...