![]() |
News System
I've noticed that most UC servers are looking for news systems.
Add this to all players and poof you can easily edit the news from the client, within the news system. Also, you can use HTML code so that you can edit your news more cleanly. This is what my news code on Vortex looks like so far. PHP Code:
Some HTML coding is PHP Code:
PHP Code:
PHP Code:
|
Screenshots?
PHP Code:
PHP Code:
PHP Code:
|
Quote:
|
Style your code properly, if you don't know how use my 'GS2 beautifier'.
Instructions: 1. Go to http://fp4.ca/gs2beautifier/ 2. Paste your code into the window 3. Click 'Beautify GS2' Replace your code on the forums with the 'beautified' version. @Emera: Did you really have to quote the OP? It's just wasting space. |
Quote:
|
Quote:
|
Thanks for helping FP4
|
On topic:
Big Issues serverr variables are automatically synced with the client so there's no reason for your script to request, and pull the data from the server because it already has it. You would be better off storing the news data in a DB-NPC instead of a server variable, if someone updates the server flags with RC it will probably break your news variable if it's too long. Your 'this.can' array for those who can change the news is pointless because you don't verify it on the server-side so a hacker can easily update it without issue. Minor Issues As Emera pointed out getIt() is a very non-descriptive, renaming it getNews() or getNewsData() would be much more helpful. You don't log (savelog2) when news changes occur, log information like this is useful when abuse happens. Your calculation to center the news is a little off. To center it properly: PHP Code:
On the server-side I would recommend adding: PHP Code:
|
All times are GMT +2. The time now is 09:07 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.