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

Advanced Experience System


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

Napisano 15.01.2014 07:45

Advanced Experience System
- v0.3, last updated : 12.01.14

Multimod experience system with ranks, bonuses and API.
  • Main plugin [ aes_main.amxx ]:
    • players database
    • basic API
    • determines experience for levels
    • sets levels name
  • Experience collectors [ aes_exp_cstrike.amxx ]:
    • how players will incrase their experience and receive bonus points
    • experience calculating
  • Bonus system [ aes_bonus_system.amxx ] (optional):
    • API for made own bonuses
    • defines what players can spend their points bonus
    • /anew command
Requirements:
  • AMXX 1.8.2 hg26 or higher
Configuration:

All configuration files are stored in aes folder (addons/amxmox/configs/aes).
Default configuration: addons/amxmodx/configs/aes/aes.cfg. Executing on map load.



Default configuration



PHP Code:


// -- aes_main.amxx -- //

// Database settings.
// 0 - disable
// 1 - use file /amxmodx/data/aes/stats.ini
// 2 - use SQL database
aes_db_type "1"

// Prune time (inactivity days), inactive players will be deleted from stats.
// If set to 0, then no prune.
aes_db_prune_days "0"

// Rank mode.
// 0 - Nick
// 1 - SteamID
// 2 - IP
aes_track_mode "1"

// Level settings.
// Sets experience value for level. How much experience player needs to get to gain this level.
// One value of experience - one level.
// How many experience values you write here, so many levels will be.
// Do not forget to edit lang file.
aes_level "0 20 40 60 100 150 200 300 400 600 1000 1500 2100 2700 3400 4200 5100 5900 7000 10000"
// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

// -- aes_exp_cstrike.amxx -- //

// XP for kill.
aes_xp_frag "1"

// XP for headshot.
aes_xp_hs "2"

// XP for bomb planting.
aes_xp_c4_plant "1"

// XP for bomb explode.
aes_xp_c4_explode "3"

// XP for bomb defuse.
aes_xp_c4_defused "4"

// XP for hostage got.
aes_xp_hostage_got "1"

// XP for hostage rescue.
aes_xp_hostage_rescue "1"

// XP for escaped as V.I.P.
aes_xp_vip_escaped "4"

// XP for V.I.P assassination.
aes_xp_vip_killed "4"

// FFA mode.
aes_xp_ffa "0"

// Bonuses for frags, headshots and etc.
// Syntax: "<frags> <bonus num> <frags> <bonus num> <frags> <bonus num> and etc."
// Players can use bonuses in /anew menu.
// 0 - disable.

// for frags
aes_anew_frags "10 1 20 2 30 3 40 5"

// for headshots
aes_anew_hs "7 1 14 2 20 3 30 4"

// for knife frags
aes_anew_knife "1 1 2 1 3 1 4 1"

// for he frags
aes_anew_he "4 1 5 1 6 1 7 2"

// Frags for bonuses reset on
// 0 - never resets
// 1 - on player die
aes_anew_reset "1"

// -- aes_informer.amxx -- //

// Show message on level up. 1 - only for player. 2 - for all. 0 - disable.
aes_newlevel_chat "2"

// HUD update interval
aes_hud_update "1.5"

// Enable HUD informer about current rank and experience
aes_hud_info_default "1"

// Informer type 1 - Hud. 0 - disable
aes_hud_info_type "1"

// Informer color. Red, Green and Blue.
aes_hud_info_color "100 100 100"

// Informer position. X and Y axis.
aes_hud_info_pos "0.01 0.13"

// Bonus informer type. 1 - Hud. 0 - disable
aes_hud_anew_type "1"

// Bonus informer color (r g b).
aes_hud_anew_color "100 100 100"

// Bonus informer position (x y).
aes_hud_anew_pos "-1.0 0.90"

// -- aes_bonus_system.amxx -- //

// Enable bonus system.
aes_bonus_enable "1"

// Bonus system will be disabled until this round.
aes_bonus_firstround "3"

// Disable bonus system on certain maps.
aes_lockmap "35hp"
aes_lockmap "35hp_2"
aes_lockmap "35hp_gx"
aes_lockmap "35hp_gladiators_day"
aes_lockmap "most_wanted"
aes_lockmap "35hp_xmas"
aes_lockmap "35hp_3"
aes_lockmap "aim_afl_deagle"
aes_lockmap "awp_8bit"
aes_lockmap "awp_india"
aes_lockmap "awp_india_csp"
aes_lockmap "awp_pit"
aes_lockmap "ka_100x100"
aes_lockmap "ka_wintershank"

// -- aes_main.amxx -- //
// > SQL < //

// SQL connection details.

// SQL Host.
aes_sql_host "localhost"

// SQL User.
aes_sql_user "root"

// SQL Password.
aes_sql_password ""

// SQL Database.
aes_sql_db "amxx"

// SQL AES Table.
aes_sql_table "aes_stats"

