Counter - Strike Raid Attack V1

Một bản mod của nhóm SKIN COUNTER - STRIKE

CS - AVA ( Alliance of Valiant Arms )

Bản Mod được phát triển bởi AVG4 theo hướng AVA

CSFIRED

CSFIRED một thể loại game bắn súng offline được mod theo hướng CrossFire (Đột kích) với hình ảnh sắc nét, âm thanh sống động tạo cho người chơi cảm giác như mình đang sống trong thế giới ảo

Counter Strike he Magic Athletics CD 1.0.0.2

Game do Trung Quốc làm. Dựa trên nền tảng Compete King.

Counter Strike CE

Game do Trung Quốc làm. Đang rất hot trên Group SKIN COUNTER - STRIKE

Counter-Strike NTN 2014

Counter-Strike NTN là một bản mod của Counter-Strike 1.6 huyền thoại, được mod lại với mục đích cải thiện chất lượng đồ họa và âm thanh cũng như hệ thống vũ khí Counter-Strike 1.6 với đặc điểm nổi bật.

Wednesday, July 30, 2014

Cơ bản về thuật toán tìm đường A*

Giới thiệu

Khi phát triển Artificial intelligence (AI), có lẽ thuật toán về tìm đường là một trong những điều cơ bản nhất nhưng đồng thời cũng cần lưu ý nhất, tại thực tế nó không hề đơn giản, đặc biệt là phải làm sao để nâng cao hiệu suất của thuật toán. Bài viết này mình sẽ giới thiệu sơ qua cách làm việc của thuật toán A*, thuật toán tìm đường được sử dụng rộng rãi nhất hiện nay.

Mô tả sơ qua về A*

A* là thuật toán tìm ra con đường ngắn nhất và tốn ít công sức nhất (cost) để đi từ vị trí đầu đến vị trí cuối xác định, và tất nhiên là nó sẽ tránh cả các vật cản trên đường nữa. Để đạt hiệu quả cao nhất cho thuật toán, chúng ra sẽ coi vật và vị trí nằm trên một bàn cờ, mỗi ô vuông là một node. Thuật toán A* đơn giản là tìm những ô mà vật di chuyển có thể đi vào được, đồng thời tính cost để di chuyển đến đó, xong tiếp tục tìm những ô mới xung quanh ô mình đang xét, cứ thế nó sẽ xét tất cả mọi trường hợp (node) theo thứ tự cost nhỏ nhất có thể đến lớn nhất có thể để tìm đường di chuyển.

Chi tiết hơn về các bước trong thuật toán A*

Bước chuẩn bị

  1. Chúng ta sẽ có node A (điểm đầu) và node B (điểm cuối), open list (những ô có thể sẽ phải xét trong thuật toán) và closed list (những ô đã xét trong thuật toán).
  2. Để di chuyển từ node X bất kì sang node Y cạnh nó, ta sẽ tính cost để di chuyển, tùy thuộc vào địa hình và nó là di chuyển chéo hay ngang (có thể coi chéo tốn 14 cost, ngang tốn 10 cost).
  3. Khi xét một node, ta sẽ xét tổng cost của nó: F = G + H, trong đó Hcost dự tính khi di chuyển giữa 2 nodes cạnh nhau và Gtổng cost tính từ điểm khởi đầu cho đến node trước node đang xét. Ví dụ F là cost từ node A đến node Y, G là cost từ node X sang node Y, và H là cost từ node A đến node X theo con đường mình đang xét.

Bắt đầu thuật toán

  1. Đưa node A vào open list.
  2. Lặp lại toàn bộ các bước sau cho đến khi tìm được đến node B hoặc open list không còn ô nào:
    • Lấy node X từ open list với điểm F = G + H thấp nhất. Tìm tất cả các ô cạnh node X mà vật có thể di chuyển vào.
    • Loại node X khỏi open list và ném nó vào closed list để không phải xét nó thêm một lần nữa.
    • Với mỗi ô node T ở cạnh node X mình vừa tìm được:
    • Nếu node T đã nằm trong closed list, bỏ qua không thương tiếc.
    • Nếu node T chưa nằm trong open list, ném nó vào và ghi nhớ parent nodenode X, đồng thời tính F = G + H, GH cho nó.
    • Nếu node T đã nằm trong open list, so sánh G của node T đối với node XG của node T mà ta đã ghi nhớ trước đó, nếu G mới lớn hơn thì bỏ qua, còn nếu nhỏ hơn thì ta lưu parent node mới cho node T, đồng thời tính và lưu F = G + H, GH mới cho nó.
    • Dừng vòng lặp này khi một trong hai trường hợp sau xảy ra:
    • node B đã nằm trong closed list.
    • node B không nằm trong closed listopen list trống, tức là đã xét mọi trường hợp mà không tìm được đường đến node B.
  3. Từ node B, ta tìm parent node cho đến khi đến được node A. Tập hợp từ node A đi qua các parent nodes đến node B là đường đi cần tìm.

Một vài lưu ý khi dùng thuật toán A*

  1. Chia ô cho bản đồ hợp lý, nếu chúng ta xét từng pixel thì thuật toán này sẽ là thảm họa.
  2. Sử dụng thuật toán sắp xếp an toàn nhất cho open list để lấy node XF = G + H thấp nhất. Thuật toán sắp xếp được dùng phổ biến nhất cho trường hợp này là heapsort.
  3. Ghi nhớ những địa điểm không thể với tới được (như các hòn đảo, lính oánh bộ không thể đặt chân vào được) để khỏi phải tính toán mất công.
  4. Không sử dụng thuật toán này đối với nhiều vật cùng một lúc, nếu muốn hãy xét lần lượt với chúng, hoặc nhóm chúng thành một hoặc một ít vật tượng trưng và áp dụng thuật toán cho vật tượng trưng đó.
  5. Thuật toán này sẽ tìm đường ngắn nhất, tốn ít cost nhất nhưng lại không tìm đường mượt nhất và thực tế nhất. Ví dụ ở bản đồ nhiều vật cản, đường đi tìm được sẽ ngoằn ngoèo chứ không đơn giản và thằng tắp như ta đáng lẽ làm trong thực tế.
  6. Các bước cơ bản trên chỉ tìm đường đi từ node A đến node B cố định và đây là trường hợp đẹp nhất vì không có vật nào đang di chuyển trên đường đi của mình. Để xử lý vấn đề này thì cần các bước xử lý nâng cao và phức tạp hơn rất nhiều.
  7. Đối với cost H, ta có thể làm nó khác biệt với các node khác nhau tùy vào địa hình (ví dụ đi trong cát mệt hơn đi trên đường nhựa).

Lời cuối

