Jump to content

Hep


FiGo

Recommended Posts

-- SERVER --

function getPlateText()
  local ip = getPlayerIP(source)
  local vehicle = getPedOccupiedVehicle(source)
  if (source) and isPedInVehicle(source) and getVehicleOccupant(vehicle,0) then
    local platetext = getVehiclePlateText(vehicle)
    setElementData(ip,"text",platetext)
  end
end
addEventHandler("onPlayerQuit")

function setPlateText(vehicle,seat,jacked)
  local ip = getPlayerIP(source)
  if (source) and (seat) == 0 then
  local platetext = getElementData(ip,"text")
  if (platetext) then
    setVehiclePlateText(vehicle,platetext)
  end
end
addEventHandler("onPlayerVehicleEnter")
       
       

I think that will work

Edited by ÆBKV
Link to comment
function getPlateTextOnExit(vehicle,seat,jacked)
  local ip = getPlayerIP(source)
  if (source) and (seat) == 0 then
    local platetext = getVehiclePlateText(vehicle)
    setElementData(ip,"text",platetext)
  end
end
addEventHandler("onPlayerVehicleExit",root,getPlateTextOnExit)

function getPlateTextOnEnter(vehicle,seat,jacked)
  local ip = getPlayerIP(source)
  if (source) and (seat) == 0 then    
    local platetext = getVehiclePlateText(vehicle)  
    setElementData(ip,"text",platetext)
  end
end
addEventHandler("onPlayerVehicleEnter",root,getPlateTextOnEnter)     

function setPlateTextOnEnter(vehicle,seat,jacked)
  local ip = getPlayerIP(source)
  if (source) and (seat) == 0 then
  local platetext = getElementData(ip,"text")
  if (platetext) then
    setVehiclePlateText(vehicle,platetext)
  end
end
addEventHandler("onPlayerVehicleEnter",root,setPlateTextOnEnter)       

that's right

Edited by ÆBKV
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...