Jump to content

help me


Apo

Recommended Posts

hi guys please help me for fix my script

if player enter the car id 411 and 602 and 593 if not license remove player in the car

function licensecheck(thePlayer) 
local carlicense = getElementData(thePlayer, "license") 
local seat = getPedOccupiedVehicleSeat(thePlayer) 
if (carlicense == 1 ) and  (seat==0) then 
  
else 
outputChatBox("You are not a driver license", thePlayer, 255, 0, 0) 
            removePedFromVehicle(thePlayer) 
            local x, y, z = getElementPosition(thePlayer) 
            setElementPosition(thePlayer, x, y, z) 
            return 
  
end 
end 
addEventHandler("onVehicleEnter", getRootElement(), licensecheck) 

Link to comment
  
LicenseVehicles = { [411]=true, [602]=true, [593]=true } 
  
function licensecheck(thePlayer, seat) 
    local carlicense = getElementData(thePlayer, "license") 
    if (carlicense == 1 ) and (seat == 0) then 
         
    else 
        if (LicenseVehicles[getElementModel ( source )]) 
            outputChatBox("You are not a driver license", thePlayer, 255, 0, 0) 
            removePedFromVehicle(thePlayer) 
        end 
    end 
end 
addEventHandler("onVehicleEnter", getRootElement(), licensecheck) 
  

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...