[Release] Adverts 0.5

This script will automatically send advertisemtns like a simple server rule or whatever you put as an advertisement as a chatMessage to the global chat every so often.To add your custom advert open up server.lua and edit the string that shows “Adverts” at bottom TriggerClientEvent with your own whether you want it as a rule or website or some info about your server.
adverts.zip (1.2 KB)


UPDATE: Fixed bugs, re-wrote script. Thanks for the help Mr.Scammer

Could you show a picture of where to add your own text please or the code where i can add my own thanks bro.

All the way at the bottom of the server.lua you will see…

TriggerClientEvent(“chatMessage”, -1, “AD”, {255, 255, 255}, “Adverts”) << Edit “Adverts” in the quotations to whatever you want

When trying to load server with this resource loading my server crashes at start. I’m sure its a small mistake of mine but i’m missing it. If anyone could point me in direction of maybe my files are incorrect. Added - adverts to my citmp-server

Is this avdert a loop that shows every 15 mins for example or this is a one time thing it shows on the server?

shows up like erry 5 minutes

here is an update of this by Cody himself the code has been rewritten to work a lot better now it supports multiple adverts will sent 1 message every so often go thru the list of messages you want in the table in server.lua and after the cycle is completed it will restart go to server_adverts and find the lines

if nextadvert == 8 then (change the 8 to the number of used adverts)
if nextadvert == advertCount then(edited)

adverts.zip (1.8 KB)