Nhìn chung thuật toán này khá lằng nhằng, đặc biệt là để xử lý thời gian thực, khi mà điểm đến của ta không cố định hoặc có các vật di chuyển khác cản trở. Trên đây chỉ là những bước cơ bản và cái nhìn sơ bộ về thuật toán để bạn hiểu thêm về pathfinding. Và do thuật toán này rất phổ biến nên chỉ mất vài phút Google, bạn có thể tìm được những đoạn implement code cho thuật toán này, nhờ vậy có thể bạn sẽ không phải mất công ngồi code lại toàn bộ các bước trên lại từ đầu.

Thursday, July 17, 2014

SoccerJam v2.07a

SoccerJam v2.07a

REQUIRES AMXX 1.75

Gameplay
Soccer Jam consists of 2 teams battling it out to be the first to score 15 goals. When you enter a server, you begin with zero upgrades. You gain experience through different efforts to upgrade your character into a stronger, better, Soccer player. You can knife your opponents dead, score a goal from incredible distances, steal the ball, assist teamates for goals, or be a goaly, and gain yourself the experience to advance your character.

Controls are incredibly easy to learn. All keys used are default half-life keys. When in-game, type /help and read the simple help display to learn the entire game!

Upgrades
Stamina -- Increases Health.
Strength -- Increases kicking str.
Agility -- Increases Run Speed.
Dexterity -- Increases Ball Catching.
Disarm -- Increases chance to disarm ball or knife.
Power Play -- Team Effort: Increases Str. & Agi.

Mapping
Soccer Jam uses a special entity system for mappers to create their very own Soccer Jam maps.
To learn more about this system, visit this page.
Soccer Jam Custom Valve Hammer Entities.
Interested in making a map? Check out the Valve Hammer pre-made soccer field available for everyone here.
Soccer Jam Map Layout
Soccer Jam maps should follow the sj_ prefix rule, to avoid confusion from other maps.

Customization
Inside the source code at the top, you will find a section of editable values. You can change the upgrade system, team names, models, sounds, and colors! Check it out if you want something than the normal default I have set-up.

More...
To learn more about this mod, visit my forums for updates, suggestions, bugs, mapping help, and more.
Soccer Jam - Forums

Note
The Soccer Jam plugin will 100% disable itself if the map does not have a soccerjam_ballspawn entity. Read more about this here. Faketeambot is required to play, and the bots must not be kicked at any time, this will ensure rounds will never end.

Installation
REQUIRES AMXX 1.75!!!

Download the Plugins soccerjam.amxx and faketeambot.amxx. Open up your plugins.ini and add soccerjam.amxx and faketeambot.amxx at the bottom.

Enable the correct modules. Fun , Fakemeta , Engine , Cstrike

Next download the SoccerJamFiles.zip and unzip it's contents to your server cstrike folder. It contains the standard soccerjam.bsp map, ball model, and game sounds.

Finally, download the soccerjam.txt and soccerjam_help.txt and add them to amxmodx\data\lang , to enable the multilingual support.

Start the server and your ready.

----------------------------------------------------------------

AMXX VERSION: AMXX 1.75+
MODULES: FUN, ENGINE, FAKEMETA, CSTRIKE

Author: OneEyed
Contact: #soccerjam @ irc.gamesurge.net
Website: http://www.soccer-jam.com/
Credits: Spanish Translation by Starsailor, and I want to give a big thanks to everyone in the Soccer Jam community
who helped beta test this to its release. I couldn't have done it without you guys!

Videos:
Soccer Jam video by: MuRRaY
Soccer Jam video by: Kill3r24akaAdam

Screenshots:
Screenshot 1
Screenshot 2
Screenshot 3

CHANGELOG: http://www.soccer-jam.com/forums/viewtopic.php?p=565

Multilingual: amxmodx/data/lang/ - soccerjam.txt and soccerjam_help.txt
- English - Swedish - German - Polish


NEW: TOURNAMENT VERSION!!
SoccerJam_Tournament.rar contains the source-codecompiled pluginsounds/models and a commands.html file of all the commands. This was created for PuG/Scrims/Tournamnet matches of Soccer-Jam. The version is TIMED and played in 2 different halves. If tied at the end, it goes into Shoot-Out Mode, and then Overtime after that.

Chat Commands:
.ready - Sets your status to READY.
.reset - Resets your points and unreadys you.
.wait - Unreadys you.
Enjoy!
Attached Files
File Type: smaGet Plugin or Get Source (faketeambot.sma - 77754 views - 1.6 KB)
File Type: zipSoccerJamFiles.zip (1.26 MB, 105411 views)
File Type: smaGet Plugin or Get Source (soccerjam.sma - 84091 views - 73.6 KB)
File Type: txtsoccerjam.txt (15.7 KB, 23302 views)
File Type: txtsoccerjam_help.txt (6.6 KB, 21741 views)
File Type: rarSoccerJam_Tournament.rar (698.4 KB, 28914 views)

PokeMod v1.2.3 RC for Public


Public 1.2.3RC can be found here.
1.2.3RC2 can be found here.
2.0 Beta can be found here.

Don't prejudge this mod just because it's about Pokemon, it is one of the most complicated mods around and it is growing intensely.

Has been tested on Counter-Strike 1.6, unofficially on Condition-Zero, and a little bit on Day of Defeat and Natural Selection.

So what is PokeMod?
-It is a game modification that incorporates the old gameboy games. Players choose a starting pokemon, gain experience, and catch new pokemon. As players level up their pokemon, that pokemon's skill will become more deadly. If a pokemon manages to evolve into another pokemon, the new pokemon will have a new skill plus its predecessors. However, players are limited to using a single pokemon at one time, but can have a 'party' that they can switch with on the fly with the command /go. Some pokemon are designated as 'global' pokemon, and as long as they are in your party, their skill will work as well.
-There is also a unique item system that has been developed where server owners can manage and create new items based on a simple file (items.cfg). This item system can be utilized to create an almost endless amount of items that you can imagine.
-Additionally with PokeMod there is a 'PokeRank' system, where players gain points every time they level up their pokemon. This can become competitive as there are defaulted 11 types of pokeranks, starting from Pokemon Finatic and working to Legendary Guru. On top of these individual ranks, there is also a server rank. If you have the top pokerank in the entire server, you will be designated as the Pokemon Master, and the next four highest are part of the Elite Four.
-Another feature in PokeMod is the 'Wild' and 'Trainer' mode. Players are defaulted to trainers, but can switch by saying /wild. In Wild mode, they will be assigned a random pokemon with a random experience. Wild pokemon gain experience twice as fast as trainers, but once you die, you become a new pokemon.
-Not commonly used in PokeMod is the 'Safari' mode. This mode allows players to choose any pokemon that the server has enabled for Safari mode. There is no experience gain and players are able to change pokemon freely. Pokemon can either be disabled, admin only, or set to a level.

