Jump to content

Custom License plate


Recommended Posts

What do you mean custom license plate script? You mean that the texture is replaced or something? That's not possible since license plates are attached to the car texture. Of course you can make some type of object attachment but I don't see the idea there.

So, what do you want to do? Change the license plate text?

Link to comment
What do you mean custom license plate script? You mean that the texture is replaced or something? That's not possible since license plates are attached to the car texture. Of course you can make some type of object attachment but I don't see the idea there.

So, what do you want to do? Change the license plate text?

Yes, i want to add another clickable in the F1 menu wich says "lplate"

And lets you put up to 8 characters which ingame license textures.

For example, i can make an uranus which license plate could be MSTWANTD

Link to comment

You can use these functions for such script.

guiCreateWindow 
guiCreateLabel 
guiCreateEdit 
guiCreateButton 
addEventHandler 
triggerServerEvent 
getElementPosition 
getElementInterior 
getElementDimension 
getVehicleColor 
createVehicle 
setVehicleColor 
destroyElement 

And to trigger it from your freeroam resource, use this in your fr_client.lua.

function openPlatePicker() 
    -- Script here 
end 
  
wndMain = { 
    'wnd', 
    text = 'FR GUI', 
    x = 10, 
    y = 150, 
    width = 280, 
    controls = { 
        {'lbl', text='Local player'}, 
        {'br'}, 
        {'btn', id='kill', onclick=killLocalPlayer}, 
        {'btn', id='skin', window=wndSkin}, 
        {'btn', id='anim', window=wndAnim}, 
        {'btn', id='weapon', window=wndWeapon}, 
        {'btn', id='clothes', window=wndClothes}, 
        {'btn', id='playergrav', text='grav', window=wndGravity}, 
        {'btn', id='warp', window=wndWarp}, 
        {'btn', id='stats', window=wndStats}, 
        {'btn', id='bookmarks', window=wndBookmarks}, 
        {'br'}, 
        {'chk', id='jetpack', onclick=toggleJetPack}, 
        {'chk', id='falloff', text='fall off bike', onclick=toggleFallOffBike}, 
        {'br'}, 
         
        {'lbl', text='Pos:'}, 
        {'lbl', id='xpos', text='x', width=45}, 
        {'lbl', id='ypos', text='y', width=45}, 
        {'lbl', id='zpos', text='z', width=45}, 
        {'btn', id='setpos', text='map', window=wndSetPos}, 
        {'btn', id='setinterior', text='int', window=wndSetInterior}, 
        {'br'}, 
        {'br'}, 
         
        {'lbl', text='Vehicles'}, 
        {'br'}, 
        {'lbl', text='Current:'}, 
        {'lbl', id='curvehicle'}, 
        {'br'}, 
        {'btn', id='createvehicle', window=wndCreateVehicle, text='create'}, 
        {'btn', id='repair', onclick=repairVehicle}, 
        {'btn', id='flip', onclick=flipVehicle}, 
        {'btn', id='upgrades', window=wndUpgrades}, 
        {'btn', id='color', onclick=openColorPicker}, 
        {'btn', id='paintjob', window=wndPaintjob}, 
        {'btn', id='lplate', onclick=openPlatePicker}, 
        {'br'}, 
        {'chk', id='lightson', text='Lights on', onclick=forceLightsOn}, 
        {'chk', id='lightsoff', text='Lights off', onclick=forceLightsOff}, 
        {'br'}, 
        {'br'}, 
         
        {'lbl', text='Environment'}, 
        {'br'}, 
        {'btn', id='time', window=wndTime}, 
        {'chk', id='freezetime', text='freeze', onclick=toggleFreezeTime}, 
        {'btn', id='weather', window=wndWeather}, 
        {'btn', id='speed', window=wndGameSpeed} 
    }, 
    oncreate = mainWndShow, 
    onclose = mainWndClose 
} 
  

Link to comment
You can use these functions for such script.
guiCreateWindow 
guiCreateLabel 
guiCreateEdit 
guiCreateButton 
addEventHandler 
triggerServerEvent 
getElementPosition 
getElementInterior 
getElementDimension 
getVehicleColor 
createVehicle 
setVehicleColor 
destroyElement 

I thought to make it with a set of 8 boxes in a row.

Kinda like this:

lplate

___________________________

Write a letter in each box, then press set

[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]

[sET] [CLEAR] [CANCEL]

(This is how it will look)

Should i use variables for box1, box2, box3...?

Link to comment

You can do either of these.

box1 = 
box2 = 
box3 = 

box = {} 
box[1] = 
box[2] = 
box[3] = 

And sure, use your imagination and go wild with it. No need to be like everybody else and copy from other servers. If you get any errors, post them in this thread and we'll help. Try to make some kind of base before asking for further instructions though, we do not give scripts, we help.

Link to comment
You can do either of these.
box1 = 
box2 = 
box3 = 

box = {} 
box[1] = 
box[2] = 
box[3] = 

And sure, use your imagination and go wild with it. No need to be like everybody else and copy from other servers. If you get any errors, post them in this thread and we'll help. Try to make some kind of base before asking for further instructions though, we do not give scripts, we help.

Wait, how do you link a textbox of 8 letters so i can add it to the freeroam vehicle creator?

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