Current Version: v1.0.0
I decided to release this script after a beloved server that I played on shut down. At the time I created this, I was working together with the developers to add some unique functionalities to the server. This was one of them.
What is MailDelivery?
In short, MailDelivery is a standalone mail delivery job that lets players deliver mail all around Blaine County.
A mail delivery man always has his own unique route, designated to one of the three towns: Paleto Bay, Grapeseed, or Sandy Shores, delivering his mail to mailboxes or other interesting places.
Standalone means that it does not have built-in ESX or vRP support. It does however have events that you can listen for.
Written fully in C#.
- Always receive a unique route in one of three towns with 10-12 delivery spots (out of max. 33)
- Marked delivery spots on the map
- Delivery spots are mailboxes, porches and other interesting spots
- Animation when delivering mail
- Rental spot in case the mail man doesn’t have his own PostOP Boxville yet!
- Rental vans are spawned in one of the free parking spots.
- Configurable min/max pay per delivery and other settings using ConVars
- Adaptable to your own system by using server events for payment and rental costs
Screenshots & Video
Installation & Configuration
Installation is simple, download the resource through the link above, add
start maildelivery to your
server.cfg and you’re ready to go. However, if you would like to configure settings or bind this to your existing economy system, see Configuration.
This resource triggers two events for you to conveniently integrate this job into your own system as well as various ConVars to modify settings (like minimum and maximum payments).
There are two server events that you can use to add delivery payments and rental costs to your existing economy system (for example ESX).
Description: Fired when a delivery has been made. Contains the payment amount between the min and max payment.
AddEventHandler("MailDelivery:DeliveryMade", function(payment) -- add payment to players bank account end)
Description: When renting a van, this event gets triggered with the set rental amount.
AddEventHandler("MailDelivery:VanRented", function(rentalAmount) -- deduct rentalAmount from players bank account end)
You can configure various aspects of the job using ConVars. Below is the list of all available ConVars and their default values if not set.
Name: “mail_min_payment” (Default: 150)
Description: The minimum payment of a delivery.
Name: “mail_max_payment” (Default: 1000)
Description: The maximum payment of a delivery.
Name: “mail_rental_amount” (Default: 2000)
Description: The rental cost when renting a mail delivery van via the rental spot.
Name: “mail_job_cooldown” (Default: 60000)
Description: Sets the cooldown time between going on/off duty. A security measure to prevent people from getting the optimal route.
Name: “mail_debug” (Default: false)
Description: A debug flag for developers (Only set this convar when developing!)
None as of right now
If you come across anything bugs/issues, please let me know in this topic or create an Issue.
If you require assistance, you can ask your question on this topic. Please don’t create topics elsewhere or ask me on the FiveM Discord about this resource. Lets keep all questions and comments in one topic, so we are all aware of what’s going on.
Last, but not least, some credits to people that have helped me get into FiveM coding and helped other wise.
I hope you enjoy the release. I want this resource to not only be one that community members can use, but also learn from. I feel there is a lack of C# resources as well as source code that developers can learn from.
If you have any requests, concerns, etc. please let me know.
You can modify or edit the code as you like, but you cannot re-release it. Please see the LICENSE.md