l4d2-player-stats

所属分类:其他
开发工具:SourcePawn
文件大小:0KB
下载次数:0
上传日期:2019-06-05 01:36:10
上 传 者sh-1993
说明:  Left 4 Dead 2的简单游戏内玩家统计源代码插件,
(A simple in-game player statistics sourcemod plugin for Left 4 Dead 2,)

文件列表:
configs/ (0, 2019-06-04)
configs/playerstats.cfg (3611, 2019-06-04)
configs/sql-init-scripts/ (0, 2019-06-04)
configs/sql-init-scripts/mysql/ (0, 2019-06-04)
configs/sql-init-scripts/mysql/playerstats.sql (6954, 2019-06-04)
connect_announce.png (36480, 2019-06-04)
gamedata/ (0, 2019-06-04)
gamedata/smlib_colors.games.txt (2320, 2019-06-04)
player_join.png (36480, 2019-06-04)
player_rank.png (572923, 2019-06-04)
player_rank_extras.png (577271, 2019-06-04)
plugins/ (0, 2019-06-04)
plugins/l4d2_simpleplayerstats.smx (56376, 2019-06-04)
ranks_ingame.png (1520238, 2019-06-04)
scripting/ (0, 2019-06-04)
scripting/include/ (0, 2019-06-04)
scripting/include/smlib.inc (693, 2019-06-04)
scripting/include/smlib/ (0, 2019-06-04)
scripting/include/smlib/arrays.inc (3200, 2019-06-04)
scripting/include/smlib/clients.inc (81418, 2019-06-04)
scripting/include/smlib/colors.inc (14199, 2019-06-04)
scripting/include/smlib/concommands.inc (1151, 2019-06-04)
scripting/include/smlib/convars.inc (1374, 2019-06-04)
scripting/include/smlib/crypt.inc (18931, 2019-06-04)
scripting/include/smlib/debug.inc (587, 2019-06-04)
scripting/include/smlib/dynarrays.inc (722, 2019-06-04)
scripting/include/smlib/edicts.inc (2895, 2019-06-04)
scripting/include/smlib/effects.inc (22851, 2019-06-04)
scripting/include/smlib/entities.inc (59623, 2019-06-04)
scripting/include/smlib/files.inc (11398, 2019-06-04)
scripting/include/smlib/game.inc (1737, 2019-06-04)
scripting/include/smlib/general.inc (5952, 2019-06-04)
scripting/include/smlib/math.inc (9150, 2019-06-04)
scripting/include/smlib/menus.inc (1092, 2019-06-04)
scripting/include/smlib/server.inc (3209, 2019-06-04)
scripting/include/smlib/sql.inc (3716, 2019-06-04)
scripting/include/smlib/strings.inc (5008, 2019-06-04)
scripting/include/smlib/teams.inc (6567, 2019-06-04)
... ...

