FiGo Posted January 1, 2018 Posted January 1, 2018 (edited) How to save the plate on the vehicle Edited January 1, 2018 by FiGo
Storm-Hanma Posted January 3, 2018 Posted January 3, 2018 Use this https://wiki.multitheftauto.com/wiki/SetVehiclePlateText 1
FiGo Posted January 3, 2018 Author Posted January 3, 2018 Bro i made it but i need to make when i close the server the plate save until i change it
Investor Posted January 3, 2018 Posted January 3, 2018 Vehicles do not remain when you "close the server," so you probably have a script that spawns them back. Edit that script as to also correct the plate when being spawned.
ÆBKV Posted January 3, 2018 Posted January 3, 2018 (edited) -- 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 January 3, 2018 by ÆBKV
ÆBKV Posted January 3, 2018 Posted January 3, 2018 (edited) 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 January 3, 2018 by ÆBKV
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