How can I configure PokeMod to my liking?
-PokeMod has many types of configurations found in the configs/pokemon/ folder. Within each file, there are customizations available. For more deep changes, such as saving type or game type, you must edit the custom.inl or skill_defines.inl then recompile for a new pokemod.amxx.
  • items.cfg - As described earlier, you can change and add items to PokeMod. You may set what they do, their price, and other things. You can also categorize them so you may buy items easier once in PokeMod.
  • maps.cfg - This can be used to have map specific configurations. You can do any normal console command, or additionally, you can either disable PokeMod (-disabled) or turn skill use off (-skills_off) so players cannot use their skills but they can still gain experience. With -disabled and -skills_off, PokeMod does not precache any models, sounds, or sprites, that way you can still play the huge maps such as fun_allinone.
  • pokedex.txt - Although it is not suggested that you change this file, you can edit the description and name of skills here.
  • pokemod.cfg - Here you can edit cvars for PokeMod that will be loaded on map startup. You can change whether PokeMod is on to what admin is needed for PokeMod admin commands. If you wish to change values in this file in-game, instead of using the normal cvar command (amx_cvar) use the new pm_cvar command and it will save to the file as well.
  • pokemon.cfg - Within this file, you can change many properties of pokemon. You may change how much delay there is after you use its skill, whether it is a global pokemon, what type it is, and even what it evolves to and when it evolves.
  • safari.cfg - In Safari mode, the pokemon are given a set level, this is where you set that level. If you set to 0, then no one can use this pokemon in Safari mode. If set to a negative number, only admins can use this pokemon during Safari mode.
  • xp_table.ini - Inspired by SuperHero Mod, now you can easily change what each level is and how many levels there are. (Note that you will also have to change a define in custom.inl if you want more than 99 levels)

How can I check if PokeMod is working?
-With version 1.2.0, you can now access the command pokemod and pm. If no argument is supplied, it will display information about PokeMod, such as if it is disabled, is missing files, or running smoothly.
Also with this command, you can change PokeMod's on/off states.
  • pokemod on/off - turns pokemon on or off
  • pokemod safari on/off - turns safari mode on or off
  • pokemod debug # - changes the debug level
  • pokemod debug <word> - changes the debug key
  • pokemod debug off - turns debugging off

Code:
 //--ChangeLog--//
 * v1.2.2 - 02/01/08
 *       - Dropped hamsandwich module and added back fun module
 *       - Fixed and cleaned AoEdamage and Linedamage
 *       - Fixed speed issue that was occuring
 * v1.2.1 - 01/26/08
 *       - Fixed fire status
 *       - Fixed harden skill
 *       - Fixed menus not working occasionally
 *       - Fixed mist and sky attack not displaying in correct position
 *       - Redid type system to prepare for 1.3.0
 *       - Added status effects for normal pokedamage function
 *       - Redid how status effects are calculated in pokedamage
 *       - Added type None
 *       - Added prefix TYPE_ to the type defines/enum
 *       - Redid admin commands
 *       - Fixed weird damages with AoE and Line damage
 *       - Dropped engine module, now uses fakemeta_util
 *       - Dropped fun module, now uses fakemeta and hamsandwich
 *       - Removed time include
 *       - Now requires Hamsandwich module
 *       - Fixed rock slide skill
 *       - Bots now release pokemon randomly
 *       - Fixed global skills being able to be done twice
 *       - Fixed dodrio
 *
 * v1.2.0 - 12/24/07
 *       - Seperated into smaller files
 *       - Added xp and lvls
 *       - Added more pokemon
 *       - And a lot more (for full list, check PokeMod forums)
 *       - Now requires AMXX 1.8 or greater
 *
 * v1.1.1 - 07/06/06
 *       - Fixed some things
 *       - Added some cvars
 *       - Cleaned code
 *       - Made a little bit ready for when lvls and xp are added
 *
 * v1.1.0 - 06/29/06
 *       - Redid menus
 *       - Added more pokemon (33 in total)
 *       - Cleaned code
 *       - Changed cvars to pcvars
 *       - Now requires AMXX 1.71 or greater
 *
 * v1.0.1 - Never Released
 *       - Fixed some stuff
 *       - Cleaned code
 *       - Added more cvars
 *
 * v1.0.0 - 01/15/06
 *       - Released to the public
 *
 //--Credits--//
 * - Onix     - modified sprites and sounds code from yang's Veronika hero
 * - Abra     - used PassAimTest code from sharky / JTP10181 's Batgirl hero
 * - Growlithe    - modified Cheap_Suit's flamethrower
 *       - KoST - for the get_distance_to_line stock
 *       - VEN - for his fm_is_ent_visible stock
 * - Kadabra    - based on vittu's SSJ Gohan hero
 * - Magmar    - made by Om3gA
 *
 * - Config files   - based on superheromod's
 * - XP Save key   - based on superheromod's
 * - Sounds    - used some sounds from FFX mod
 * - Models    - used Prof. Oak model from old abandoned Pokemon Mod for Half-Life
 *       - original pokeball made by Emp`, fixed by Om3gA
 * - PokeLoop    - used loop code from {HOJ} Batman/JTP10181 's Captain America hero
 * - NPCs     - used Twilight Suzuka's NPC guide thing
 * - MYSQL Saving   - Superhero Mod
 * - SQLx Saving   - Teame06
 * - Dynamic Natives  - help from Hawk552
 * - Other     - modified mole code from WC3FT mod
 *       - is_user_outside stock from timer16 by Twilight Suzuka
 *
 *  - Anything not listed here was most likely done by Emp`
 *
 //--To Do--//
 * - More pokemon???
 * - Personal colored huds
 * - Custom pokemon support
 * - PP points
 * - Use New File Natives
 * - Read files rather than having defines
 * - Full MultiMod support for DoD and NS
 */
When run for the first time, config files will be made in amxmodx/configs/pokemon/
When updating to a new version, type pm_reset all in console to get newer config files.


Admin Commands
pm_givepoke <nick | @TEAM | @ALL> <pokemon name> [level] - gives players a pokemon
pm_setpoke <nick | @TEAM | @ALL> <pokemon name> - temporarily gives players pokemon power
pm_takepoke <nick | @TEAM | @ALL> <pokemon | @ALL | @# | @C> - takes a pokemon away from players
pm_morph <nick | @TEAM | @ALL> <pokemon | @ALL | @# | @C> <new pokemon> - morphes a pokemon into a new one

pm_givexp <nick | @TEAM | @ALL> <pokemon | @ALL | @# | @C> <amount> - gives xp to players pokemon
pm_setxp <nick | @TEAM | @ALL> <pokemon | @ALL | @# | @C> <amount> - sets xp on players pokemon

