Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

News Viewer v1.0.3


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 476
  • Lokalizacja:AMXX.PL
Offline

Napisano 09.10.2011 15:17

News Viewer v1.0.3


Description:
Keep your players updated with this easy to use plugin.
Write your news in news.ini & the plugin will add the title to a menu
& display an MOTD with the article if chosen.


Features:
- Info messages
- Supports HTML formatting
- Only 1 file for all your news
- Background / font color cvars
- Style in news.ini will be taken over in the MOTD
- Read / Unread tags in titles menu
- Add news in-game using amx_addnews command


Cvars:
news_bgcolor #292421 "Default MOTD Background color"
news_fontcolor #BFBFBF "Default MOTD Font color"
news_advertdelay 400.0 "Time before showing news message again.

* Background & font colors can be set per MOTD using HTML formatting.
* I found these colors here.Google will help to find a color scheme creator or something if neccesary.


Usage:
Create amxmodx/configs/news.ini.
Add your news title with a * in front.
Write your article


Requirements:
You'll need the sqlvault.inc & sqlvault_ex.inc includes from here
& you'll have to compile locally with custom includes.


Commands:
- amx_addnews "Title" "Article"
RCON flag needed for this command.
Article will be at the top of both the menu & news.ini file.
You can use </br> with the command to break the current line & continue on a new one.

- say /news
Displays news menu.


Example:
Code: * Title
news bla <h1>something</h1>
<u>HACKS</u>
<b>Aimbot</b>
<font size="7">Boom Headshot</font>

* BLA
Some more news herewill result in this (v1.0.0 screenshots):

http://cloud.steampo...FC0865ABF80B1B/

http://cloud.steampo...5AD23D3D31DB01/

http://cloud.steampo...BDA2E8EDA719F6/

(v1.0.1 Screenshots)
Read / Unread news:
http://cloud.steampo...3B0315C373919C/


Changelog:
Code: v1.0.0: Created plugin
v1.0.1: Changed Motd_Limit to 1536 (ConnorMcLeod)
Added read/unread articles
Added amx_addnews command.
Added red/yellow menu text for unread/read messages.
v1.0.2: Optimized code & file handling.
v1.0.3: Small optimisationsCredits:
Code: nikhilgupta345: Reviewing my code & helped improving saving system alot & some other things.

All the people that made suggestions / optimisation tips.To do list:
Optional : Make me happy and use the ML system.
Optional : You could cache easily the cvars using Cvar Utilities.


Notes:
- To enable Colorchat, uncomment #define COLORCHAT on line 4 (Requires to compile locally)
- To change the "News" prefix, change new const g_szPrefix[] = "News"; on line 5
- If a news article is over the 1536 character limit, it will be skipped & written in the server logs.
- Both includes from here are needed to compile.
- Compiling must be done locally. For more info, check this tutorial.
- Since version 1.0.2, articles need to be written on the bottom of the file to be first in the menu.
Attached Files Dołączona grafika old_versions.zip (8.1 KB, N/A views) Dołączona grafika Get Plugin or Get Source (news_103.sma - 8.4 KB)

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych