Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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

Played Time: Extended v0.1


  • 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:7179
  • Lokalizacja:AMXX.PL
Offline

Napisano 27.11.2012 19:16

.: Played Time: Extended :.

** Info **Everyone knows Alka's Played Time plugin. It doesn't really have many features, doesn't support SQL saving, and it only shows the top motd for online players only.After seeing many requests about the motd, I decided to make a new plugin, which people will be able to switch between SQL or nvault saving. Also I added new features which are described as I continue.** New features **
  • Ability to switch easily between SQL and nVault to save players times. (Changed from .sma file)
  • Top motd now shows all saved players. (For both SQL and nVault)
  • New command amx_show_player_times.
  • Added donate menu. Players will be able to donate time to each other by just a chat command.
  • Added natives for sub-plugins.
  • Ability to switch between colored chats or normals.
  • Added connect messages. (Can be disabled by a cvar)
  • Names and times are now saved by steamids.
  • Name is updated on each name change.
  • More features coming soon as I update the plugin.
** Admin commands **Only one:amx_show_player_time IF the command was written by it self, it will show all players played time, else it will show the written argument timeExample: Code: ] amx_show_player_timeShowing players times of all connected players1. Khalid 25102. Brandon 2713. Solo[Pro] 41....] amx_show_player_time KhalidKhalid's total played time is 592 minutes] amx_show_player_time @TShowing players times for team Terrorist1. Khalid 2512. BOT* NiceOne 243...** Cvars ** PHP Code:

pte_allow_donate "1" // Allow donatingpte_show_connect_messages "1" // Show messages upon connect

** Requirments ** Code: #include #include // If your using nVault to save time for players, you will need nvault_util// Link can be found at the end of the thread#include // If your using SQL, you will need sqlx#include // If you are using colored chat, you will need this include (can be found at the attachments)#include You also going to need a STEAM server!** Editing **Open the .sma file.In the top of the file you should see this: PHP Code:

// 1 = SQL// 2 = nVault#define SAVETYPE 2

Just change the number to change between saving types.If your using SQL, you will need to edit host, user, user's password, and databaseJust find this in the file and change them (It should be in the first lines) PHP Code:

new const gsz_SQLINFO[][] = { { "127.0.0.1" }, // HOST { "root" }, // USER { "" }, // User's password { "amxx" } // Database Name}

If you want colored messages, just uncomment this line (Also in the top of the plugin) by removing // PHP Code:

//#define COLORED_MESSAGES// It will be#define COLORED_MESSAGES

** Credits **Alka - Original plugin idea.Exolent[jNr] - For showing how to make a top motd with nvault_util HereBugsy - For the nvault_util include** Changelog ** Code: v0.1 | 27/11/2012 - Initial release.You can download nvault_util.inc (you will need it if you want to save times by nVault) from here: Click meOr you can download it from the attachments.** To do **
  • Add new natives (If it will be in handy)
  • Fix some bugs (If there are any)
  • Add new features
  • Make Webstats (When I learn PHP :P)
  • Make sub-plugin example on how to use natives
  • Post the SoloGunner and GhostWalkers modes (MAYBE)
  • Replace ColorChat include with ChatColors include (Connors version)
PS: This code has nothing to do to Alka's plugin, I wrote this code from scratch, not just added new features to his plugin.If there are any suggestions, improvments, bug fixes, etc, please post here. Attached Files Dołączona grafika Get Plugin or Get Source (PlayedTime_Extended.sma - 21.1 KB) Dołączona grafika played_time.inc (392 Bytes) Dołączona grafika ColorChat.inc (3.1 KB) Dołączona grafika nvault_util.inc (3.4 KB)

Wyświetl pełny artykuł




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

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