pm_addrank <nick | @TEAM | @ALL> <amount> - gives rank points to player
pm_setrank <nick | @TEAM | @ALL> <amount> - sets rank points on player

pm_setlevel/pm_setlvl <nick | @TEAM | @ALL> <pokemon | @ALL | @# | @C> <level> - sets level on players pokemon

pm_giveitem <nick | @TEAM | @ALL> <item name> [amount] - gives players an item

pm_debugger <nick | 0> - changes who recieves the debug messages

pm_help - shows admin command help
pm_cvar <cvar> [new value] - view/change value of pokemod cvars

pm_enable <pokemon | @ALL> [additional pokemon] - enables the use of a pokemon
pm_tempenable <pokemon | @ALL> [additional pokemon] - temporarily enables the use of a pokemon
pm_disable <pokemon | @ALL> [additional pokemon] - disables the use of a pokemon
pm_tempdisable <pokemon | @ALL> [additional pokemon] - temporarily disables the use of a pokemon

pm_pokemart <pokemon name | item name> <price> - changes items in Pokemart
pm_safari <pokemon name> <level> - changes pokemon in Safari
pm_reset <file> - resets pokemod file
pm_loadconfig - loads pokemod config files
pm_erasexp - erases all xp
Player Say Commands:
/pokecommands - shows complete list of commands in pokecommand
/pokehelp - shows basic information about PokeMod
/save - saves your PokeMod data (unless saving is off or safari mode is on)
/pokedex poke - shows information about the pokemon specified (ex. '/pokedex 1' or '/pokedex bulbasaur')
/pokemenu - shows PokeMod menu if you're dead or close to a Prof. Oak
/pokehud up/down - moves the PokeMod HUD up or down (ex. '/pokehud up' or '/pokehud down')
/playerspokes - shows everyones pokemon
/pokemart item amount - buys the amount of the item
/pokeitem item - view information about the item
/go - shows menu to select your active pokemon
/mypokes - shows the pokemon in your party
/switch poke1 poke2 - switches pokemon with another
/release poke - attempts to release a pokemon into the wild
/give player pokemon/item - gives your pokemon/item to player (ex. '/give Emp pikachu' or '/give Emp potion')
/wild - become a random wild pokemon
/trainer - become a trainer
/pokerank - view players pokeranks
Player Console Commands:
pokemod - shows PokeMod information about server
+pokeskill - uses your current skill
+pokeskill# - uses this skill without having to go through the menu ( +pokeskill1, +pokeskill2, etc. )
+pokeitem - shows menu of your current items

Many attributes within PokeMod can be changed in the files custom.inl and skill_defines.inl. With these changes, you should be able to have a unique PokeMod experience.
Attached Files
File Type: zipPokeMod Required Files.zip (514.0 KB, 25960 views)
File Type: zipcompiler.zip (964.0 KB, 19049 views)
File Type: zipPokeMod v1.2.2.zip (120.0 KB, 19923 views)

Deathrun Manager


Deathrun Manager
By xPaw

Logo by Kryzu

.: Description :.

Deathrun Manager for cs and cz, well you cant play deathrun in other games 

This plugin manages your deathrun server by doing the following things:
Will automatically transfer one RANDOM person from the Counter-Terrorists team over to the Terrorists
Will turn off/on radio commands (with cvar)
Will turn off/on spraying (for those noobs who use spray on breakables)
Will restart round if no terrorist detected
Will check every 15 secs & on player disconnect (if a Terrorist disconnects then will restart round)
Will remove players weapons on new round.

Life System
You will gain one life point when you will kill enemy, This life point will be spend when you die.
.: Cvars :.
1 = on || 0 = off >

Turn on/off the plugin
deathrun_toggle 1/0 <default: 1>

Turn on/off the spray blocker
deathrun_spray 1/0 <default: 1>

Turn on/off the radio commands blocker
deathrun_radio 1/0 <default: 1>

Turn on/off giving USP for CT's
deathrun_giveusp 1/0 <default: 1>

Turn on/off removing buyzone
deathrun_removebz 1/0 <default: 1>

Turn on/off remove money and timer from hud
deathrun_hidehud 1/0 <default: 1>

Turn on/off blocking money, if yes, player always will have 0$
deathrun_blockmoney 1/0 <default: 1>

Block or enable 'kill' command for CTs (1 - blocked, 0 - enabled)
deathrun_blockkill 1/0 <default: 1>

Turn on/off the semiclip
deathrun_semiclip 1/0 <default: 1>

Turn on/off the life system, if set to 2, terrorist for winning team will get also 1 life point.
deathrun_lifesystem 2/1/0 <default: 1>

If 1 then gamename will be changed to 'Deathrun v3.0'
deathrun_gamename 1/0 <default: 1>

Turn on/off block no fall damage for terrorists
deathrun_terrnfd 1/0 <default: 1>
.: What included in my DRM? :.
  • Semiclip by danielkza
  • Remove BuyZones by VEN
  • Game NameChanger
  • Spray Blocker
  • Radio Commands Blocker
  • No Roundtimer & Money in HUD

.: Credits :.

  • Grim - Original code
  • coderiz - His tp fix plugin, used it for trigger_hurt.
  • danielkza - The Semiclip code
  • TeddyDesTodes - Original Life System idea.

.: Recommended Plugins :.


.: Changing Messages prefixes :.

The standart prefix for chat messages is [Deathrun], but you can change it. Line 23. Change [Deathrun] to what you want 
PHP Code:
// Messages prefixnew const g_szPrefix[ ] = "[Deathrun]";  
And recompile the plugin !
.: Changing Fake Player's Name :.
Line 20: Change DRM Fake Player to what you want 
PHP Code:
// Bot namenew const g_szBotName[ ] = "DRM Fake Player";  
And recompile the plugin !
.: Removing Fake Player :.
You simply need to comment line 17.
PHP Code:
#define FAKE_PLAYER  
to
PHP Code:
// #define FAKE_PLAYER  
And recompile the plugin, if you removed fakeplayer, do not complain about timeleft resets !!
Attached Files
File Type: smaGet Plugin or Get Source (DeathrunManager.sma - 67585 views - 21.3 KB)
File Type: txtdeathrun.txt (13.7 KB, 32575 views)
File Type: smaGet Plugin or Get Source (DRM_trigger_hurt_fix.sma - 49612 views - 1.6 KB)

Hide N Seek

Hide N Seek
Version 2.8
by Exolent



Beta Version:
http://forums.alliedmods.net/showpos...&postcount=811



