A QB based script for stealing plates and attaching them to other vehicles. Plates are added to inventory as items. The original plates for player owned vehicles are left untouched in the database, and you can always swap back to original plates from a fakeplate.
It does come with some limitations currently. You can not park your vehicles with a fake plate on without editing your garage script (see last section of readme for examples). Modifying a vehicle will not save changes in database (same thing as garages). The script is also set up to not allow stealing player-plates. Just because this might cause problems with saving in databases etc, a toggle to enable this at your own risk might be introduced.
More scripts by us ๐
Support, updates and script previews:
All our scripts are and will remain free. If you want to support what we do, you can buy us a coffee here:
- Steal license plates from local cars and apply them to yours
- Legal plate changes
- Adding this to any phone or laptop script
LicensePlateItem: The item used for the plates, if you wanna change em InteractionItem: Set this if you want to have an item requirement to remove and add the plate
Settings: RemoveItem: How long to remove a plate AddTime: How long to apply a plate PoliceCallChance: How big the chance of police being called
It uses qb-phone for the police alert by default, if you want to change it then you can find the Event trigger at the bottom of server.lua
You'll have to figure this out yourself. Somewhere in the scripts, wherever there's a plate check that compares to the database you'll need to use the exports isFakePlate
to check the plates and then getRealPlateFromFakePlate
to get the real plate you want to modify.
Example use: Let's say you have a script where it needs to check the car in the database. It obviously uses plate to map to something in the db, but your plate is fake! Naughty Naughty!
In the code the plate of the car is plate
and the vehicle entity is veh
.
exports['cw-plateswap']:resetPlateIfFake(plate, veh)
After this is used, your car will have it's real plate, but keep the fake plate in the db.
Whenever you want to put the fake plate back on you can call this:
exports['cw-plateswap']:applyFakePlateIfExists(plate, veh)
Example of implementation in qb-garages (gotta honk twice to park lol):