[PAID][CUSTOMIZABLE] MFPD-Vendor [Gun Van Inspired] - Extremely configurable (Preset/Custom Routes, Vehicle Customization and more!)

MFPD-Vendor was made as a random idea of resource, as of now, it fully works without any “objective” just a life-bringing resource, that will randomly spawn events with random vehicles/peds/actions, so maybe it can be used/modified along with your server.

The event can spawn peds with vehicles in preset locations listed in “MFPDVendor.Locations”, the ped will wander around and then after some time (all configurable in the config.lua) the ped will close the vehicle doors and drive to another destination;

Then perfom the same wander again, it can react as normal ped or as agressive, and it’s driving style will vary, depending on what you set up in the config.

I know, the idea is kinda “random” but as I said, anyone that may come accross and like the resource, I’ll be appreciated.

image

CUSTOM VEHICLE NOT INCLUDED, THIS IS JUST REPRESENTATIVE IMAGE OF THE RESOURCE WORKING.

Preview:

Showing how the ped wanders/vehicle position and leaving the area:

Showing if the ped was marked to have a chance to be agressive, if so, it will react to the player.

This resource has documentation file explaining some basic exports and how to use them, keep in mind that all of these exports are a “test”, if needed, in the near future I can enhance their functionality even more.

Buy the resource $3,00 :heart:

:gear: Configuration file Overview for MFPD-Vendor :gear:

I’ve made this resource to work kinda as a “base” for something else, or just use the way it was made, It’s a random idea I had, and just wanted to share as maybe someone thought about it.

This resource is intended to work automatically, with cooldowns and re-tries, but there’s a command to force the spawn of said event.

Made extremely easy to config to your liking without the need to know a lot about coding, making sure anything is within the range knowledge of most people.

Framework Configuration

  • Config.Framework:
    • Description: Sets the framework the resource is compatible with.
    • Options: "ESX", "QBCore", or "Standalone".

This resource does not relies on jobs/anything related to work, the Framework option is so admins can forcefully spawn the vendor w/ the command “/mfpdveh” *For testing purpouses or by using alongside another resource.

Blip Configuration

  • Config.MFPDBlipFlashDuration:

    • Description: Duration (in milliseconds) that the vehicle blip flashes on the map.
    • Default: 20000 (20 seconds).
  • Config.MFPDisableCommand:

    • Description: Toggles the ability to use the command for spawning vehicles.
    • Default: false. Set to true to disable the command, which is useful for testing.
  • Blip Attributes:

    • Config.MFPDBlipName: Custom name for the blip shown on the map.

    • Config.MFPDBlipSprite: Defines the sprite (icon) used for the blip. Refer to the FiveM documentation for available options.

    • Config.MFPDBlipColour: Sets the color of the blip. Available colors can be viewed in the FiveM documentation.

    • Config.MFPDBlipScale: Adjusts the size of the blip on the map. Default scale is 0.75.

Spawn Locations

  • MFPDVendor.Locations:

    • Description: List of coordinates where vendor vehicles can spawn or drive to. Each location is defined as a vector4 with x, y, z coordinates and a heading angle.
    • Customization: Add or remove locations as needed to fit your server’s map and gameplay.
-- Locations where the vehicle can spawn and head to.

MFPDVendor.Locations = {
    vector4(2663.4, 1468.87, 24.24, 87.95),    
    vector4(-2166.2, 4289.27, 48.73, 2.99),    
    vector4(1904.89, 565.21, 175.56, 64.14),   
    vector4(2340.29, 3049.8, 47.89, 126.14),    
    vector4(1099.72, -332.29, 66.95, 303.87),   
    vector4(779.12, -3264.46, 5.7, 359.72),    
    vector4(795.66, 1209.76, 338.97, 149.13),  
    vector4(-29.69, 6435.22, 31.16, 225.96),    
    vector4(-784.54, 5401.67, 33.94, 276.07),   
    vector4(1795.78, 3896.59, 33.86, 19.38),   
    vector4(-1331.36, -1163.77, 4.31, 90.62),   
    vector4(1502.98, -2146.84, 76.78, 93.68),   
    vector4(1137.16, -1358.75, 34.32, 90.58),   
    vector4(-57.09, -2659.31, 5.74, 180.31),   
    vector4(-477.89, -741.33, 30.3, 88.75),    
    vector4(1334.48, 2759.59, 51.07, 356.52),  
    vector4(1466.05, 6554.09, 13.76, 301.7),    
    vector4(974.26, -1718.6, 30.29, 264.62),    
    vector4(275.28, 66.31, 94.11, 160.66),     
    vector4(-3192.8, 1076.83, 20.6, 155.1),     
    vector4(-587.58, -1637.41, 19.61, 60.15),   
    vector4(-1454.57, 2668.4, 3.25, 140.45),    
    vector4(-20.95, 3046.52, 40.75, 77.09),     
	vector4(477.5811, -1281.89, 29.53805, 169.8939),
	vector4(-1025.974, -1130.621, 2.167087, 114.4367),
	vector4(-1577.17, -273.3307, 48.27573, 204.6474),
	vector4(-1735.337, -728.4868, 10.42255, 141.0248),
	vector4(2266.8, 1067.432, 69.28223, 177.8164),
	vector4(2558.053, 768.3066, 90.39507, 21.87883),
	vector4(1110.57, -782.4226, 58.26273, 173.0317),
}