Introduction:
  • This is a Counter-Strike 1.6 mod where the hiders (Terrorists) must hide from the seekers (Counter-Terrorists) until the round ends.
  • The teams will swap when the Counter-Terrorists win, or when X rounds have ended (cvar to change).
  • The hiders are equipped with a broken, invisible knife (cvar), an HE grenade (cvar), two flashbangs (cvar), and a smokegrenade (cvar).
  • The seekers are equipped with a knife (cvars for grenades).
  • Both teams are given 100 armor (cvars per team).

Features:
  • Removes all objectives (bombs, hostages, etc.) and doors
  • Creates a fake hostage outside of the map to end the rounds.
  • Removes any guns placed on the ground in special maps, such as awp_map.
  • Contains two different scrim mods
  • More features are described with the cvars and commands.

Scrim Mods:
  • Win Rounds
    • This scrim mod is based upon winning and losing rounds.
    • When your team is hiding, they must win X rounds in a row.
    • If you lose before winning those rounds, the teams will switch and the opposite team will have a chance.
    • If the teams keep switching enough times, the scrim will end.
  • Point System
    • This scrim mod is based upon gameplay, and earning points for how well you play.
    • You can receive points for killing and winning the round.
    • You can lose points for suiciding, team killing, and losing the round.
    • There is a set amount of rounds to play throughout the scrim.
    • After half of these rounds have passed, the teams will switch.
    • After all the rounds have ended, whichever team has the most points, wins.

Admin Commands:
  • hns_status <0|1>
    - turns HideNSeek mod on or off
    • 0=OFF
    • 1=ON
  • hns_scrim <0|1>
    - turns Scrim mod on or off
    • 0=OFF
    • 1=ON
  • hns_scrimtype <0|1|2>
    - sets the scrim type
    - use this before using hns_scrim 1 to remove the vote
    • 0=NONE (vote will show if scrim starts)
    • 1=WIN ROUNDS
    • 2=POINT SYSTEM
  • hns_captains
    - chooses two random players to be captains of a pug scrim
  • hns_warmup <0|1>
    - turns Warmup on or off
    • 0=OFF
    • 1=ON

Client Commands:
  • say /hnshelp
    - displays an MOTD window describing the HideNSeek mod
    - if the help file used in the MOTD window does not exist, no MOTD window will be shown
  • say /scrimhelp
    - displays an MOTD window describing both HideNSeek scrim mods
    - if the help file used in the MOTD window does not exist, no MOTD window will be shown
  • say /points
    say /scores
    say /wins
    - shows everyone the current scrim points won (points for Point System, rounds won for Win Rounds)
  • say /rounds
    - shows everyone the amount of rounds left in the scrim (also show left in the half if it is a Point System scrim)

Main Cvars:
  • hns_footsteps <0|1|2|3>
    - remove footsteps for certain players
    • 0=OFF
    • 1=HIDERS
    • 2=SEEKERS
    • 3=ALL
  • hns_money <amount>
    - amount of money set for each player at all times
    • 0=HIDE MONEY
    • -1=DONT FORCE MONEY
  • hns_nubslash <rounds>
    - amount of rounds to lose as a seeker before nubslash is enabled
    • 0=DISABLE NUBSLASH
  • hns_disablebuy <0|1>
    - disables the use of buying guns
    • 0=ENABLE BUYING
    • 1=DISABLE BUYING
  • hns_hiders_knife <0|1|2>
    - determines if the hiding team gets a knife
    - this is used to remove 240 maxspeed bug
    - the knife attacks will be disabled
    • 0=NO KNIFE
    • 1=KNIFE, INVISIBLE
    • 2=KNIFE, VISIBLE
  • hns_hiders_grenades <amount>
    - amount of HE grenades each hider gets
  • hns_hiders_grenades_percent <percentage>
    - percentage as a hider to receive an HE grenade
    - random for each grenade given
    - percentage is a whole number 0-100, not a decimal
  • hns_hiders_flashbangs <amount>
    - amount of flashbangs each hider gets
  • hns_hiders_flashbangs_percent <percentage>
    - percentage as a hider to receive a flashbang
    - random for each flash given
    - percentage is a whole number 0-100, not a decimal
  • hns_hiders_smokegren <amount>
    - amount of smokegrenades each hider gets
  • hns_hiders_smokegren_percent <percentage>
    - percentage as a hider to receive a smoke grenade
    - random for each grenade given
    - percentage is a whole number 0-100, not a decimal
  • hns_hiders_armor <0-100>
    - amount of armor each hider gets
  • hns_seekers_grenades <amount>
    - amount of HE grenades each seeker gets
  • hns_seekers_grenades_percent <percentage>
    - percentage as a seeker to receive an HE grenade
    - random for each grenade given
    - percentage is a whole number 0-100, not a decima
  • hns_seekers_flashbangs <amount>
    - amount of flashbangs each seeker gets
  • hns_seekers_flashbangs_percent <percentage>
    - percentage as a seeker to receive a flashbang
    - random for each flash given
    - percentage is a whole number 0-100, not a decimal
  • hns_seekers_smokegren <amount>
    - amount of smokegrenades each seeker gets
  • hns_seekers_smokegren_percent <percentage>
    - percentage as a seeker to receive a smoke grenade
    - random for each grenade given
    - percentage is a whole number 0-100, not a decimal
  • hns_seekers_armor <0-100>
    - amount of armor each seeker gets
  • hns_hidetime <seconds>
    - time in seconds that hiders have to hide
  • hns_timersounds <0|1>
    - enables speech of numbers during hide timer
    • 0=OFF
    • 1=ON
  • hns_noslowdown <0|1>
    - enables no slow down when landing
    • 0=OFF
    • 1=ON
  • hns_teamchange <rounds>
    - if <rounds> ended is reached, the teams will switch
    • 0=SWAP TEAMS WHEN SEEKERS WIN
  • hns_disablekill <0|1>
    - disables "kill" command in console
    • 0=ENABLE COMMAND
    • 1=DISABLE COMMAND
  • hns_blindcolors <RRR GGG BBB AAA>
    - colors and alpha of the blind color during hide timer
    - alpha is the transparency (255 = full)
    - you can set certain parts to be random by setting them as "rand"
    - Example: "255 0 0 rand" will make a red screen with random transparency.
    • RRR=RED RGB CODE
    • GGG=GREEN RGB CODE
    • BBB=BLUE RGB CODE
    • AAA=ALPHA OF THE COLORS
  • hns_hudcolors <RRR GGG BBB>
    - colors of hide timer
    - you can set certain parts to be random by setting them as "rand"
    - Example: "255 0 rand"
    • RRR=RED RGB CODE
    • GGG=GREEN RGB CODE
    • BBB=BLUE RGB CODE
  • hns_hiders_alivefrags <frags>
    - gives <frags> to all surviving hiders when the round ends
  • hns_lights <lights>
    - the style of lighting for the maps
    - use letters a - z
    - a is darkest, z is brightest
    - if you want normal, use m
    - there is a 5 second delay when checking for the lighting
  • hns_visiblecommands <0|1>
    - should say commands like /hnshelp be displayed in chat?
    • 0=HIDE
    • 1=SHOW
  • hns_chooseteam <0|1|2>
    - should players allowed to change teams?
    • 0=NO
    • 1=YES
    • 2=ONLY ADMINS
  • hns_semiclip <0|1|2>
    - enables semiclip
    - semiclip is where players can walk through each other but still interact with other entities around the map
    • 0=OFF
    • 1=SEMICLIP PER TEAM
    • 2=SEMICLIP FOR EVERYONE
  • hns_semiclip_alpha <0-255>
    - transparency of semiclipped players
    • 0=TOTALLY INVISIBLE
    • 255=TOTALLY VISIBLE
  • hns_prefix <prefix>
    - prefix before messages from plugin
    - Example: [HNS] Type /hnshelp for more information about HideNSeek.
  • hns_gametype <gametype>
    - Name of the game for server lists
    - Default server gametype for CS 1.6 is "Counter-Strike"
    - For CS:S, it is "Counter-Strike:Source"
    - Leaving this blank will result in: "HideNSeek <version>"
  • hns_removebreakables <0|1>
    - Should breakables such as glass, vents, and bombsites be removed
    • 0=KEEP
    • 1=REMOVE
  • hns_removedoors <0|1>
    - Should doors be removed
    • 0=KEEP
    • 1=REMOVE
  • hns_noflash <0|1|2>
    - Disables flashbang effect for players
    • 0=FLASH EVERYONE
    • 1=DONT FLASH HIDERS
    • 2=DONT FLASH SEEKERS
  • hns_noboosting <0|1|2>
    - Disables boosting for certain players
    • 0=ENABLE BOOSTING FOR EVERYONE
    • 1=DISABLE BOOSTING FOR TEAMMATES
    • 2=DISABLE BOOSTING FOR EVERYONE
  • hns_noboosting_punish <1|2|3>
    - who should be punished for boosting
    • 1=PERSON ON TOP
    • 2=PERSON ON BOTTOM
    • 3=BOTH PEOPLE
  • hns_noboosting_damage <damage>
    - Damage done to who is punished
  • hns_noboosting_interval <interval>
    - time (in seconds) between each punish for boosting
  • hns_warmup_godmode <0|1>
    - should godmode be enabled during warmup
    • 0=OFF
    • 1=ON
  • hns_warmup_respawn <0|1>
    - is respawn enabled during warmup
    • 0=OFF
    • 1=ON

