Illegal selling script

## How does this script works?

  1. This is a simple selling script. The player interracts with the marker.
  2. He/she will be allowed to select the item he/she wants to sell at the menu.
  3. He/she has to write the number he/she wants to sell.
  4. There is a cooldown for each item he/she adds. The more piece he/she adds, the more he/she waits to collect the money.
  5. This action works synchronized with every player. If one player is already selling some items, everyone else has to wait for the sale to be completed before adding more items to sale.
  6. Once the waiting time is over, the first player who gets to the marker will be allowed to receive the money without checking who placed the items to sale.

## Why can anyone take the money? Why only one person can sell items at a time?

  • While coding this script, my goal was to create a block system so players has to defend the area and their valuable items.
  • The powerful groups who wants to sell their drugs, jewelry or other stuffs will have to defend it and other groups can try to capture the area and claim the rewards.

## What can be changed by config file?

  1. At the “lang.lua” you can change the language.
  2. You can change the requirements of active police members for the script to be active.
  3. You can add as many sellable items as you want.
  4. You can change the max numbers of the items to sale, how many seconds to wait for each piece to be sold and how much money an item will give for each and every item separately you add in menu.
  5. Marker coordiantes can be changed at the server.lua.

## Requirements

  • - extended framework
  • - mythic_notify


## Download!

gif

planting

My Other Script:

6 Likes

look interesting . wii try it out

1 Like

An idea for an update:

It is possible to specify several positions in the config so that the position changes when the script is restarted.

1 Like

if you want this simple operation i can set it up for you

Really? That would be great. I’ve tried this several times, but kept failing.

1 Like

delete the code here from last of server.lua

ESX.RegisterServerCallback('plt_illegalsatis:Checkkoord', function(source, cb, arg) 
    cb(vector3(873.5278, -2200.485, 30.51937))
end) 

add to the end of server.lua

local coords ={
    vector3(873.5278, -2200.485, 30.51937),
    vector3(873.5278, -2200.485, 30.51937),
    vector3(873.5278, -2200.485, 30.51937),
    vector3(873.5278, -2200.485, 30.51937),
}

local chosenCoord = coords[math.random(1,#coords)]

ESX.RegisterServerCallback('plt_illegalsatis:Checkkoord', function(source, cb, arg) 
    cb(chosenCoord)
end) 

Thats awesome, thanks man

1 Like

Bon Appetit

Nice work loved it.

1 Like

have fun

@plt_illegal-selling/server.lua:18: attempt to index a nil value
im have error

1 Like

İf you send to me server.lua by edited you. I can help you

Hi. Thanks
I just have fix error that.
Maybe i will buy script of you more than because you reply me very fast.
Hihi.
Thank you very much

Vào 05:58, CN, 19 Th6, 2022 p0lat via Cfx.re Community <thiscamefrom@fivem.net> đã viết:

1 Like

well im also thanks you.