Of course this is possible, most of scripting in fivem serverside has the limits of your imagination.
But as for an example? hmm you are asking alot, This is a hefty scripting undertake to write. Your best bet is to download some of the scripts freely available in the community that closely match your needs. Examine them, learn from them.
You need to decide what language you wish to code ie Java/lua/c#. and learn from the official natives also which provide alot of examples and insights.
Break it down into smaller chunks first. Start with how the ordering works, you going to need a database so look into how that works. then move to the next stage. This will take a long time for a new person to get their head round especially having to debug things as you code. But persist you will get there.
If you want an example you are better off trying to find something ready made and maybe adapt it to your needs.
Not trying to be obstructive, but you can learn alot from other scripts and the native docs. I started 2 weeks ago and can do many things already even quite complicated stuff i thought would be hard.
Good Luck!
(oh and ask if you get stuck, lots of knowledge here but bitesized questions on a particular piece of code is more likely going to get you and answer than examples of a massive script!)
it is for a “new to scripting” person is what i tried to get across. But to the experienced probably not. More time debugging to be fair when learning the natives.
I say the easiest thing to start with would be item#3. In this case, you get to work with vehicle spawning basics, navigation basics, entity management basics, and a lot of the tutorialstuff that helps you understand how the general scripting workflow works.
Spend time and focus on the basics, and once you can get a vehicle to drive from point ‘a’ to point ‘b,’ you pretty much have the delivery method down.
IN FACT, if you wanted to, you can use imaginaation and pretend you have steps one and two (aka rp I guess, lol), and step 3 would just drive to random points.
HOWEVER, if you want something a little more tangible, that’s when you want to start working on task #1. For 1, you’ll need a fake in-game website, (OR if that’s too ambitious of a task, a simple menu).
Lastly, depending on how complex you wanna get for step 2, you can go from something as complex as:
a fully fledged database in the backend,
to something like
a few variables / javascript objects to track the status,
to even something as simple as
you and your friends pretending the order is made, and sending your script you created in #3.
Of course there’s no perfect way to start, continue, or finish, but this way will give you quick learning, immediate feedback, and many options based on how deep you want to go.