Cooldown Settings

  • MFPDVendor.CooldownTime:

    • Description: Time (in seconds) players must wait before another vehicle can be spawned.

    • Example: 1800 for 30 minutes.

Event Chance

  • MFPDVendor.EventChance:

    • Description: Percentage chance that the vendor event occurs when a spawn request is made.

    • Example: 20 means a 20% chance for the event to trigger.

Vehicle Configuration

  • MFPDVendor.Vehicles:

    • Description: List of vehicle models available for spawning. Ensure that the vehicle models are compatible with the server build. (Just remove newer ones if using a specific build).

    • Customization: Add more vehicles to the list based on your server’s needs.

MFPDVendor.Vehicles = {
    "speedo5", -- BUILD 2944 is the minimum required to be able to see this vehicle, if you do not want this requirement, just remove from the list.
    "speedo",
    "burrito",
	"gburrito2",
	"paradise",
	"pony",
	"pony2",
	"rumpo",
	"youga3",
	"minivehicle",
	"rumpo3"
	-- add more vehicles here.
}

Pedestrian Configuration

  • MFPDVendor.Peds:

    • Description: List of pedestrian models that can be spawned with the vehicles.

    • Customization: Add or remove ped models as necessary, keeping in mind compatibility with the server build.

MFPDVendor.Peds = { -- Add more peds here or remove if needed. -> Keep in mind the game build necessary to see the NPCs listed.
    "U_M_Y_GunVend_01",   
    "S_M_Y_Dealer_01", 
    "G_M_Y_Lost_02",   
    "G_M_Y_Ballasout_01",
    "G_M_Y_African_01",  
    "G_M_Y_African_02", 
    "G_M_Y_Ballas_01",  
    "S_F_Y_Migrant_01",
    "A_M_M_EastSA_01",
    "A_F_M_BevHills_01",
    "A_M_M_Salton_01",
    "A_F_Y_Tourist_01",
    "A_M_M_GenStreet_01",
    "A_F_M_Indian_01",
    "A_M_M_FatLatin_01",
    "A_F_Y_Hippie_01",
    "A_M_M_MexLabor_01",
    "A_F_Y_Vinewood_01",
    "A_M_M_FatWhite_01",
    "A_F_M_EastSA_02",
    "A_M_Y_Gay_01",
    "A_F_M_BevHills_02",
    "A_M_M_Salton_02",
    "A_F_Y_Tourist_02",
	-- add more peds if needed here.
}
  • Config.MFPDPedWanderTime = 10000 – Time in milliseconds the ped will wander around. Default is 10000ms (10 seconds)

Pedestrian Weapon Configuration

  • MFPDVendor.PedWeaponConfig:

    • Description: Settings for whether peds spawn with weapons.

    • Attributes:

      • spawnWithWeapons: Set to true to allow peds to spawn with weapons.

      • weaponChance: Percentage chance that a ped will spawn with a weapon from the provided list.

      • ammoCount: Amount of ammo the ped will have.

      • weapons: List of weapons that the ped can spawn with.

