Registering Papers
From this section, you can learn how to create papers and use them.
Types
PaperContext
id
string
Unique id of the paper
label
string
Label of the paper
price
number?
Price of the paper
icon
string?
canPublish
function(source: number): boolean
Function that determines is player allowed to publish article from this paper.
canDelete
function(source: number): boolean
Function that determines is player allowed to delete article from this paper.
onPurchased
function(source: number)?
Function that executes when someone purchased a newspaper from this paper.
How to Register Paper?
You can register paper using API.RegisterPaper. You can find default WeazelNews paper in
no-newspaper/newspapers/sh_weazelnews.lua
You can copy this file and edit variables to create a new paper or you can register paper from another resource using API. API examples can be found in no-newspaper/api/server/examples.lua
Examples
Last updated