Scrim Cvars:
  • hnss_prefix <prefix>
    - prefix before messages from plugin during scrims
    - Example: [HNS-SCRIM] Exolent : started the HideNSeek scrim!
  • hnss_vote_timer <seconds>
    - time to choose which scrim type during the vote

Win Rounds Mod
  • hnss_rounds_wins <rounds>
    - rounds to win when hiding to win the scrim
  • hnss_rounds_losses <rounds>
    - amount of team switching before the scrim ends
  • hnss_rounds_savewins <rounds>
    - should the amount of wins while hiding be reset when teams switch?
    • 0=RESET ROUNDS
    • 1=SAVE ROUNDS

Point System Mod
  • hnss_points_knife <points>
    - points given for killing with a knife
  • hnss_points_headshot <points>
    - points given for a headshot kill
  • hnss_points_grenade <points>
    - points given for a grenade kill
    - Note: this also includes frostnades
  • hnss_points_kill <points>
    - points given for a kill that wasnt a knife or grenade
  • hnss_points_suicide <points>
    - points lost for suiciding
  • hnss_points_teamkill <points>
    - points lost for teamkilling
  • hnss_points_roundwin <points>
    - points given for winning the round
  • hnss_points_roundlose <points>
    - points lost for losing the round
  • hnss_points_rounds <rounds>
    - total rounds for the scrim to endure

Installation:
  1. Download hidenseek.zip the bottom of this post.
  2. Place hidenseek.amxx in your server's addons/amxmodx/plugins directory.
  3. Open the plugins.ini located in your server's addons/amxmodx/configs directory and add hidenseek.amxx underneath 3rd Party Plugins
  4. Place hidenseek_help.txt in your server's addons/amxmodx/configs directory.
  5. Place hidenseek_scrim_help.txt in your server's addons/amxmodx/configs directory.
  6. Place hidenseek.cfg in your server's addons/amxmodx/configs directory.
  7. Restart your server

Notes:
  • All of these cvars have been conveniently placed for you in the hidenseek.cfg
    - Make sure you set your cvars in that config and not the amxx.cfg!
  • If you need some colors for hns_hudcolors and/or hns_blindcolors, have a look here.
    • Black is completely invisible.
    • The darker your color, the less visible it will be.
  • If you are upgrading, do no replace your hidenseek.cfg file.
    Instead, let the plugin run for the first time, and it will recreate the file for you, without losing your current cvar values.
    Then, you can change the new cvars' values from the default values to your own.
  • If you get a "bad load" when trying to use this plugin
    1. The .amxx file name does not match what is put in the plugins.ini
    2. The .amxx file is not in the plugins directory.
    3. Something is wrong with your .amxx file. Download the .zip file and reinstall the plugin.

To do:
  • Add anti-boosting
    - Note: semiclip has been added. still add anti-boosting?
  • Finish scrim addon
  • Add multilingual support

Recommended Additions:

This plugin requires AMX Mod X version 1.8 or higher.
Any questions asked that can be answered with information from this post will be ignored. 
Attached Files
File Type: ziphidenseek_v2.8.zip (99.2 KB, 107137 views)

A* Pathfinding API

A* Pathfinding API
Pathfinding API based on the A* method.

