Level System

amxx reapi module Level System 1.2.3

Нет прав для скачивания
Установка
  1. Скомпилируйте плагины (Инструкция)
  2. Скопируйте скомпилированные файлы в директорию: amxmodx/plugins/
  3. Скопируйте файл plugins-levelsystem.ini в директорию: amxmodx/configs
Настройки
C++:
#define STATS 0 // If there are statistics on MySQL
    // 0 - MySQL statistics are not used
    // 1 - CsStats MySQL by SKAJIbnEJIb
    // 2 - CSstatsX SQL by serfreeman1337

Код:
// database address
// -
// Default: "localhost"
ls_db_host "localhost"
// Database User
// -
// Default: "root"
ls_db_user "root"
// Database Password
// -
// Default: ""
ls_db_password ""
// Database
// -
// Default: ""
ls_db ""
// Database Auto-creation
// -
// Default: "1"
ls_create_table "1"
// After how many days to delete inactive players from the database
// -
// Default: "7"
ls_clear_db_player "7"
// After how many days to clear the database
// -
// Default: "30"
ls_clear_db "30"
// Stop level system
// -
// Default: "0"
ls_stop "0"
// The value for calculating the experience to the next level. (CVAR value * player level)
// -
// Default: "500"
ls_exp_next_level "500"
// Maximum level
// -
// Default: "20"
ls_max_level "20"
// How many bonuses to give for reaching a new level
// -
// Default: "10"
ls_point_level "10"
C++:
// How much experience to give for killing a player
// -
// Default: "1"
ls_exp_killed "1"

// How much experience to give for killing a player with a knife
// -
// Default: "2"
ls_exp_killed_knife "2"

// How much experience should I give for killing a player with a grenade
// -
// Default: "3"
ls_exp_killed_grenade "3"

// How much experience should I give for installing a bomb
// -
// Default: "2"
ls_exp_planting_bomb "2"

// How many bonuses to give for killing a player with a knife
// -
// Default: "5"
ls_point_killed_knife "5"

// How many bonuses to give for killing a player with a grenade
// -
// Default: "5"
ls_point_killed_grenade "5"

// How many bonuses to give for installing a bomb
// -
// Default: "8"
ls_point_planting_bomb "8"

// How many bonuses to give for bomb disposal
// -
// Default: "8"
ls_point_defuse_bomb "8"

// The first N in the top get an experience multiplier
// -
// Default: "5"
ls_place_top "5"

// How many times to increase the experience of players in the TOP n
// -
// Default: "2"
ls_exp_multi "2"

// How many times to increase bonuses to players in the TOP n
// -
// Default: "2"
ls_point_multi "2"

// How long will the HUD alert be on the screen
// -
// Default: "5.0"
ls_holdtime_hud "5.0"

// HUD color (red shade)
// -
// Default: "0"
ls_hud_color_r "0"

// HUD color (green shade)
// -
// Default: "170"
ls_hud_color_g "170"

// HUD color (blue shade)
// -
// Default: "0"
ls_hud_color_b "0"

// HUD position (X)
// -
// Default: "-1.0"
ls_hud_position_x "-1.0"

// HUD position (Y)
// -
// Default: "0.8"
ls_hud_position_y "0.8"
C++:
// HUD Update Time
// -
// Default: "1.0"
hud_update_time "1.0"

// HUD color (red shade)
// -
// Default: "0"
hud_color_r "0"

// HUD color (green shade)
// -
// Default: "170"
hud_color_g "170"

// HUD color (blue shade)
// -
// Default: "255"
hud_color_b "255"

// HUD position (X)
// -
// Default: "0.01"
hud_position_x "0.01"

// HUD position (Y)
// -
// Default: "0.13"
hud_position_y "0.13"
Код:
// From which round to give out bonuses for levels?
// -
// Default: "3"
ls_bonus_round "3"
// Enable Hegrenade output?
// -
// Default: "1"
ls_bonus_he "1"
// From what level to issue HeGrenade
// -
// Default: "2"
ls_bonus_give_level_he "2"
// Enable flashbang output?
// -
// Default: "1"
ls_bonus_flashbang "1"
// From what level to issue FlashBang
// -
// Default: "3"
ls_bonus_give_level_flashbang "3"
// Enable smokegrenade output?
// -
// Default: "1"
ls_bonus_smokegrenade "1"
// From what level to issue smokegrenade
// -
// Default: "3"
ls_bonus_give_level_smokegrenade "3"
// Enable armor output?
// -
// Default: "1"
ls_bonus_armor "1"
// From what level to issue armor
// -
// Default: "5"
ls_bonus_give_level_armor "5"
API
Код:
#include <level_system_const>

// Returns the current player level
native ls_get_level_player(iPlayer)

// Sets the level to the player
native ls_set_level_player(iPlayer, Amount)

// Returns the player's current experience
native ls_get_exp_player(iPlayer)

// Sets the experience to the player
native ls_set_exp_player(iPlayer, Amount)

// Returns the maximum level
native ls_is_max_level()

// Returns the player's current bonuses
native ls_get_point_player(iPlayer)

// Sets bonuses to the player
native ls_set_point_player(iPlayer, Amount)

// Returns experience to the next level
native ls_exp_next_level(iPlayer)

// Checks if the system is stopped
native ls_stop_level_system()

/**
    Function for registering an item in the menu
    @param Name - Item name
    @Cost - Price per item
*/
native ls_item_register(const Name[], Cost)

/**
    The function gets the price of the item.
*/
native ls_item_get_cost(iItem)

/**
    The function is called when the menu is opened.
    Any actions before the purchase of the item are performed in it.
*/
forward ls_item_buy_pre(iPlayer, iItem, Cost)

/**
    The function is called when the item is available for purchase.
*/
forward ls_item_buy_post(iPlayer, iItem, Cost)
Сверху Снизу