PivityGmodStore

How to make a vehicle VIP only?

If you want to restrict your vehicle to a usergroup (VIP or anything else), add a customcheck in your configuration file :

advanced-car-dealer\lua\advancedcardealer\sh_config.lua

Here is an example of customcheck you can add for VIPs :

AdvCarDealer.CustomChecks = {
[ "VIP only" ] = {
func = function( ply ) return ply:GetUserGroup() == "VIP" end,
messageCatalog = "This vehicle is limited to VIP users.",
onlyOnceBuying = false, -- if the check has to be done only once buying, or also when the player try to take it from the garage.
}
}


Once it's done, you can edit your cars in-game to select the customcheck "VIP only".