Functions:
Code:
/** Array:AStar(Float:Start[3], Float:Goal[3], StepSize = 30, Ignore = IGNORE_MONSTERS, IgnoreID = 0, GroundDistance = 35, Heuristic = 50);  *  * Finds a path between Start and Goal.  *  *  * Parameters:  *  *  Float:Start[3]  *    Starting position.  *  *  Float:Goal[3]  *    Hopefully the end position.  *  *  (Optional) StepSize = 30  *    Defines how far between each step to take in a pattern of -X + X in all three dimensions. This means that diagonally, the step will be longer.  *  *  (Optional) Ignore = IGNORE_MONSTERS  *    Flags for the traceline check.  *  *  (Optional) IgnoreID = 0  *    id of the calling player if IGNORE_MONSTERS is not set. Again, this is for the traceline.  *  *  (Optional) GroundDistance = 35  *    Set the maximum distance from the ground for the point to be accepted as valid. If set to 0 this check is disabled, meaning pathfinding for flying entities.  *  *  (Optional) Heuristic = 50  *    Optimization parameter. Decides how much importance the distance from the target has.  *    Higher values might result in a faster execution but may also result in a suboptimal path.  *  * Returns a handle to a dynamic array that will contain each step between start and goal.  * On failure it will return Invalid_Array. **/ native Array:AStar(Float:Start[3], Float:Goal[3], StepSize = 30, Ignore = IGNORE_MONSTERS, IgnoreID = 0, GroundDistance = 35, Heuristic = 50, ...); /** AStarThreaded(Float:Start[3], Float:Goal[3], Handler[], StepSize = 30, Ignore = IGNORE_MONSTERS, IgnoreID = 0, GroundDistance = 35, Heuristic = 50);  *  * Finds a path between Start and Goal.  *  *  * Parameters:  *  *  Float:Start[3]  *    Starting position.  *  *  Float:Goal[3]  *    Hopefully the end position.  *  *  Handler[]  *    The function that will be called once the pathfinding is done.  *    The format of the handler function should be as such:  *      public PathDone(Index, Array:hPath, Float:Distance, NodesAdded, NodesValidated, NodesCleared)  *  *  (Optional) StepSize = 30  *    Defines how far between each step to take in a pattern of -X + X in all three dimensions. This means that diagonally, the step will be longer.  *  *  (Optional) Ignore = IGNORE_MONSTERS  *    Flags for the traceline check.  *  *  (Optional) IgnoreID = 0  *    id of the calling player if IGNORE_MONSTERS is not set. Again, this is for the traceline.  *  *  (Optional) GroundDistance = 35  *    Set the maximum distance from the ground for the point to be accepted as valid. If set to 0 this check is disabled, meaning pathfinding for flying entities.  *  *  (Optional) Heuristic = 50  *    Optimization parameter. Decides how much importance the distance from the target has.  *    Higher values might result in a faster execution but may also result in a suboptimal path.  *  * Returns a que index that can be used in the handler to identify which path is complete.  * On failure it will return -1. **/ native AStarThreaded(Float:Start[3], Float:Goal[3], Handler[], StepSize = 30, Ignore = IGNORE_MONSTERS, IgnoreID = 0, GroundDistance = 35, Heuristic = 50, ...); // The following functions are only used with the AStar() function, not AStarThreaded(). /**  * AStar_GetDistance()  *  * Returns the distance of the last non-threaded path. **/ native Float:AStar_GetDistance(); /**  * AStar_GetNodesAdded()  *  * Returns the ammount of nodes that were created from the last non-threaded path. **/ native AStar_GetNodesAdded(); /**  * AStar_GetNodesValidated()  *  * Returns the ammount of nodes that were validated from the last non-threaded path. **/ native AStar_GetNodesValidated(); /**  * AStar_GetNodesValidated()  *  * Returns the ammount of nodes that were cleared from the last non-threaded path. **/ native AStar_GetNodesCleared();