MFPDVendor.PedWeaponConfig = {
    spawnWithWeapons = true,  -- Set to false to disable weapon spawn. --> Keep in mind, it still requires the percentage below to really spawn with a weapon.
    weaponChance = 40,        -- Chance (in percentage) the ped has to spawn with a random weapon from the 'weapons' list.
    ammoCount = 320,          -- Default ammo the ped will spawn.

    weapons = {

        `WEAPON_PISTOL`,
        `WEAPON_PISTOL_MK2`,
        `WEAPON_COMBATPISTOL`,
        `WEAPON_APPISTOL`,
        `WEAPON_STUNGUN`,
        `WEAPON_PISTOL50`,
        `WEAPON_SNSPISTOL`,
        `WEAPON_SNSPISTOL_MK2`,
        `WEAPON_HEAVYPISTOL`,
        `WEAPON_VINTAGEPISTOL`,
        `WEAPON_MARKSMANPISTOL`,
        `WEAPON_REVOLVER`,
        `WEAPON_REVOLVER_MK2`,
        `WEAPON_DOUBLEACTION`,
        `WEAPON_CERAMICPISTOL`,
        `WEAPON_NAVYREVOLVER`,
        `WEAPON_GADGETPISTOL`,
        

        `WEAPON_PUMPSHOTGUN`,
        `WEAPON_PUMPSHOTGUN_MK2`,
        `WEAPON_SAWNOFFSHOTGUN`,
        `WEAPON_BULLPUPSHOTGUN`,
        `WEAPON_ASSAULTSHOTGUN`,
        `WEAPON_MUSKET`,
        `WEAPON_HEAVYSHOTGUN`,
        `WEAPON_DBSHOTGUN`,
        `WEAPON_AUTOSHOTGUN`,
        

        `WEAPON_MICROSMG`,
        `WEAPON_SMG`,
        `WEAPON_SMG_MK2`,
        `WEAPON_ASSAULTSMG`,
        `WEAPON_COMBATPDW`,
        `WEAPON_MACHINEPISTOL`,
        `WEAPON_MINISMG`,
        

        `WEAPON_ASSAULTRIFLE`,
        `WEAPON_ASSAULTRIFLE_MK2`,
        `WEAPON_CARBINERIFLE`,
        `WEAPON_CARBINERIFLE_MK2`,
        `WEAPON_ADvehicleCEDRIFLE`,
        `WEAPON_SPECIALCARBINE`,
        `WEAPON_SPECIALCARBINE_MK2`,
        `WEAPON_BULLPUPRIFLE`,
        `WEAPON_BULLPUPRIFLE_MK2`,
        `WEAPON_COMPACTRIFLE`
    }
}

Vehicle Customization

  • MFPDVendor.Vehicle:
    • Description: Controls the appearance of the vehicle regarding color and plate.
    • Attributes:
      • randomize: Set to true to randomize the vehicle’s color and plate. If false, use the specified colors and plate.
      • color: Default primary and secondary colors when randomization is disabled.
      • plate: Unique plate number if randomization is disabled.
MFPDVendor.Vehicle = {
    randomize = true, -- Set to true for randomize, false for manual customization of color/plate
    color = {
        primary = 7,   -- Default primary color when randomize is false.
        secondary = 0  -- Default secondary color when randomize is false.
    },
    plate = "31EVL500" -- Set the unique plate here if randomize is false.
}

Route Configuration

  • MFPDVendor.RoutesEnabled:
    • Description: Enable or disable custom driving routes for the vendor vehicle.
    • Default: false. Set to true to activate custom routes.
  • MFPDVendor.Routes:
    • Description: List of routes for the vendor vehicle. Each route is defined as a vector4.
    • Customization: Modify existing routes or add new ones based on your gameplay requirements.
MFPDVendor.RoutesEnabled = false  -- Set to true to use custom routes; false to disable
MFPDVendor.Routes = { -- Random routes as placeholder, change them to your desire.
    vector4(874.9107, -1659.51, 30.36636, 266.7491),  -- Industrial Area
    vector4(743.4841, -980.7661, 24.71624, 92.55607),  -- Lester Factory
    vector4(-1882.401, 183.3516, 83.2382, 313.3805),  -- Residential Area near Kortz Center (North Rockford Drive)
    vector4(431.711, -1776.074, 28.84346, 323.0203),   -- Jamestown St. Alley
	-- add more here
}

Buy the resource $3,00 :heart:


Code is accessible No (Only codes accessibles are server.lua and config.lua)
Subscription-based No
------------------------------------- ----------------------------
Lines (approximately) 600+
------------------------------------- ----------------------------
Requirements *Minimum requirement → gamebuild 2944+(or newer) **Just remove newer DLC peds/vehicles if you do not want to use latest DLC’s.
------------------------------------- ----------------------------
Support Yes - Expect some delay in response, but I’ll try my best, that’s why I’ll leave the resource very cheap to purchase. (Support Via Post Comments or DMs)
------------------------------------- ----------------------------