Skip to main content

Open server/client function

we try to make sure that even if you have escorw versions of the script, you have access to as many functions as possible, a clear config is a certainty but we always try to open the server function keys which usually allow you to rebuild the script on basically any framework, when appropriate, it also opens some client functions. The notification, money, item, etc. functions are open.

example of RedM smoking script

open_server.lua
function openRemoveItem(src,itemName,amount)
print('openRemoveItem .. '..src,itemName,amount)
end

function openAddItem(src,itemName,amount)
print('openAddItem .. '..src,itemName,amount)

end

function openGetAmount(src,itemName)
print('openGetAmount .. '..src,itemName)
local amount = 1


return amount
end

function openGetLabel(src,itemName)
print('openGetLabel .. '..src,itemName)
local label = itemName

return label
end

function openSetMeta(src, item, meta, effect)
print('openSetMeta .. '..src, item, meta, effect)
-- effect = itemName

info = {
dynamicDescription = 'Puff: '..meta..' │ '..effect,
puff = meta,
effect = effect
}

-- add item with meta data
end