[RELEASE] [FREE] Newspaper Script

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

32 Likes

Very nice.
Can you upload the background you used on your test pages, It has a nice paper look

3 Likes

Sure, here you go:

4 Likes

Nice I’m trying to get a reporter kind of job in my server, this will certainly help with it!

4 Likes

very nice :slight_smile: lock and loadet :slight_smile: <3

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 :slight_smile: or simple after take the newspaper walkable?

1 Like

very nice :laughing:

1 Like

Very cool

1 Like

finally a use for my empty hashes… thank you for the ressource…

        local DailyRagNewspaper = { 1211559620, 720581693, -1186769817, -377891123, }
        exports['qtarget']:AddTargetModel(DailyRagNewspaper, {
            options = {
                { event = "event:Open_Newspaper", icon = "far fa-newspaper", label = "Newspaper full of bad news..", price = 10, }, 
            },
            distance = 2.5
        })  
1 Like

what does this use target system or drawtext ?

Drawtext with message “Press E To Read Newspaper”

wow, that’s a really interesting rp resource. good work.

1 Like

You put this in client right ?

Screenshot by Lightshot Playing around with it, thank you for the script man !

3 Likes

Hi , great job thx

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.

Can you help me about that ?

1 Like

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:

news.Close = function() {
	container.style.visibility = "hidden";
	$.post('https://news/close');
}
1 Like

Exactly, sorry for my english. :wink: ( vive la baguette )

Everything is now working as I wish!!!

Great mod & support

Thx!!!

2 Likes

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!

Look for this prop!
image

File:
tempNews.lua (18.2 KB)

I hope this helps anyone who may need more locations!

6 Likes

Wow, awesome @Ooga_Raccoon - that is a lot of work! Thanks for sharing the file!

1 Like

Could someone help me to make this use .PNG instead of JPG ? I’ve tried changing the format but the pictures don’t show up when i open it.

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);”>