This script is a simple, image based newspaper script. Some of the main features are:
Supports any number of pages
Multiple locations (add more in config.lua file), or use qb-target on newspaper dispencer models.
Supports image sources from web address, allowing updates without restarting script (see info in config.lua, replacing “weblocation” with the web address of your file folder).
Click to open the next page. Use Esc to stop viewing. It’s a pretty minimal, light-weight script that could easily be adapted for other uses (photo books, comic books, server rules, etc.). github
next step make a item and the player need to drop the old paper in trashcans and trashjob make them empty and with old paper and a worktool craft a new item or simple after take the newspaper walkable?
i ve a little problem, i want to have 2 differents wallpapers-, i duplicate your mod , the second wallpaper appear in game correctly but when i close this wallapaper, my ped stay block with paper in hand.
the call back pass to the RegisterNUICallback in the 1srt news mod, and my display in 2nd mod stay in true.
If I understand you correctly, you have the mod installed twice - did you rename the second version? If so, the script.js file is likely still calling the original. You need to update ‘https://news/close’ by replacing “news” with whatever you named the second install:
Hey, I wanted to say that I love this resource and think it’s an amazing idea!
So I got the location of 261 different newspaper boxes on the map and added them into a config file for anyone to use! Simply copy the contents and replace the “Config.NewsLocations” and they should all be there!
Yes - you need to update the fxmanifest.lua file. It is loading jpg files:
‘client/html/*.jpg’
you can change it to png files:
‘client/html/*.png’
You also need to update index.html (change jpg to png in two places):
<img src=“page1.jpg” id=“img” alt=“image not found” onerror=this.src=“page1.jpg” onclick=“changePage(this);”>