### **Simple In-Game Player Statistics Plugin for Left 4 Dead 2** ### Features - This plugin records statistics gathered from human players. The following statistics are currently being recorded: Basic Statistics (Default) | Name | Team | Description | | ------------------ | -------- | ------------------------------------------------------------ | | Survivors Kils | Infected | Number of times an infected has killed a survivor | | Survivors Incapped | Infected | Number of times an infected player has incapped a survivor | | Infected Kills | Survivor | Number of times a survivor has killed a Special Infected | | Infected Headshots | Survivor | Number of times a survivor killed a Special Infected by Headshot | Extra Statistics for the more skilled (Disabled by default) | Name | Team | Description | | ---------------------- | -------- | ------------------------------------------------------------ | | Hunter Skeet (Sniper) | Survivor | Number of hunters skeeted with sniper by a survivor. Counts only 1 tap heashots | | Hunter Skeet (SG) | Survivor | Number of hunters skeeted with shotgun by a survivor | | Hunter Skeet (Melee) | Survivor | Number of hunters skeeted with melee by a survivor | | Tank Rock Skeets | Survivor | Number rocks skeeted by a survivor | | Witch Crown (Standard) | Survivor | Number of standard witch crowns by a survivor (up close) | | Witch Crown (Draw) | Survivor | Number of witch draw crowns by a survivor | | Boomer Pops | Survivor | Number of boomer pops by a survivor | | Charger Levels | Survivor | Number of chargers leveled by a survivor | | Smoker Tongue Cuts | Survivor | Number of smoker tongues cut by a survivor | | Hunter Deadstops | Survivor | Number of hunter deadstops by a survivor | | Quad Booms | Infected | Number of times survivors have been quad boomed (all 4 boomed) | | 25 Hunter Pounces | Infected | Number of 25 point hunter pounces | | Death Charges | Infected | Number of times a charger has death charged a survivor | | Tank Rock Hits | Infected | Number of times a tank rocked a survivor | - A customizable connect announce when a player joins displaying the current ranking/steam id/total points of the user. This feature also supports colour coded messages. ![Connect Announce](https://github.com/sourcemod-plugins/l4d2-player-stats/blob/master/connect_announce.png) - A display panel showing the player statistics of a user. This can be triggered by issuing `sm_rank` on the console or by typing `!rank`in chat. ![Player Rank (Basic)](https://github.com/sourcemod-plugins/l4d2-player-stats/blob/master/player_rank.png) - A display panel showing additional stats (disabled by default) ![Player Ranks (Extras)](https://github.com/sourcemod-plugins/l4d2-player-stats/blob/master/player_rank_extras.png) - A display panel showing the top N players sorted by their ranking. This feature also allows the the requesting player to be able to view other player's statistics/ranking on the server. ![Top N Players](https://github.com/sourcemod-plugins/l4d2-player-stats/blob/master/top_players.png) - A display panel showing the ranks of the players currently present in the server ![Ranks of all players in-game](https://github.com/sourcemod-plugins/l4d2-player-stats/blob/master/ranks_ingame.png) - A points and ranking system is also implemented and can be further customized by modifying the point multipliers from the plugin configuration file (`playerstats.cfg`) ### Requirements - Sourcemod 1.7 above - [Skill Detect Plugin](https://github.com/sourcemod-plugins/l4d2-player-stats/blob/master/https://github.com/SirPlease/ZoneMod/raw/master/addons/sourcemod/plugins/optional/zonemod/l4d2_skill_detect.smx). This is only required if you need the extra statistics enabled - A working database system (mysql) ### Installation Download the [latest](https://github.com/sourcemod-plugins/l4d2-player-stats/blob/master/https://github.com/sourcemod-plugins/l4d2-player-stats/releases) version from the repository and extract the contents to the root of the left 4 dead 2 server installation directory. ### Configuration #### Database Configuration 1. Create and setup the appropriate users/credentials/privileges on your MySQL/MariaDB database system. 2. Import the [provided SQL script](https://github.com/sourcemod-plugins/l4d2-player-stats/blob/master/https://github.com/sourcemod-plugins/l4d2-player-stats/blob/master/configs/sql-init-scripts/mysql/playerstats.sql) (under `/configs/sql-init-scripts/mysql/playerstats.sql`\) into your MySQL/MariaDB system. 3. Open `databases.cfg` file from `addons/sourcemod/configs` and add a new section named `playerstats`. Example: ``` "playerstats" { "host" "" "driver" "mysql" "database" "" "user" "" "pass" "" //"timeout" "0" //"port" "0" } ``` #### Plugin Configuration The plugin can be further customized through the `playerstats.cfg` file located under `addons/sourcemod/configs/`. The default entries will look like this: > *REMEMBER*: After you have edited the StatModifiers section, you need to run the command `sm_pstats_reload sync` to update the values on the database ``` "PlayerStats" { "StatModifiers" { "survivor_killed" "1.0" "survivor_incapped" "1.0" "infected_killed" "1.0" "infected_headshot" "1.0" "skeet_hunter_sniper" "1.0" "skeet_hunter_shotgun" "1.0" "skeet_hunter_melee" "1.0" "skeet_tank_rock" "1.0" "witch_crown_standard" "1.0" "witch_crown_draw" "1.0" "boomer_pop" "1.0" "charger_level" "1.0" "smoker_tongue_cut" "1.0" "hunter_dead_stop" "1.0" "boomer_quad" "1.0" "hunter_twenty_five" "1.0" "death_charge" "1.0" "tank_rock_hits" "1.0" } "StatPanels" { "title_rank_player" "Player Stats" "title_rank_topn" "Top {top_player_count} Players" "title_rank_ingame" "In-Game Player Ranks" "title_rank_extras" "Extra Player Stats" } "ConnectAnnounce" { "format" "{N}Player '{G}{last_known_alias}{N}' ({B}{steam_id}{N}) has joined the game ({G}Rank:{N} {i:rank_num}, {G}Points:{N} {f:total_points})" } } ``` Connect Announce Output: ![Connect Announce Output](https://github.com/sourcemod-plugins/l4d2-player-stats/blob/master/connect_announce.png) > **Note:** You can reload the configuration with the `sm_pstats_reload` command. This command can also synchronize the point modifiers to the STATS_SKILLS table by passing the `sync` argument (e.g. `sm_pstats_reload sync`). ##### Configuration Sections | Section Name | Description | | --------------- | ------------------------------------------------------------ | | StatModifiers | This section contains the modifiers for the point system. These values affects the total points of the user. For example, if a player killed 10 special infected by headshot (infected_headshot) and the point modifier is 2.5 the total points for the number of infected headshots would be 25 (10 * 2.5). | | StatPanels | This section allows you to customize/add title headers to each of the available display panels. | | ConnectAnnounce | This section allows you to customize the the format of the player connect announce feature. Formatting rules are explained below. | #### Connect Announce Formatting Rules **Colour Tags** > Note: Some colour tags might NOT work for Left 4 Dead 2 | Tag | Color | | ----- | -------------------------------------- | | {N} | Default/normal | | {O} | Orange | | {R} | Red | | {RB} | Red/Blue | | {B} | Blue (green if no player on blue team) | | {BR} | Blue/Red | | {T} | Teamcolor | | {L} | Lightgreen | | {GRA} | Grey (green if no spectator) | | {G} | Green | | {OG} | Olive | | {BLA} | Black | **Special Tags** Some tags are prefixed with "d", "i" or "f". These prefixes are necessary to identify the type of the data so the plugin will be able to interpret it correctly when read from the database. Non-prefixed tags are strings by default. Tag Prefix | Prefix | Type | | ------ | ------------------------------------ | | i | Integer Number | | d | Date/Time (Not yet working properly) | | f | Decimal/Floating Point Number | | Tag | Description | | --------------------- | --------------------------------------------------- | | {steam_id} | Steam ID | | {last_known_alias} | Last known alias or name of the player | | {d:last_join_date} | Last join date on the server | | {i:survivor_killed} | Number of Survivors Killed (As Infected) | | {i:survivor_incapped} | Number of Survivors Incapped (As Infected) | | {i:infected_killed} | Number of Infected Killed (As Survivor) | | {i:infected_headshot} | Number of Infected Killed by Headshot (As Survivor) | | {f:total_points} | Total Points (Sum of everything) | | {i:rank_num} | Current Ranking | Extra Tags (needs pstats_extras_enabled to be set) | Name | Description | | ------------------------ | ------------------------------------------------------------ | | {i:skeet_hunter_sniper} | Number of hunters skeeted with sniper by a survivor | | {i:skeet_hunter_shotgun} | Number of hunters skeeted with shotgun by a survivor | | {i:skeet_hunter_melee} | Number of hunters skeeted with melee by a survivor | | {i:skeet_tank_rock} | Number rocks skeeted by a survivor | | {i:witch_crown_standard} | Number of standard witch crowns by a survivor | | {i:witch_crown_draw} | Number of draw crowns by a survivor | | {i:boomer_pop} | Number of boomer pops by a survivor | | {i:charger_level} | Number of charger levels by a survivor | | {i:smoker_tongue_cut} | Number of smoker tongue cuts by a survivor | | {i:hunter_dead_stop} | Number of hunter deadstops by a survivor | | {i:boomer_quad} | Number of times survivors have been quad boomed (all 4 boomed) | | {i:hunter_twenty_five} | Number of 25 point hunter pounces | | {i:death_charge} | Number of times a charger has death charged a survivor | | {i:tank_rock_hits} | Number of times a tank rocked a survivor | ------ ### ConVars | Name | Description | Default value | Min Value | Max Value | | ------------------------ | ------------------------------------------------------------ | :------------ | --------- | --------- | | pstats_enabled | Enable/Disable this plugin | 1 | 0 | 1 | | pstats_debug_enabled | Enable debug messages (for debugging purposes only) | 0 | 0 | 1 | | pstats_versus_exclusive | If set, the plugin will only work for versus gamemodes | 1 | 0 | 1 | | pstats_record_bots | Sets whether we should record bots. By default only human players are recorded. | 0 | 0 | 1 | | pstats_menu_timeout | The timeout value for the player stats panel | 30 (seconds) | 3 | 9999 | | pstats_max_top_players | The max top N players to display | 10 | 10 | 50 | | pstats_extras_enabled | Include extra stats to be recorded | 0 | 0 | 1 | | pstats_display_type | 1 = Display points, 2 = Display the count, 3 = Both points and count | 2 | 1 | 3 | | pstats_show_rank_onjoin | If set, player rank will be displayed to the user on the start of each map | 1 | 0 | 1 | | pstats_cannounce_enabled | If set, connect announce will be displayed to chat when a player joins | 1 | 0 | 1 | ### Commands > **Note**: These commands can also be invoked from chat (e.g. `!rank`, `!top 10`, `!ranks`, `!pstats_reload`) | Name | Description | Parameters | Permission | Parameter Description | | ---------------- | ------------------------------------------------------------ | ---------- | ------------ | -------------------------------------- | | sm_rank | Display the current stats & ranking of the requesting player. A panel will be displayed to the player. | None | Anyone | None | | sm_top | Display the top N players. A menu panel will be displayed to the requesting player | Number | Anyone | The number of players to be displayed. | | sm_ranks | Display the ranks of the players currently playing in the server. A menu panel will be displayed to the requesting player. | Number | Anyone | None | | sm_pstats_reload | Reloads plugin configuration. This is useful if you have modified the `playerstats.cfg` file. 'This command also synchronizes the modifier values set from the configuration file to the database. This is quite an expensive operation, so please only use this command when necessary. | None | Admin (Root) | None | | sm_hidestats | Allows a player to prevent other players from viewing his/her extra statistics. | Number | Anyone | 1 = hide, 0 = unhide |

近期下载者

相关文件


收藏者