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


[] [TF2] PK-Duels

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

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156

  • Postów:7280
  • Lokalizacja:AMXX.PL

Napisano 12.02.2012 21:40

[TF2] PK-Duels

Introduction & Inspiration:
On the tf2 server/community which i frequent and develop small plugins for (TFV) it's not uncommon for (casual)mini-pickups or other small events to be organised. One day Dran came up with some crazy idea about 'pokémon duels' where each player has 6 lives, and upon each death they must change class. These duels were quite entertaining and became quite a success, but there were complaints from some players that they weren't involved enough (24 players server, 2 players playing, upto 22 spectating) and that they didn't like spectating, there was also the obvious problem of having to kick new players who joined to spectator etc.
Given that i had a week free of commitment (end of exams, start of lectures) i set to developing a plugin/map combination for facilitating multiple duels at once in the background of a ctf/trade/dm/surf match (anything where the round doesn't restart and respawn the players).

This plugin is designed to run on a server and when it detects a map 'enabled' for pk-dueling it allows players to queue for duels against each other, while allowing the continued play of the original purpose of the map. The sample map that i have developed with a couple of other people(refer to credits) consists of an xpress map (thin/long ctf map) with 4 arenas outside of the main map. Basic scores (standard points for kills, deaths, wins, losses) are then stored in an sqlite db (i'll probably implement a more advanced scoring system at a later date to prevent, the player with the most duels having the most points).
I'm sure some people will think this is a dupe of MgeMod however i haven't spent a great deal of time on MgeMod but from what i know it is far more serious and is designed for much smaller arenas (PK-Duel arenas in the sample map have 3000x3000 floor space). This plugin is designed so a server can continue as normal while allowing those players whom wish to duel, to duel.

Current User Commands:
Currently the command set is quite limited, however as command are suggested i may add them as time permits.

  • sm_queue - Queue's the player for a duel, when 2 players are in the queue and an arena becomes available, the first player in the queue is able to select the arena to duel in.
  • sm_unqueue - Removes the player from the queue
  • sm_surrender - Surrenders the player from their current duel.
  • sm_rank - Displays the users rank, score, kills, deaths, wins & losses in their chat.
  • sm_top5 - Displays the top5 ranked players on the server with the above commands statistics in a menu.
  • sm_duelrules - Displays the servers current dueling rules (based on cvar configurations) in a menu.
  • sm_duelhelp - Displays a basic explanation of commands available to users in a menu.
  • sm_pkd_version - Returns the version number of the plugin.
There are a few more commands, which exist for the map to call to configure the plugin to suit the map (Explained below in the compatible maps section).

Current Dueling Rank CVars:

  • pkd_rank_init - Sets the initial points that a new player starts with - default 500
  • pkd_rank_win_pts - (Basic Scoring) Controls how many points a player recieves for a win - default 2
  • pkd_rank_lose_pts - (Basic Scoring) Controls how many points a player recieves for a loss - default 0
  • pkd_rank_kill_pts - (Basic Scoring) Controls how many points a player recieves for a kill - default 1
  • pkd_rank_death_pts - (Basic Scoring) Controls how many points a player recieves for a death - default -1
  • pkd_rank_elo_modifier - (Advanced Scoring) Sets the maximum points that each player can change after 1 match - default 12
Current Dueling Rules CVars:

  • pkd_rules_switch_class - Toggles the rule that players must change class after each death - default 1
  • pkd_rules_death_limit - (Advanced Scoring) Sets the number of deaths allowed by a player before the duel is lost - default 6
  • pkd_rules_block_Scout - Disables the use of the scout class in duels - default 0
  • ^The previous rule can be repeated for all other classes (soldier, pyro, demo, heavy, engineer, sniper, medic, spy).
Other CVars:

  • pkd_enabled - Sets whether the plugin will react to suitable maps. - default 1
  • pkd_rank_enabled - Sets whether the plugin will track/store/display players scores (1 is basic, 2 is advanced[elo]). - default 2, (i haven't throughly tested disabling this setting, if i missed any places please tell me)
  • pkd_duel_start_delay - Sets the delay between a duel being created and the duel starting. - default 15
  • pkd_surrender_lose - Enabled treats player surrenders as their loss of the duel - default 1
  • pkd_disconnect_lose - Enabled treats player disconnect as their loss of the duel - default 0
It has been developed and tested on the latest version of sourcemod (1.4.1) and uses no extensions. So all you should need to do would be to place the plugin into your sourcemod/plugins directory and add a suitable map to your servers rotation (and adjust any cvars to suit).

Currently there is only the sample map developed by myself and a couple of others to test the plugin. However during development there was alot of interest from people willing to create arenas for the map, so hopefully i'll be able to stir up a tfv community map fairly soon due to the simplicity of developing the arenas (i'm no expert at mapping but i created the 1st arena in around 5 hours and minor quality issues aren't a great problem imo).Producing Compatible Maps:
<I'll produce this and include a few prefabs when i have time>


  • No changelog kept until post-v1.0.0.0
Pending Bugs:
I try to check for most bugs, but when bug checking involves other players involvement due to the 2 player nature of dueling this is not always feasible. When reporting bugs please try to explain if the bug can be reproduced and how (otherwise, what you think caused it). I'll try to fix bugs asap, and release minor builds ((v1.0.0.0)->(Release.Major.Minor.Build)), but the more information i have about how to reproduce the bug, the faster it should be for me to isolate and patch.

  • None pending
To Do list:
If you wish to suggest feel free. I'll add it to the list where i feel appropriate (so long as i don't consider it silly, however if other people side against me i can probably be converted), if the suggestion is small and quick to implement i may even implement it the same day/week.

  • Block map change in OnCsdArenaCount(extend the map until all duels are complete) and add OnMapEnd reset them back if changed. [Need to research the best way to do this.]
  • Add challenege player [will require adjusting the queueing system slightly]
  • Time limit on duels
  • Support for 2 vs 2 (or more) duels
  • Admin cancel duel (for when players go afk in spawn).
Source & binary (the source is split into multiple files for maintainabilities sake, and i don't think the web compiler supports this).
Included is Exvels colour's import and a personal circular queue import.
Latest stable release[v1.0.0.0]
pk_duel.smx (plugin) (source)
Latest major build (Large/important feature additions/changes, hopefully well tested.)
Latest minor build (Bug fixes and features that happen to be in the code at the time)
Latest untested build (Source not provided because i cba with regularly rezipping everything properly when i can just overwrite the file this links to). Possibly contains bugs which render the plugin useless, so it's not recommended you use this unless you want to be nice and do loads of bug reports).

Inspiration - Dran
Testing assitance - Savi, LiTlElOyD & many other TFV members.
pkd_ctf_xpress_12, Arena #3 - ToxicSniper
pkd_ctf_xpress_12, Arena #4 - MacD11
Free Devlopment Hosting - Yuki (Irl friend).

I'll probably post this project on git/googlecode at some point.
Plugin is currently working on my development server at

Wyświetl pełny artykuł

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

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