*Note: Sorry for bad/broken English, it isn't my native language.* *Note2: Originally the plugin was published on a differnt website, dated back to March 2013, so don't wonder why I started with v2.0.
Info:
So yeah, yet another new gameplay plugin.
Based on BombGame mod, this plugin is a new gameplay mode for Counter-Strike.
All players go to the Terrorists team, 10 seconds after the game starts and 1 or more players get randomly an 'infection' from a mysterious virus.
The main goal is to pass the infection to other players before the time runs out and the virus kill the player. The winner is the player that survived the infection.
This plugin comes with some cool addons that makes the gameplay even more fun:
- Forstnades addon (HNR_Frostnades.sma)
- Shop addon (HNR_Shop.sma)
- Scouts skins addon (HNR_Scouts.sma)
- Knives skins addon (HNR_Knives.sma)
- Alliance addon (HNR_Alliance.sma) - Beta, I'm not sure it's working properly.
- Suprise Box addon (HNR_Surprisebox.sma)
- Winner Dance addon (HNR_InfenderDance.sma)
- Events addon (HNR_Events.sma)
Commands:
Spoiler
Admin Commands:
- amx_addcash <name> <amount> - Adds amount of cash to specific player. Default access level is ADMIN_BAN.
- amx_removecash<name> <amount> - Removes amount of cash from specific player. Default access level is ADMIN_BAN.
- amx_setlevel <name> <level> - Sets player's level to <level>. Default access level is ADMIN_BAN.
Chat Commands:
Shop Addon:
- Radio buttons (radio1, radio2, radio3) and Change team commands (jointeam, chooseteam) - Opens the shop menu.
- say /stats or /xp or /level or /rounds or /wins <playername> - Shows given player stats (Show current level, xp, cash, played rounds, how much times the player won, and what is the ratio of rounds played vs wins). Type the command without the argument to get your own stats.
- say /transfer or /send or /give <playername> <amount> - Transfers <amount> cash to <playername>.
- say /gamble <amount> - Gamble <amount> cash. Win chance is 20%. Minimal amount defined by MIN_GAMBLE_CASH.
- say /next - Shows amount of XP left to earn to level up.
- say /hnrhelp - Shows help MOTD
Knives Addon:
- say /knife or /knives - Display the knife skins menu.
Scouts Addon:
- say /scout or /scouts - Display the scout skins menu.
Alliance Addon:
- say /alliance or /brit - Display the alliance menu.
Events Addon:
- say /event or /events - Check how many rounds left for special event round.
// Toggle self freeze
// 1 = When you throw a frostnade, if you're in range, you will freeze; 0 = Turns off the option
// Default: 1
hnr_fn_selfreeze 1
// Toggle if the frostnade can pass infection
// 1 = Frostnade hit will trigger an infection; 0 = Turns off the option
// Default: 1
hnr_fn_passinfection 1
First of all, the plugin have a full debug system, from hitandrun_settings.inc:
Spoiler
Code:
/*
* Plugin debug mod (Default: DEBUG_OFF)
*
* @NOTE: Very useful for diagnosing bugs and problems.
*
* Debug options:
*
* DEBUG_OFF (0) - Turns off debug mod (Default option).
* DEBUG_FATAL (1) - Shows critical/fatal error messages (ex. model load fail), so plugin can't operate at all when they occur.
* DEBUG_ERROR (2) - Shows error messages (ex. native errors), that the plugin can still operate even when they occur.
* DEBUG_WARNING (4) - Shows warning messages (ex. the winner of the game left the game), that don't effect game-play at much.
* DEBUG_INFO (8) - Shows messages about actions players take and general information about what the plugin is doing right now (Advanced users, not recommended).
* DEBUG_ALL (15) - All above combined (Advanced users, not recommended).
*
*
* NOTE: Even with debug turned off, whenever there is a fatal error - an amxx error will be showen and logged but with limited infomation.
*/
stock const dbg_mode = DEBUG_OFF;
Also, all settings for all the addons, plus the core plugin are handled throught the hitandrun_setttings.inc include file, so pay attention! Note: Linux based-servers using a case-senetive folder/file name. So if the plugin fails to load, it's probably typo of model's/sprite's name.
Forwards:
Spoiler
Core plugin:
Code:
/**
* Called when a player wins the game - Post method.
*
* @param client Client ID
*
* @noreturn
*/
forward OnHNRWinner(client);
/**
* Called when a player gets infected - Pre method.
*
* @param client Client ID
* @param infector ID of last hit (0 if randon infection)
*
* @return 1 to block the infection, 0 for normal operetion
*/
forward OnHNRInfection(client,infector);
/**
* Called when a player killed from an infection - Post method.
*
* @param client Client ID
* @param idkiller Killer ID (aka Last hitter). If there is no last hit, ID=0
*
* @noreturn
*/
forward OnHNRKilled(client,idkiller);
Frostnades addon:
Code:
/**
* Called when a frost nade explodes - Pre method.
*
* @param ent FrostNade entity
*
* @return PLUGIN_CONTINUE to let the core plugin handle it.
* PLUGIN_HANDLED to let the sub-plugin handle it.
*/
forward OnNadeExplotion(ent);
/**
* Called when client gets frozen by a nade - Pre method.
* The forward isn't triggered by set_user_freeze native.
*
* @param client Client ID
*
* @return PLUGIN_CONTINUE to let the core plugin handle it.
* PLUGIN_HANDLED to let the sub-plugin handle it.
*/
forward OnClientFreeze(client);
Suprise Box addon:
Code:
/**
* Called when a player attemps to open a surprise box (In menu).
*
* @param client Client ID
*
* @return PLUGIN_CONTINUE to let the core plugin handle it.
* PLUGIN_HANDLED to let the sub-plugin handle it.
*/
forward OnClientAttempOpenBox(client);
/**
* Called when a player touches a surprise box.
*
* @param client Client ID
* @param iEnt Surprise Box entity ID
*
* @return PLUGIN_CONTINUE to let the core plugin handle it.
* PLUGIN_HANDLED to let the sub-plugin handle it.
*/
forward OnClientTouchBox(client, iEnt);
Events addon:
Code:
/**
* Called when an event is going to start - Pre method.
*
* @param eventid Event ID (see enum eEvent)
*
* @return PLUGIN_CONTINUE to let the core plugin handle it.
* PLUGIN_HANDLED to let the sub-plugin handle it.
*/
forward OnHNREventStart(eventid);
Natives:
Spoiler
Core plugin:
Code:
/**
* Checks if selected client is infected.
*
* @param client Client ID
*
* @return True if is infected, alse false.
*
* @error Invaild client.
*/
native bool:is_user_infected(client);
/**
* Returns the index position of client in the infected list.
*
* @param client Client ID
*
* @return Index position on success, -1 if falied/client isn't infected.
*
* @error Invaild client.
*/
native get_infected_player(client);
/**
* Returns the array that contines the index of clients that are infected
*
* @param aInfectedPlayers The Array
*
* @noreturn
*/
native get_infected_players(aInfectedPlayers[RATIO_INFECT]);
/**
* Returns the amount of current infected clients.
*
* @noparams
*
* @return Amount of infected clients.
*/
native get_infected_count();
/**
* Returns the amount of current humans alive.
*
* @noparams
*
* @return Amount of humans-alive clients.
*/
native get_humans_count();
/**
* Retures the current gamestatus
*
* @noparams
*
* @return Current game status
*/
native GameStatus:get_hnr_status();
/**
* Sets new gamestatus
*
* @param status Game status (see GameStatus enum)
*
* @noreturn
*/
native set_hnr_status(GameStatus:status);
Frostnades Addon:
Code:
/**
* Checks if selected client is freezed.
*
* @param client Client ID
*
* @return True if is freezed, else false.
*
* @error Invaild client.
*/
native bool:is_user_freezed(client);
/**
* Freeze/Unfreeze selected client.
*
* @param client Client ID
* @param bFreezed Freeze/Unfreeze client
*
* @return 1 on success, 0 on fail.
*
* @error Invaild client.
*/
native set_user_freeze(client,bool:bFreezed);
Shop Addon:
Code:
/**
* Gets client's cash.
*
* @param client Client ID
*
* @return Client cash.
*
* @error Invaild client.
*/
native get_user_cash(client);
/**
* Gets client's total rounds.
*
* @param client Client ID
*
* @return Client total rounds
*.
* @error Invaild client.
*/
native get_user_rounds(client);
/**
* Gets client's total wins.
*
* @param client Client ID
*
* @return Client total wins.
*
* @error Invaild client.
*/
native get_user_wins(client);
/**
* Gets client's XP.
*
* @param client Client ID
*
* @return Client XP.
*
* @error Invaild client.
*/
native get_user_xp(client);
/**
* Gets client's level.
*
* @param client Client ID
*
* @return Client level.
*
* @error Invaild client.
*/
native get_user_level(client);
/**
* Sets client's cash.
*
* @param client Client ID
* @param cash The cash
*
* @return 1 on success, 0 if failed.
*
* @error Invaild client.
*/
native set_user_cash(client,cash);
/**
* Sets client's total rounds.
*
* @param client Client ID
* @param rounds Total rounds
*
* @return 1 on success, 0 if failed.
*
* @error Invaild client.
*/
native set_user_rounds(client,rounds);
/**
* Sets client's total wins.
*
* @param client Client ID
* @param wins Total wins
*
* @return 1 on success, 0 if failed.
*
* @error Invaild client.
*/
native set_user_wins(client,wins);
/**
* Sets client's XP.
*
* @param client Client ID
* @param xp XP
*
* @return 1 on success, 0 if failed.
*
* @error Invaild client.
*/
native set_user_xp(client,xp);
/**
* Sets client's level.
*
* @param client Client ID
* @param level Level
*
* @return 1 on success, 0 if failed.
*
* @error Invaild client.
*/
native set_user_level(client,level);
Alliance Addon:
Code:
/**
* Checks if the client have an alliance made with another player.
*
* @param client Client ID
*
* @return True if there is, false if not
*
* @error Invaild client.
*/
native bool:is_user_allianced(client);
/**
* Get's client's alliance ID, if there is an alliance.
*
* @param client Client ID
*
* @return Client's alliance ID. If there is no alliance, it will return -1
*
* @error Invaild client.
*/
native get_user_alliance(client);
/**
* Set's client's alliance with other player
*
* @param client Client ID
* @param idother The ID of the other player we want to make an alliance. (0 to remove)
*
* @return 1 on success, 0 if client/other player is dead/there less then 3 humans alive (failed), -1 on error
*
* @error Invaild client/alliance
*/
native set_user_alliance(client, idother);
Suprise Box Addon:
Code:
/**
* Checks if selected client is in select menu.
*
* @param client Client ID
*
* @return True if is in menu or false if not or failed.
*
* @error Invaild client.
*/
native bool:is_client_onboxmenu(client);
/**
* Forces showing surprise box menu to a selected client.
*
* @param client Client ID
*
* @return 1 on success, 0 on fail, -1 if the client is HLTV or a bot.
*
* @error Invaild client.
*/
native client_forceboxmenu(client);
/**
* Creates a surprise box with given origin.
*
* @param origin A 3-sized array that contain the location of the box (aka origin).
*
* @return Entity id on success, -1 if failed/got to max entites.
*/
native create_surprisebox(Float:origin[3]);
/**
* Removes a specific surprise box entity.
*
* @param iEnt The surprise box entity id.
*
* @return Returns 1 on success, 0 if the ent isn't surprise box.
*
* @error Invaild entity.
*/
native remove_surprisebox(iEnt);
/**
* Purge all supply boxes entites.
*
* @noparams
*
* @return 1 on success, 0 if there aren't any supply box entites.
*/
native purge_surpriseboxes();
/**
* Returns how much supply box entities are exist.
*
* @noparams
*
* @return Supply boxes in the map.
*/
native get_surprisebox_count();
Events addon:
Code:
/**
* Returns the current event running.
*
* @noparams
*
* @return ID of the current event, 0 if no event is running.
*/
native get_round_event();
FAQ:
Spoiler
* Q: What is this plugin?
* A: This plugin is a new gameplay mode for Counter-Strike. All players go to the Terrorists team, 10 seconds after the game starts and 1 or more players get randomly an 'infection' from a mysterious virus. The main goal is to pass the infection to other players before the time runs out and the virus kill the player. The winner is the player that survived the infection.
* Q: What games does it support?
* A: Only Counter-Strike 1.6 and Counter-Strike: Condition Zero.
* Q: Which license is used in the plugin?
* A: The Core plugin and the addons are published under GNU GPL v3 license. See LICENSE.txt for more information.
* Q: What are the requirements to run the plugin?
* A: Metamod v1.2.1-am/Metamod-P 1.21p38, AMX Mod X v1.9+ (Recommanded: v1.10+), and updated STEAM server build 6153+ - Aug 2013 (Recommanded: build 8177+ Mar 2019).
* Q: Why AMX Mod X v1.9? It's not stable version! Why not using the stable v1.8.2?
* A: OK first of all it IS a stable version. Second - there need's to be alot of workaround to be able to run this on v1.8.2, and v1.9+ just have alot more options and is easier.
* Q: Does it support AMX Mod?
* A: No, and it won't.
* Q: Can you make this plugin as an AMXX Module/Metamod plugin?
* A: No, since I'm bad at coding in C & C++. Plus I don't have a linux machine to make it competible with linux. But you can do it if you have the tools, knowlage and wanting.
* Q: What is HyuNaS HitAndRun v1.0? How come I had never heared of it?
* A: That's my old version for the gamemode, released back in 2013, had a poorly made API, and all addons were actually combined to a one big file which made everything messedup for developers.
* Q: Is v1.0 compatible with v2.0?
* A: No. As far considered, there are non-compatible and running both version will result errors. They are both practically different plugins.
* Q: Which addons comes with the Core plugin?
* A: Frostnade addon, Shop addon, Scouts skins addon, Knives skins addon, Alliance addon, Surprise Box addon and Winner Dance addon.
* Q: Does it support Multi-Langauge?
* A: Depends on the build. Build 120+ - Full support; Build 119 - Partial support; Build <118 - No support. See CHANGELOG.txt for more information.
* Q: Multi-Language not working! It's showing ML_NOTFOUND messages!
* A: Make sure you've installed the plugin propaply and installed all language files.
* Q: This plugin shows English rows instead of my native language, WTF?
* A: Make sure your language server and your client server is set to your native language. If the problem still occures, the plugin/addons haven't yet been translated to your native language, sorry. You can contribute by translating it to your native language and publish it.
* Q: Can I customize the plugin/addons?
* A: Of course! See hitandrun_settings.inc for more information.
* Q: I want to make an addon, how?
* A: There is a full API-working for this. See hitandrun.inc for more information.
* Q: There are bugs in the plugin/addons!
* A: Enable debug with all options enabled (via hitandrun_settings.inc), run the server until the problem occures and post the log files (including amxx error logs if there are), with full information about your server (metamod version & running dlls, amxx version & running plugins & modules, server version and server status command) and what you did to repeat the problem. If you had changed some stuff from the vanilla version - also post the code that have been changed. Posting a video/screenshot will also help identify the problem. NOTE: Most of the time you can see yourself what error occures as debug with all options will log EVERYTHING the plugin does, helping you identifing and fixing the problem by yourself.
* Q: I have an idea for X feature.
* A: Good! You can freely publish your addon under GNU GPL v3 license.
* Q: I want X feature to be in the vanilla version!
* A: If it's really importent and makes alot of change - I'll consider adding your addon to the offical repository. If not - don't worry, you can always publish the addon (:
* Q: Bang bang!
* A: My baby shot me down.
Changelog:
Spoiler
v2.0 BUILD 140
[10/12/2021]
Changes/Additions :
-------------------
- SHOP: Added more functions to the menu.
- SHOP: Added help motd.
- EVENTS: Added Events addon.
- DEV: New include: hitandrun_events.inc
- DEV: Minimal AMXX version increased to v1.9.0.
- ALL: A lot of bug fixes.
- ALL: Added missing ML keys.
- EVENTS: hnr_events_rnd
Sets how many rounds an event will playout.
Default: 7
v2.0 BUILD 132
[30/04/2020]
Changes/Additions :
-------------------
- SCOUTS: Fixed a glitch with the models.
- KNIVES: Fixed a glitch with the models.
- DANCE: Added Winner Dance addon (xd).
v2.0 BUILD 131
[11/04/2020]
Changes/Additions :
-------------------
- CORE: Moved changing some cvar to the config file.
- CORE: Fixed bunnyhop not working.
- SHOP: Now you won't be able to buy stuff if you are dead!
- SHOP: Added viewing players stats.
- SHOP: Changed some default values.
- SHOP: Added amx_setlevel command.
- SHOP: Fixed the amx_addcash & amx_removecash commands.
- SCOUTS: Fixed some bug with the menu.
- KNIVES: Fixed some bug with the menu.
- KNIVES: Fixed ML key typo.
- ALL: Added missing ML keys.
v2.0 BUILD 130
[09/04/2020]
Changes/Additions :
-------------------
- CORE: Removed gib player feature (Seems like there are some bugs with it).
- CORE: Changed hnr_noslowdown cvar to hnr_jumpstyle and changed it purpose.
- KNIVES: Fixed ML error.
- DEV: Moved define versions to hitandrun_const.inc.
v2.0 BUILD 121
[28/06/2019]
Changes/Additions :
-------------------
- ALL: Final optimization for final public release.
v2.0 BUILD 120
[28/06/2019]
Changes/Additions :
-------------------
- CORE: Added map check - plugin will be disabled on non-hnr(/bombgame) maps.
- DEVELOPERS: Removed hnr_dbg_init() stock (The hnr_dbg_message() stock now handles it).
- SHOP: Fixed a bug in the ML system.
- ALLIANCE: Added multilangauge system. See hnr_alliance.txt.
- SCOUTS: Added multilangauge system. See hnr_scouts.txt.
- KNIVES: Added multilangauge system. See hnr_knives.txt.
v2.0 BUILD 119
[01/06/2019]
Changes/Additions :
-------------------
- SHOP: Added multilangauge system. See hnr_shop.txt.
- SUPRISEBOX: Added multilangauge system. See hnr_sb.txt.
Bug Fixes :
-----------
- SHOP: Fixed menu not showing properly.
v2.0 BUILD 118
[31/05/2019]
Changes/Additions :
-------------------
- CORE: Added multilangauge system. See hnr_core.txt.
v2.0 BUILD 117
[30/05/2019]
Changes/Additions :
-------------------
- ALL: Some optimizations and preperations for future updates.
Bug Fixes :
-----------
- KNIVES: Fixed some bugs.
v2.0 BUILD 115
[23/05/2019]
Bug Fixes :
-----------
- SHOP: Fixed some bugs with amx_addcash and amx_removecash commands.
- SCOUTS: Fixed some bugs.
v2.0 BUILD 114
[19/05/2019]
Changes/Additions :
-------------------
- CORE: Changed some default settings.
- SCOUTS: Plugin optimized.
- KNIVES: Added Knives Skins System plugin.
Bug Fixes :
-----------
- ALLIANCE: Fixed some bugs.
v2.0 BUILD 113
[09/05/2019]
Changes/Additions :
-------------------
- CORE: Changed some default settings.
- DEVELOPERS: Sepereted const include file from the settings (new include - hitandrun_settings).
- SCOUTS: Added Scouts Skins System plugin.
v2.0 BUILD 112
[05/05/2019]
Changes/Additions :
-------------------
- CORE: Added get_humans_count native.
- SHOP: Added gamble system (30% chance win).
- SHOP: Added "/next" command to see how much xp needed for next level.
- ALLIANCE: Added Alliance plugin.
- ALLIANCE: New natives: is_user_allianced, get_user_alliance, set_user_alliance
Bug Fixes :
-----------
- SHOP: Fixed set_user_xp native not working propaply.
v2.0 BUILD 111
[04/05/2019]
Changes/Additions :
-------------------
- CORE: Adding mark for infected player in scoreboard.
- SHOP: Changed some cvar defualts.
New CVARS :
-----------
- SHOP: hnr_bonusxp
Amount of XP get for being the last guy to pass the infection
Default: 1
- SHOP: hnr_bonuscash
Amount of Cash get for being the last guy to pass the infection
Default: 2
Bug Fixes :
-----------
- CORE: Fixed when enable the plugin, all functions enabled even when some cvars turned off.
- CORE: Fixed hnr_nozoom cvar not working propaply.
- CORE: Fixed infection ratio not working as expected.
- SHOP: Fixed XP-Level system.
v2.0 BUILD 110
[03/05/2019]
Changes/Additions :
-------------------
- CORE: Changing OnHNRInfection forward from Post-Method to Pre-Method (useful for alliance plugin).
- CORE: Adding Killer ID parameter to OnHNRKilled forward.
- SUPRISE BOX: Changed max surprise boxes from 20 to MAX_PLAYERS (32).
Bug Fixes :
-----------
- CORE: Fixed when new round kicks-in and all players suddenly die and re-spawn with scout.
- CORE: Fixed plugin not working after refresh start/map change.
- SHOP: Fixed the bug that won't allow you to buy anything from the shop even if you got the money.
v2.0 BUILDS 101 - 109
[Mid-2018 To Late-2018]
Changes/Additions :
-------------------
- A lot of stuff I can't really remember and haven't documented it.
- A lot of plugin optimization.
- ADDED: Debug system for developers.
- ADDED: Shop system, Frost-nades system, Surprise-Box System.
- ADDED: Shittone of includes (hitandrun.inc, hitandrun_const.inc, hitandrun_fn.inc, hitandrun_shop.inc, hitandrun_sb.inc, hitandrun_stocks.inc).
New CVARS :
-----------
- CORE: hnr_blockradio
Blocks "Fire in the hole" text and sound.
Default: 1
- CORE: hnr_gibplayer
Gibs a player when he dies from infection.
Default: 1
Requirements:
- STEAM Server updated to the last version (no steam = no support)
- CS/CZ Server only
- Metamod 1.21-am/Metamod-p 1.21p38/Metamod-r v1.3.128 and up
- AMX Mod X 1.9 and up
- A HNR/Bombgame map (I added a link to download some of those maps)
- cstrike_pdata include files (yeah those old ones still work)
Installation:
- Download & compile the files locally (it's recommended to edit the settings in hitandrun_settings.inc).
- Download & drop the resources files to your cstrike (/czero) server folder.
- Edit the plugins-hitandrun.ini file to your desire (With this file you can customize which addons you want to enable, by default all of them are enabled).
- Drop the compiled files to your plugin folder.
- Change the server map to any HNR/Bombgame map.
- Enjoy!
Credits:
- HiyoriX aka Hyuna - The plugin creator.
- Hasson - Part of the Winner Dance addon.
@alferd
Read the requirements.
You must have AMXX v1.9 or up & the cstrike_pdata include files.
I already provied those include files in the original post.
@alferd
Read the requirements.
You must have AMXX v1.9 or up & the cstrike_pdata include files.
I already provied those include files in the original post.