// Maximum SQL connection fails.
// After reaching SQL fails limit plugin stops connects to database until map end.
aes_sql_maxfail "10"

// SQL Driver.
// mysql or sqlite.
aes_sql_driver "mysql"

Installation
  • aes_main.amxx - main plugin.
  • aes_exp_cstrike.amxx - experience collector and bonus giver for CSTRIKE.
  • aes_informer.amxx - HUD and chant informer.
  • aes_bonus_system.amxx - AES Bonus System.
  • aes_bonus_cstrike.amxx - special cstrike bonuses.
Bonus system
Bonus system is optional plugin for AES.

Bonus system supports 2 type of bonuses: spawn bonuses and bonus items for bonus points.
Spawn bonuses awards for players on spawn if he has required level for this bonus.
Bonus points needs to get bonus items in /anew menu.

Configuration:


Bonus system configuration file is a addons/amxmodx/configs/aes/bonus.ini.

In configuration use two segments:

  • [spawn] - sets spawn bonuses.
  • [bonus_menu] - sets items in /anew menu.
Every new item must be defined with <give> or <call> construction.
  • <give> construction - gives items from item field.
  • <call> construction - calls function from another plugin.
Construction fields:
  • item - item name for <give> construction
  • name - item name in menu, you can use LANG_ prefix for use dictionary aes.txt
  • levels - sets how many items should player get for each level. Items give count for <give>. Passing as 2nd parameter in <call>. Use -1 for dont call function on this level.
  • plugin - plugin file name for <call>.
  • function - function name in plugin for <call>. 1st parameter - players id, 2nd parameter - value from levels field.
  • points - bonus points for use this item in /anew menu.
Default bonus system configuration



PHP Code:


;
;
Advanced Experinece System
; by serfreeman1337
;

;
NARKILO BONUS SYSTEM

[spawn]

<
give>
item = weapon_hegrenade
name
= LANG_AES_BONUS_NADE
levels
= 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

<give>
item = weapon_flashbang
name
= LANG_AES_BONUS_FLASHBANG
levels
= 0 0 0 0 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 2

<give>
item = weapon_smokegrenade
name
= LANG_AES_BONUS_SMOKENADE
levels
= 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

<call>
plugin = aes_bonus_cstrike.amxx
name
= LANG_AES_BONUS_DEFKIT
function = roundBonus_GiveDefuser
levels
= -1 -1 -1 -1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

<call>
plugin = aes_bonus_cstrike.amxx
name
= LANG_AES_BONUS_NV
function = roundBonus_GiveNV
levels
= -1 -1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

<call>
plugin = aes_bonus_cstrike.amxx
name
= LANG_AES_BONUS_ARMOR
function = roundBonus_GiveArmor
levels
= -1 -1 -1 -1 -1 -1 -1 2 2 2 2 2 2 2 2 2 2 2 120 150

<call>
plugin = aes_bonus_cstrike.amxx
name
= LANG_AES_BOUNS_HP
function = roundBonus_GiveHP
levels
= -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1


[bonus_menu]

<
call>
plugin = aes_bonus_cstrike.amxx
name
= LANG_AES_BONUS_M4A1
function = pointBonus_GiveM4a1
points
= 1

<call>
plugin = aes_bonus_cstrike.amxx
name
= LANG_AES_BONUS_AK47
function = pointBonus_GiveAk47
points
= 1

<call>
plugin = aes_bonus_cstrike.amxx
name
= LANG_AES_BONUS_AWP
function = pointBonus_GiveAWP
points
= 1

<call>
plugin = aes_bonus_cstrike.amxx
name
= LANG_AES_BONUS_10000M
function = pointBonus_Give10000M
points
= 1

<call>
plugin = aes_bonus_cstrike.amxx
name
= LANG_AES_BONUS_200HP
function = pointBonus_Set200HP
points
= 1

<call>
plugin = aes_bonus_cstrike.amxx
name
= LANG_AES_BONUS_MEGAGRENADE
function = pointBonus_GiveMegaGrenade
points
= 1

<call>
plugin = aes_bonus_cstrike.amxx
name
= LANG_AES_BONUS_MEGADEAGLE
function = pointBonus_GiveMegaDeagle
points
= 1

; serfreeman1337
; Nov. 2013

More info coming soon... (if i found the way how to translate to english :D)

Attached Thumbnails
https://forums.allie...38;d=1389767871 https://forums.allie...38;d=1389767896 Attached Files Dołączona grafikaaes_v0.3.zip (63.8 KB) Dołączona grafikaGet Plugin or Get Source (aes_main.sma - 21.9 KB) Dołączona grafikaGet Plugin or Get Source (aes_informer.sma - 5.7 KB) Dołączona grafikaGet Plugin or Get Source (aes_exp_cstrike.sma - 8.5 KB) Dołączona grafikaGet Plugin or Get Source (aes_bonus_system.sma - 9.2 KB) Dołączona grafikaGet Plugin or Get Source (aes_bonus_cstrike.sma - 5.5 KB)

Wyświetl pełny artykuł




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

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