A new example so you can test in game
This time it's based on 2 points that you create using the commands astar_pos1 and astar_pos2 instead of distance by aim. This allows you to test much bigger paths.
Run the pathfinding by using astar_run for "threaded" or astar_run2 for non-threaded.
The execution time is pretty similar, the non-threaded being slightly faster but will freeze the server while working.
Code:
#include <amxmodx> #include <fakemeta> #include <astar> #include <xs> /* new hTimer = TimerStart(); // ... TimerStop(hTimer); server_print("Timer: %d days, %d hours, %d minutes, %d seconds and %d milliseconds.", TimerDays(hTimer), TimerHours(hTimer), TimerMinutes(hTimer), TimerSeconds(hTimer), TimerMilliseconds(hTimer)); */ #define TimerStart()            tickcount() #define TimerMid(%0)            ( tickcount() - %0 ) #define TimerStop(%0)         ( %0 = tickcount() - %0 ) #define TimerDays(%0)         ( %0 / 86400000 ) #define TimerHours(%0)      ( %0 % 86400000 / 3600000 ) #define TimerMinutes(%0)        ( %0 % 3600000 / 60000 ) #define TimerSeconds(%0)        ( %0 % 60000 / 1000 ) #define TimerMilliseconds(%0)   ( %0 % 1000 ) #define RGB(%0,%1,%2) ( ( ( %0 & 255 ) << 16 ) | ( ( %1 & 255 ) << 8 ) | ( %2 & 255 ) ) new Float:gPos[2][3]; new gLastStep[11][3]; new Array:gPath[11]; new gTimer[10]; new Colors[] = {     RGB(0, 0, 255),     RGB(0, 255, 0),     RGB(0, 255, 255),     RGB(255, 0, 0),     RGB(255, 0, 255),     RGB(255, 255, 0),     RGB(255, 255, 255) } public plugin_init() {     register_plugin("A* Sample code", "2.0", "[ --{-@ ]");     register_clcmd("astar_run", "run");     register_clcmd("astar_run2", "run2");     register_clcmd("astar_pos1", "pos1");     register_clcmd("astar_pos2", "pos2"); } new g_sprite; public plugin_precache()     g_sprite = precache_model("sprites/laserbeam.spr") stock beam(origin1[3], origin2[3], Float:seconds, rgb) {     message_begin(MSG_BROADCAST ,SVC_TEMPENTITY)     write_byte(TE_BEAMPOINTS)     write_coord(origin1[0]) // start position     write_coord(origin1[1])     write_coord(origin1[2])     write_coord(origin2[0]) // end position     write_coord(origin2[1])     write_coord(origin2[2])     write_short(g_sprite)   // sprite index     write_byte(0)   // starting frame     write_byte(10// frame rate in 0.1's     write_byte(floatround(seconds*10))  // life in 0.1's     write_byte(10// line width in 0.1's     write_byte(1)   // noise amplitude in 0.01's     write_byte(( rgb >> 16 ) & 255// Red     write_byte(( rgb >> 8 ) & 255// Green     write_byte(rgb & 255)   // Blue     write_byte(127// brightness     write_byte(10// scroll speed in 0.1's     message_end() } public pos1(id)     SavePos(id, 0); public pos2(id)     SavePos(id, 1); SavePos(id, pos) {     new Float:Origin[3];     new Float:End[3];     new hTrace;     pev(id, pev_origin, Origin);         xs_vec_copy(Origin, End);     End[2] -= 1000         engfunc(EngFunc_TraceLine, Origin, End, IGNORE_MONSTERS, id, hTrace);     get_tr2(hTrace, TR_vecEndPos, Origin);     free_tr2(hTrace);         Origin[2] += 10;     xs_vec_copy(Origin, gPos[pos]); } public run(id) {     client_print(0, print_chat, "Start: %.0f, %.0f, %.0f. End: %.0f, %.0f, %.0f. Distance: %.0f units.", gPos[0][0], gPos[0][1], gPos[0][2], gPos[1][0], gPos[1][1], gPos[1][2], get_distance_f(gPos[0], gPos[1]));         new Index = AStarThreaded(gPos[0], gPos[1], "PathDone", 30, IGNORE_MONSTERS, id, 35, 50);     if ( Index == -1 ) {         client_print(id, print_chat, "All pathfinding slots are busy.")         return;     }     gTimer[Index] = TimerStart(); } public run2(id) {     client_print(0, print_chat, "Start: %.0f, %.0f, %.0f. End: %.0f, %.0f, %.0f. Distance: %.0f units.", gPos[0][0], gPos[0][1], gPos[0][2], gPos[1][0], gPos[1][1], gPos[1][2], get_distance_f(gPos[0], gPos[1]));         new hTimer = TimerStart();     new Array:hPath = AStar(gPos[0], gPos[1], 30, IGNORE_MONSTERS, id, 35, 50);     TimerStop(hTimer);     new Timer[32];     TimerFormat(hTimer, Timer, charsmax(Timer), 2);     client_print(0, print_chat, "Execution time: %s (%d nodes, %d validated, %d successful)", Timer, AStar_GetNodesAdded(), AStar_GetNodesValidated(), AStar_GetNodesCleared());         if ( hPath == Invalid_Array ) {         client_print(0, print_chat, "Pathfinding failed.");         return;     }     client_print(0, print_chat, "Distance of path: %.0f units, %d steps.", AStar_GetDistance(), ArraySize(hPath) - 1);     if ( gPath[10] != Invalid_Array )         ArrayDestroy(gPath[10]);     if ( task_exists(10) )         remove_task(10);         arrayset(gLastStep[10], 0, sizeof gLastStep[]);     gPath[10] = hPath;     set_task(0.2, "ShowPath", 10, . flags = "a", . repeat = ArraySize(hPath)); } public PathDone(Index, Array:hPath, Float:Distance, NodesAdded, NodesValidated, NodesCleared) {     TimerStop(gTimer[Index]);     new Timer[32];     TimerFormat(gTimer[Index], Timer, charsmax(Timer), 2);     client_print(0, print_chat, "Execution time: %s (%d nodes, %d validated, %d successful)", Timer, NodesAdded, NodesValidated, NodesCleared);         if ( hPath == Invalid_Array ) {         client_print(0, print_chat, "Pathfinding failed.");         return;     }     client_print(0, print_chat, "Distance of path: %.0f units, %d steps.", Distance, ArraySize(hPath) - 1);     if ( gPath[Index] != Invalid_Array )         ArrayDestroy(gPath[Index]);     if ( task_exists(Index) )         remove_task(Index);         arrayset(gLastStep[Index], 0, sizeof gLastStep[]);     gPath[Index] = hPath;     set_task(0.2, "ShowPath", Index, . flags = "a", . repeat = ArraySize(hPath)); } public ShowPath(Index) {     static curStep[3];     ArrayGetArray(gPath[Index], 0, curStep);     ArrayDeleteItem(gPath[Index], 0);     if ( gLastStep[Index][0] && gLastStep[Index][1] && gLastStep[Index][2] )         beam(gLastStep[Index], curStep, 4.0, Colors[Index % sizeof Colors]);     gLastStep[Index][0] = curStep[0];     gLastStep[Index][1] = curStep[1];     gLastStep[Index][2] = curStep[2]; } /* TimerFormat(hTimer, output[], maxlen, mode = 1, bool:full = 0) * Formats the result of a timer handle into a string. * * Parameters: * * hTimer *    Timer Handle * * output[] *    The output string * * maxlen *    Maximum size of the output string * * mode *    1: 00:00:00:00.000 *    2: 0d 0h 0m 0s 0ms * * bool:full *    If full is set to true it will print all fields, even those which contains no value. *    If full is set to false and mode is set to 1, it will print the first field that contains a value and everything after that point. For example: 03:00:00.295 *    If full is set to false and mode is set to 2, it will print only the fields that contains a value. For example: 3h 295ms */ stock TimerFormat(hTimer, output[], maxlen, mode = 1, bool:full = false) {     new len, bool:started;         if ( full || TimerDays(hTimer) ) {         if ( mode == 1 )             len = formatex(output, maxlen, "%02d:", TimerDays(hTimer));         else             len = formatex(output, maxlen, "%dd ", TimerDays(hTimer));         started = true;     }     if ( full || ( started && mode == 1 ) || TimerHours(hTimer) ) {         if ( mode == 1 )             len += formatex(output[len], maxlen - len, "%02d:", TimerHours(hTimer));         else             len += formatex(output[len], maxlen - len, "%dh ", TimerHours(hTimer));         started = true;     }     if ( full || ( started && mode == 1 ) || TimerMinutes(hTimer) ) {         if ( mode == 1 )             len += formatex(output[len], maxlen - len, "%02d:", TimerMinutes(hTimer));         else             len += formatex(output[len], maxlen - len, "%dm ", TimerMinutes(hTimer));         started = true;     }     if ( full || ( started && mode == 1 ) || TimerSeconds(hTimer) ) {         if ( mode == 1 )             len += formatex(output[len], maxlen - len, "%02d.", TimerSeconds(hTimer));         else             len += formatex(output[len], maxlen - len, "%ds ", TimerSeconds(hTimer));         started = true;     }     if ( full || ( started && mode == 1 ) || TimerMilliseconds(hTimer) ) {         if ( mode == 1 )             len += formatex(output[len], maxlen - len, "%03d", TimerMilliseconds(hTimer));         else             len += formatex(output[len], maxlen - len, "%dms", TimerMilliseconds(hTimer));     } }

And here's an example image of a path between two points that has objects, corners and height differences.
Spoiler 


It was hard taking a good picture since the beams disappear really fast. You get the point.

Changelog:
Code:
Version 1.0
* Initial release.

Version 1.1
* Added possibility of running the pathfinding as "threaded". (Thinking entity, not actually threaded.)
Additional notes:
Use this file however you want. Credit not required.

The best would probably be to make it a module. Feel free to do so (I'm not good enough). You have my permission to use any of this code in that project.

I'm always open to suggestions, feedback and criticism. I aim to add as much support as possible. Please share your thoughts.
Attached Files
File Type: smaGet Plugin or Get Source (astar.sma - 33 views - 11.9 KB)
File Type: incastar.inc (3.8 KB, 4 views)