Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.03 KB

File metadata and controls

42 lines (31 loc) · 1.03 KB

A simple add system

Just a very simple script. It adds the possibility to publish an ad. The ad is displayed to every player in the server via a notification.

Easy changes to make

Change add price

You can simply modify the price of an ad. To do that, you just have to modify the variables called "price" in cl.lua and sv.lua.

RegisterServerEvent("pub:check_money")
AddEventHandler("pub:check_money", function(text, title)

    local _source = source
    local xPlayer = ESX.GetPlayerFromId(_source)
    local price = 50
function Pub()
    local price = 50

Add money to a society

You simply have to uncomment the 3 following lines in sv.lua:

TriggerEvent('esx_addonaccount:getSharedAccount', 'society_weazel', function(account)
    account.addMoney(price)
end)

Change location

Simply modify the global called position in cl.lua

local position = vector3(-1083.1131, -245.848, 37.76)

Pictures

alt text

alt text