├── cfg └── MyJailShop │ └── .gitkeep ├── addons └── sourcemod │ ├── logs │ └── MyJailShop │ │ └── .gitkeep │ ├── scripting │ ├── compile-shop.bat │ ├── include │ │ ├── myicons.inc │ │ ├── store │ │ │ ├── store-loadouts.inc │ │ │ ├── store-shop.inc │ │ │ ├── store-inventory.inc │ │ │ ├── store-stocks.inc │ │ │ └── store-logging.inc │ │ ├── tacticalshield.inc │ │ ├── smartjaildoors.inc │ │ ├── store.inc │ │ ├── CustomPlayerSkins.inc │ │ ├── hosties.inc │ │ ├── myjailshop.inc │ │ ├── emitsoundany.inc │ │ ├── myjailbreak.inc │ │ ├── myjbwarden.inc │ │ ├── smartdm.inc │ │ └── lastrequest.inc │ ├── myjailshop-sm-store.sp │ ├── myjailshop_hud.sp │ ├── myjailshop_freeday.sp │ ├── myjailshop_blackout.sp │ ├── myjailshop_tacticalshield.sp │ ├── myjailshop_door.sp │ ├── myjailshop_icegrenade.sp │ ├── myjailshop_jihad.sp │ └── myjailshop_parachute.sp │ └── translations │ ├── fr │ └── MyJailShop.phrases.txt │ ├── chi │ └── MyJailShop.phrases.txt │ ├── es │ └── MyJailShop.phrases.txt │ ├── de │ └── MyJailShop.phrases.txt │ ├── ko │ └── MyJailShop.phrases.txt │ ├── it │ └── MyJailShop.phrases.txt │ ├── hu │ └── MyJailShop.phrases.txt │ ├── pl │ └── MyJailShop.phrases.txt │ └── ru │ └── MyJailShop.phrases.txt ├── models ├── spree │ ├── spree.mdl │ ├── spree.phy │ ├── spree.vvd │ ├── spree.dx80.vtx │ ├── spree.dx90.vtx │ └── spree.sw.vtx └── parachute │ ├── parachute_carbon.mdl │ ├── parachute_carbon.vvd │ ├── parachute_carbon.dx80.vtx │ ├── parachute_carbon.dx90.vtx │ ├── parachute_carbon.sw.vtx │ └── parachute_carbon.xbox.vtx ├── materials └── models │ ├── spree │ └── spree.vtf │ ├── parachute │ ├── pack_carbon.vmt │ ├── pack_carbon.vtf │ ├── parachute_carbon.vmt │ └── parachute_carbon.vtf │ └── hypy │ └── hype.vmt ├── sound └── music │ ├── MyJailbreak │ ├── boom.mp3 │ └── suicidebomber.mp3 │ └── MyJailshop │ ├── switch.mp3 │ └── blackout.mp3 ├── fastDL ├── models │ ├── spree │ │ ├── spree.mdl.bz2 │ │ ├── spree.phy.bz2 │ │ ├── spree.vvd.bz2 │ │ ├── spree.sw.vtx.bz2 │ │ ├── spree.dx80.vtx.bz2 │ │ └── spree.dx90.vtx.bz2 │ └── parachute │ │ ├── parachute_carbon.mdl.bz2 │ │ ├── parachute_carbon.vvd.bz2 │ │ ├── parachute_carbon.sw.vtx.bz2 │ │ ├── parachute_carbon.dx80.vtx.bz2 │ │ ├── parachute_carbon.dx90.vtx.bz2 │ │ └── parachute_carbon.xbox.vtx.bz2 ├── materials │ └── models │ │ ├── hypy │ │ └── hype.vmt.bz2 │ │ ├── spree │ │ └── spree.vtf.bz2 │ │ └── parachute │ │ ├── pack_carbon.vmt.bz2 │ │ ├── pack_carbon.vtf.bz2 │ │ ├── parachute_carbon.vmt.bz2 │ │ └── parachute_carbon.vtf.bz2 └── sound │ └── music │ ├── MyJailbreak │ ├── boom.mp3.bz2 │ └── suicidebomber.mp3.bz2 │ └── MyJailshop │ ├── switch.mp3.bz2 │ └── blackout.mp3.bz2 ├── install.txt ├── .travis.yml ├── README.md ├── ci ├── test.sh └── build.sh └── CHANGELOG.md /cfg/MyJailShop/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /addons/sourcemod/logs/MyJailShop/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/spree/spree.mdl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/spree/spree.mdl -------------------------------------------------------------------------------- /models/spree/spree.phy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/spree/spree.phy -------------------------------------------------------------------------------- /models/spree/spree.vvd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/spree/spree.vvd -------------------------------------------------------------------------------- /models/spree/spree.dx80.vtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/spree/spree.dx80.vtx -------------------------------------------------------------------------------- /models/spree/spree.dx90.vtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/spree/spree.dx90.vtx -------------------------------------------------------------------------------- /models/spree/spree.sw.vtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/spree/spree.sw.vtx -------------------------------------------------------------------------------- /materials/models/spree/spree.vtf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/materials/models/spree/spree.vtf -------------------------------------------------------------------------------- /sound/music/MyJailbreak/boom.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/sound/music/MyJailbreak/boom.mp3 -------------------------------------------------------------------------------- /fastDL/models/spree/spree.mdl.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/spree/spree.mdl.bz2 -------------------------------------------------------------------------------- /fastDL/models/spree/spree.phy.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/spree/spree.phy.bz2 -------------------------------------------------------------------------------- /fastDL/models/spree/spree.vvd.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/spree/spree.vvd.bz2 -------------------------------------------------------------------------------- /sound/music/MyJailshop/switch.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/sound/music/MyJailshop/switch.mp3 -------------------------------------------------------------------------------- /fastDL/models/spree/spree.sw.vtx.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/spree/spree.sw.vtx.bz2 -------------------------------------------------------------------------------- /models/parachute/parachute_carbon.mdl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/parachute/parachute_carbon.mdl -------------------------------------------------------------------------------- /models/parachute/parachute_carbon.vvd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/parachute/parachute_carbon.vvd -------------------------------------------------------------------------------- /sound/music/MyJailshop/blackout.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/sound/music/MyJailshop/blackout.mp3 -------------------------------------------------------------------------------- /fastDL/models/spree/spree.dx80.vtx.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/spree/spree.dx80.vtx.bz2 -------------------------------------------------------------------------------- /fastDL/models/spree/spree.dx90.vtx.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/spree/spree.dx90.vtx.bz2 -------------------------------------------------------------------------------- /materials/models/parachute/pack_carbon.vmt: -------------------------------------------------------------------------------- 1 | "vertexlitgeneric" 2 | { 3 | "$baseTexture" "models/parachute/pack_carbon" 4 | } 5 | -------------------------------------------------------------------------------- /fastDL/materials/models/hypy/hype.vmt.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/materials/models/hypy/hype.vmt.bz2 -------------------------------------------------------------------------------- /materials/models/parachute/pack_carbon.vtf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/materials/models/parachute/pack_carbon.vtf -------------------------------------------------------------------------------- /models/parachute/parachute_carbon.dx80.vtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/parachute/parachute_carbon.dx80.vtx -------------------------------------------------------------------------------- /models/parachute/parachute_carbon.dx90.vtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/parachute/parachute_carbon.dx90.vtx -------------------------------------------------------------------------------- /models/parachute/parachute_carbon.sw.vtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/parachute/parachute_carbon.sw.vtx -------------------------------------------------------------------------------- /models/parachute/parachute_carbon.xbox.vtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/models/parachute/parachute_carbon.xbox.vtx -------------------------------------------------------------------------------- /sound/music/MyJailbreak/suicidebomber.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/sound/music/MyJailbreak/suicidebomber.mp3 -------------------------------------------------------------------------------- /fastDL/materials/models/spree/spree.vtf.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/materials/models/spree/spree.vtf.bz2 -------------------------------------------------------------------------------- /fastDL/sound/music/MyJailbreak/boom.mp3.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/sound/music/MyJailbreak/boom.mp3.bz2 -------------------------------------------------------------------------------- /fastDL/sound/music/MyJailshop/switch.mp3.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/sound/music/MyJailshop/switch.mp3.bz2 -------------------------------------------------------------------------------- /materials/models/parachute/parachute_carbon.vmt: -------------------------------------------------------------------------------- 1 | "vertexlitgeneric" 2 | { 3 | "$baseTexture" "models\parachute/parachute_carbon" 4 | } 5 | -------------------------------------------------------------------------------- /fastDL/sound/music/MyJailshop/blackout.mp3.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/sound/music/MyJailshop/blackout.mp3.bz2 -------------------------------------------------------------------------------- /materials/models/parachute/parachute_carbon.vtf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/materials/models/parachute/parachute_carbon.vtf -------------------------------------------------------------------------------- /fastDL/models/parachute/parachute_carbon.mdl.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/parachute/parachute_carbon.mdl.bz2 -------------------------------------------------------------------------------- /fastDL/models/parachute/parachute_carbon.vvd.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/parachute/parachute_carbon.vvd.bz2 -------------------------------------------------------------------------------- /fastDL/models/parachute/parachute_carbon.sw.vtx.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/parachute/parachute_carbon.sw.vtx.bz2 -------------------------------------------------------------------------------- /fastDL/sound/music/MyJailbreak/suicidebomber.mp3.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/sound/music/MyJailbreak/suicidebomber.mp3.bz2 -------------------------------------------------------------------------------- /fastDL/materials/models/parachute/pack_carbon.vmt.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/materials/models/parachute/pack_carbon.vmt.bz2 -------------------------------------------------------------------------------- /fastDL/materials/models/parachute/pack_carbon.vtf.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/materials/models/parachute/pack_carbon.vtf.bz2 -------------------------------------------------------------------------------- /fastDL/models/parachute/parachute_carbon.dx80.vtx.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/parachute/parachute_carbon.dx80.vtx.bz2 -------------------------------------------------------------------------------- /fastDL/models/parachute/parachute_carbon.dx90.vtx.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/parachute/parachute_carbon.dx90.vtx.bz2 -------------------------------------------------------------------------------- /fastDL/models/parachute/parachute_carbon.xbox.vtx.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/models/parachute/parachute_carbon.xbox.vtx.bz2 -------------------------------------------------------------------------------- /materials/models/hypy/hype.vmt: -------------------------------------------------------------------------------- 1 | "UnlitGeneric" 2 | { 3 | "$model" 1 4 | 5 | "$basetexture" "models/spree/spree" 6 | "$translucent" "1" 7 | "$nocull" 1 8 | } -------------------------------------------------------------------------------- /fastDL/materials/models/parachute/parachute_carbon.vmt.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/materials/models/parachute/parachute_carbon.vmt.bz2 -------------------------------------------------------------------------------- /fastDL/materials/models/parachute/parachute_carbon.vtf.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanapu/MyJailShop/HEAD/fastDL/materials/models/parachute/parachute_carbon.vtf.bz2 -------------------------------------------------------------------------------- /addons/sourcemod/scripting/compile-shop.bat: -------------------------------------------------------------------------------- 1 | spcomp myjailshop.sp -o../plugins/myjailshop.smx 2 | spcomp myjailshop-sm-store.sp -o../plugins/disabled/myjailshop-sm-store.smx 3 | spcomp myjailshop-frozdark-shop.sp -o../plugins/disabled/myjailshop-frozdark-shop.smx 4 | pause -------------------------------------------------------------------------------- /install.txt: -------------------------------------------------------------------------------- 1 | Make sure you have the latest versions of the required plugins 2 | 3 | 4 | Open Copy the folders addons/ & cfg/ to your gameservers root csgo/ directory 5 | 6 | Run plugin for the first time and all necessary .cfg files will be generated 7 | 8 | Configure all settings in cfg/MyJailShop to your needs 9 | 10 | Have fun! Give feedback! -------------------------------------------------------------------------------- /addons/sourcemod/translations/fr/MyJailShop.phrases.txt: -------------------------------------------------------------------------------- 1 | // Exported from SourceMod Translator 2 | // Date: 2018-08-20 21:17:56 UTC 3 | // Language: French (fr) 4 | // 5 | // To view other translations for this plugin, please visit: 6 | // http://translator.mitchdempsey.com/sourcemod_plugins/268 7 | // 8 | "Phrases" 9 | { 10 | 11 | "shop_throwingknife" 12 | { 13 | "fr" " Tu as acheté: couteau de lancer" 14 | } 15 | 16 | "shop_giftyourself" 17 | { 18 | "fr" "Tu ne peux pas te donner" 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | addons: 2 | apt: 3 | packages: 4 | - lftp 5 | - lib32z1 6 | - lib32stdc++6 7 | 8 | language: c 9 | 10 | sudo: false 11 | 12 | env: 13 | - VERSION=1.9 14 | - VERSION=1.10 15 | - VERSION=1.11 16 | 17 | script: 18 | - 'if [[ $TRAVIS_PULL_REQUEST != "false" ]]; then bash ci/test.sh $VERSION $TRAVIS_BRANCH; fi' 19 | - 'if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then bash ci/build.sh $VERSION $TRAVIS_BRANCH $FTP_HOST $FTP_USER $FTP_PASS ${TRAVIS_COMMIT::7}; fi' 20 | 21 | notifications: 22 | email: false -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/myicons.inc: -------------------------------------------------------------------------------- 1 | #if defined _myicons_included 2 | #endinput 3 | #endif 4 | #define _myicons_included 5 | 6 | 7 | public SharedPlugin:__pl_myicons = 8 | { 9 | name = "myicons", 10 | file = "myicons.smx", 11 | 12 | #if defined REQUIRE_PLUGIN 13 | required = 1, 14 | #else 15 | required = 0, 16 | #endif 17 | }; 18 | 19 | 20 | #if !defined REQUIRE_PLUGIN 21 | public __pl_myicons_SetNTVOptional() 22 | { 23 | MarkNativeAsOptional("MyIcons_BlockClientIcon"); 24 | } 25 | #endif 26 | 27 | /********************************************************* 28 | * Block the players icon bool 29 | * 30 | * @param client The client to block icon 31 | * @param status true or false 32 | * @NoReturn 33 | *********************************************************/ 34 | native MyIcons_BlockClientIcon(int client, bool status); 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## MyJailShop 2 | 3 | a high customizable shop with credits system intended for jailbreak server. 4 | 5 | Download: https://shanapu.de/MyJailShop 6 | Discuss: https://forums.alliedmods.net/showthread.php?t=288712 7 | Report: https://github.com/shanapu/MyJailShop/issues 8 | 9 | master: [![Build Status](https://img.shields.io/travis/shanapu/MyJailShop/master.svg?style=flat-square)](https://travis-ci.org/shanapu/MyJailShop?branch=master) dev: [![Build Status](https://img.shields.io/travis/shanapu/MyJailShop/dev.svg?style=flat-square)](https://travis-ci.org/shanapu/MyJailShop?branch=dev) 10 | 11 | 12 | 13 | coded with ![](http://shanapu.de/githearth-small.png) free software 14 | 15 | *my golden faucets not finance itself...* [ ![](http://shanapu.de/donate.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QT8TVRSYWP53J) 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/store/store-loadouts.inc: -------------------------------------------------------------------------------- 1 | #if defined _store_loadouts_included 2 | #endinput 3 | #endif 4 | #define _store_loadouts_included 5 | 6 | //Forwards 7 | forward void Store_OnClientLoadoutChanged(int client); 8 | 9 | /** 10 | * Opens the loadout menu for a client. 11 | * 12 | * @param client Client index. 13 | * 14 | * @noreturn 15 | */ 16 | native void Store_OpenLoadoutMenu(int client); 17 | 18 | /** 19 | * Gets client current loadout. 20 | * 21 | * @param client Client index. 22 | * 23 | * @return Loadout index. 24 | */ 25 | native int Store_GetClientLoadout(int client); 26 | 27 | /** 28 | * Sets client current loadout. 29 | * 30 | * @param client Client index. 31 | * 32 | * @noreturn 33 | */ 34 | native void Store_SetClientLoadout(int client, int loadout_id); 35 | 36 | public SharedPlugin __pl_store_loadouts = 37 | { 38 | name = "store-loadouts", 39 | file = "store-loadouts.smx", 40 | #if defined REQUIRE_PLUGIN 41 | required = 1, 42 | #else 43 | required = 0, 44 | #endif 45 | }; 46 | 47 | #if defined REQUIRE_PLUGIN 48 | public __pl_store_loadouts_SetNTVOptional() 49 | { 50 | MarkNativeAsOptional("Store_OpenLoadoutMenu"); 51 | MarkNativeAsOptional("Store_GetClientLoadout"); 52 | MarkNativeAsOptional("Store_SetClientLoadout"); 53 | } 54 | #endif -------------------------------------------------------------------------------- /addons/sourcemod/translations/chi/MyJailShop.phrases.txt: -------------------------------------------------------------------------------- 1 | // Exported from SourceMod Translator 2 | // Date: 2017-02-20 16:12:11 UTC 3 | // Language: Chinese (Simplified) (chi) 4 | // 5 | // To view other translations for this plugin, please visit: 6 | // http://translator.mitchdempsey.com/sourcemod_plugins/268 7 | // 8 | "Phrases" 9 | { 10 | 11 | "shop_alive" 12 | { 13 | "chi" "你需要活着去买" 14 | } 15 | 16 | "shop_alreadyopen" 17 | { 18 | "chi" "监狱门已经打开" 19 | } 20 | 21 | "shop_awp" 22 | { 23 | "chi" "你已经买了一个AWP,明智地使用它!" 24 | } 25 | 26 | "shop_bhop" 27 | { 28 | "chi" "现在你有BunnyHop 跳跃跳!" 29 | } 30 | 31 | "shop_bird" 32 | { 33 | "chi" "你已经变成了一只鸟! 飞与使用 '+dropweapon'" 34 | } 35 | 36 | "shop_buytime" 37 | { 38 | "chi" "购买时间现在用完了,你可以再下一轮购买." 39 | } 40 | 41 | "shop_costs" 42 | { 43 | "chi" "成本:{2}¢credit。 现在,您有{1}¢credit“" 44 | } 45 | 46 | "shop_credits" 47 | { 48 | "chi" "你有:{1} credits! " 49 | } 50 | 51 | "shop_dead" 52 | { 53 | "chi" "您必须死亡才能使用此项目" 54 | } 55 | 56 | "shop_deagle" 57 | { 58 | "chi" "你买了一个: Deagle, 明智地使用它!" 59 | } 60 | 61 | "shop_disabled" 62 | { 63 | "chi" "监狱商店目前{purple}无法使用{default}!" 64 | } 65 | 66 | "shop_firegrenade" 67 | { 68 | "chi" "你买了: HE 可以燃烧你的敌人!" 69 | } 70 | 71 | "shop_froggyjump" 72 | { 73 | "chi" "你现在可以像一只青蛙一样跳跃!" 74 | } 75 | 76 | "shop_fulllive" 77 | { 78 | "chi" "你已经完全健康了!" 79 | } 80 | 81 | "shop_maxcredits" 82 | { 83 | "chi" "你有最大¢redits : {1}" 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/store/store-shop.inc: -------------------------------------------------------------------------------- 1 | #if defined _store_shop_included 2 | #endinput 3 | #endif 4 | #define _store_shop_included 5 | 6 | //Forwards 7 | forward Action Store_OnBuyItem(int client, int itemId); 8 | forward void Store_OnBuyItem_Post(int client, int itemId, bool success); 9 | forward void Store_OnShopCmd(int client); 10 | forward void Store_OnShopStatusChange(int client, bool bLocked); 11 | 12 | /** 13 | * Opens the shop menu for a client. 14 | * 15 | * @param client Client index. 16 | * 17 | * @noreturn 18 | */ 19 | native void Store_OpenShop(int client); 20 | 21 | /** 22 | * Opens the shop menu for a client in a specific category. 23 | * 24 | * @param client Client index. 25 | * @param categoryId The category that you want to open. 26 | * 27 | * @noreturn 28 | */ 29 | native void Store_OpenShopCategory(int client, int categoryId); 30 | 31 | native void Store_LockShop(int client); 32 | native void Store_UnlockShop(int client); 33 | native void Store_SetShopStatus(int client, bool bLock); 34 | native bool Store_IsShopLocked(); 35 | 36 | public SharedPlugin __pl_store_shop = 37 | { 38 | name = "store-shop", 39 | file = "store-shop.smx", 40 | #if defined REQUIRE_PLUGIN 41 | required = 1, 42 | #else 43 | required = 0, 44 | #endif 45 | }; 46 | 47 | #if defined REQUIRE_PLUGIN 48 | public __pl_store_shop_SetNTVOptional() 49 | { 50 | MarkNativeAsOptional("Store_OpenShop"); 51 | MarkNativeAsOptional("Store_OpenShopCategory"); 52 | } 53 | #endif -------------------------------------------------------------------------------- /addons/sourcemod/translations/es/MyJailShop.phrases.txt: -------------------------------------------------------------------------------- 1 | // Exported from SourceMod Translator 2 | // Date: 2017-02-20 16:12:10 UTC 3 | // Language: Spanish (es) 4 | // 5 | // To view other translations for this plugin, please visit: 6 | // http://translator.mitchdempsey.com/sourcemod_plugins/268 7 | // 8 | "Phrases" 9 | { 10 | 11 | "shop_alive" 12 | { 13 | "es" "¡Debes estar vivo para comprar algo!" 14 | } 15 | 16 | "shop_alreadyopen" 17 | { 18 | "es" "Las células ya están abiertas" 19 | } 20 | 21 | "shop_awp" 22 | { 23 | "es" "Compraste: AWP con un disparo, ¡úsalo con inteligencia!" 24 | } 25 | 26 | "shop_buytime" 27 | { 28 | "es" "Se acabó el tiempo de compras. Puedes comprar de nuevo en la próxima ronda." 29 | } 30 | 31 | "shop_costs" 32 | { 33 | "es" "Costes: {2} ¢réditos. Ahora tienes {1} ¢réditos" 34 | } 35 | 36 | "shop_dead" 37 | { 38 | "es" "¡Debes estar muerto para usar esto!" 39 | } 40 | 41 | "shop_deagle" 42 | { 43 | "es" "Compraste: Deagle con siete disparos, ¡úsalos con inteligencia!" 44 | } 45 | 46 | "shop_give" 47 | { 48 | "es" "Enviaste {1} ¢réditos al jugador {2}" 49 | } 50 | 51 | "shop_knife" 52 | { 53 | "es" "Compraste: ¡Cuchillo de un golpe!" 54 | } 55 | 56 | "shop_max" 57 | { 58 | "es" "Ya compraste eso en esta ronda, espera a la próxima para comprarlo de nuevo." 59 | } 60 | 61 | "shop_maxcredits" 62 | { 63 | "es" "Tus ¢réditos en la tienda: {1}, ¡máximo permitido!" 64 | } 65 | 66 | "shop_taser" 67 | { 68 | "es" "Compraste: Pistola eléctrica con 3 disparos, ¡úsalos con inteligencia!" 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /ci/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ev 4 | 5 | echo "Download und extract sourcemod" 6 | wget -q "http://www.sourcemod.net/latest.php?version=$1&os=linux" -O sourcemod.tar.gz 7 | # wget "http://www.sourcemod.net/latest.php?version=$1&os=linux" -O sourcemod.tar.gz 8 | tar -xzf sourcemod.tar.gz 9 | 10 | echo "Give compiler rights for compile" 11 | chmod +x addons/sourcemod/scripting/spcomp 12 | 13 | echo "Set plugins version" 14 | for file in addons/sourcemod/scripting/myjailshop.sp 15 | do 16 | sed -i "s//$BID/g" $file > output.txt 17 | rm output.txt 18 | done 19 | 20 | echo "Compile MyJailShop plugins" 21 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop.sp 22 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_door.sp 23 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_freeday.sp 24 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_hud.sp 25 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_blackout.sp 26 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_jetpack.sp 27 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_jihad.sp 28 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop-sm-store.sp 29 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_tacticalshield.sp 30 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_icegrenade.sp 31 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_parachute.sp 32 | -------------------------------------------------------------------------------- /addons/sourcemod/translations/de/MyJailShop.phrases.txt: -------------------------------------------------------------------------------- 1 | // Exported from SourceMod Translator 2 | // Date: 2018-08-20 21:17:56 UTC 3 | // Language: German (de) 4 | // 5 | // To view other translations for this plugin, please visit: 6 | // http://translator.mitchdempsey.com/sourcemod_plugins/268 7 | // 8 | "Phrases" 9 | { 10 | 11 | "shop_credits" 12 | { 13 | "de" "Du hast {1} ¢redits!" 14 | } 15 | 16 | "shop_credits" 17 | { 18 | "de" "Du hast {1} ¢redits!" 19 | } 20 | 21 | "shop_credits" 22 | { 23 | "de" "Du hast {1] ¢redits are: {1}!" 24 | } 25 | 26 | "shop_disabled" 27 | { 28 | "de" "Jail shop ist vorrübergehend {purple}ausgeschaltet{default}." 29 | } 30 | 31 | "shop_fulllive" 32 | { 33 | "de" "Du hast bereits volles Leben!" 34 | } 35 | 36 | "shop_get" 37 | { 38 | "de" "Du kannst dich nicht selbst beschenken." 39 | } 40 | 41 | "shop_health" 42 | { 43 | "de" "Du hast nun +{1}HP und Kevlar + Helm!" 44 | } 45 | 46 | "shop_invisible" 47 | { 48 | "de" "Du bist unsichtbar für {1} Sekunden!" 49 | } 50 | 51 | "shop_menu_awp" 52 | { 53 | "de" "AWP mit 1 Kugel [{1}¢]" 54 | } 55 | 56 | "shop_menu_deagle" 57 | { 58 | "de" "Deagle mit 1 Magazin [{1}¢]" 59 | } 60 | 61 | "shop_menu_gravity" 62 | { 63 | "de" "Geringe Schwerkraft [{1}¢]" 64 | } 65 | 66 | "shop_menu_health" 67 | { 68 | "de" "+{2}HP und Rüstung [{1}¢]" 69 | } 70 | 71 | "shop_menu_invisible" 72 | { 73 | "de" "Unsichtbar für {2} Sek. [{1}¢]" 74 | } 75 | 76 | "shop_menu_poisonsmoke" 77 | { 78 | "de" "Giftrauch [{1}¢]" 79 | } 80 | 81 | "shop_noclip" 82 | { 83 | "de" "Deine Kollisionsabfrage ist {1} Sekunden lang deaktiviert!" 84 | } 85 | 86 | "shop_noclipend" 87 | { 88 | "de" "Kollisionsabfrage wieder eingeschaltet!" 89 | } 90 | 91 | "shop_nodamage" 92 | { 93 | "de" "Du bist unsterblich für {1} Sekunden!" 94 | } 95 | 96 | "shop_revived" 97 | { 98 | "de" "{1} wurde wiederbelebt!" 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /addons/sourcemod/scripting/myjailshop-sm-store.sp: -------------------------------------------------------------------------------- 1 | /* 2 | * MyJailShop - Store by redwerewolf Support Plugin. 3 | * by: shanapu 4 | * https://github.com/shanapu/MyJailShop 5 | * 6 | * Copyright (C) 2016-2017 Thomas Schmidt (shanapu) 7 | * 8 | * This file is part of the MyJailShop SourceMod Plugin. 9 | * 10 | * This program is free software; you can redistribute it and/or modify it under 11 | * the terms of the GNU General Public License, version 3.0, as published by the 12 | * Free Software Foundation. 13 | * 14 | * This program is distributed in the hope that it will be useful, but WITHOUT 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 16 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 | * details. 18 | * 19 | * You should have received a copy of the GNU General Public License along with 20 | * this program. ifnot, see . 21 | */ 22 | 23 | /****************************************************************************** 24 | STARTUP 25 | ******************************************************************************/ 26 | 27 | // Includes 28 | #include 29 | #include 30 | #include 31 | 32 | // Compiler Options 33 | #pragma semicolon 1 34 | #pragma newdecls required 35 | 36 | // Info 37 | public Plugin myinfo = 38 | { 39 | name = "MyJailShop - Use Credits from SM Store", 40 | author = "shanapu", 41 | description = "Add Support for Credits from SM Store", 42 | version = "1.0", 43 | url = "https://github.com/shanapu/MyJailShop" 44 | }; 45 | 46 | /****************************************************************************** 47 | FORWARDS LISTEN 48 | ******************************************************************************/ 49 | 50 | public int MyJailShop_OnGetCredits(int client) 51 | { 52 | int accountId = Store_GetClientAccountID(client); 53 | int credits = Store_GetCreditsEx(accountId); 54 | 55 | return credits; 56 | } 57 | 58 | public void MyJailShop_OnSetCredits(int client, int credits) 59 | { 60 | int accountId = Store_GetClientAccountID(client); 61 | int oldCredits = Store_GetCreditsEx(accountId); 62 | 63 | Store_GiveCredits(accountId, (oldCredits-credits)); 64 | } -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/tacticalshield.inc: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Tactical Shield. 3 | * Copyright (C) 2017 Keplyx 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #if defined _tacticalshield_included 20 | #endinput 21 | #endif 22 | 23 | #define _tacticalshield_included 24 | 25 | public SharedPlugin __pl_tacticalshield = 26 | { 27 | name = "tacticalshield", 28 | file = "tacticalshield.smx", 29 | #if defined REQUIRE_PLUGIN 30 | required = 1, 31 | #else 32 | required = 0, 33 | #endif 34 | }; 35 | 36 | 37 | #if !defined REQUIRE_PLUGIN 38 | public void __pl_tacticalshield_SetNTVOptional() 39 | { 40 | MarkNativeAsOptional("GivePlayerShield"); 41 | MarkNativeAsOptional("OverridePlayerShield"); 42 | MarkNativeAsOptional("RemovePlayerShield"); 43 | } 44 | #endif 45 | 46 | /** 47 | * Give the specified player a shield, if he can have one. 48 | * It is the same as the command ts_buy but without using money. 49 | * 50 | * @param client Client index. 51 | * @return 52 | * @error Invalid client. 53 | */ 54 | native void GivePlayerShield(int client); 55 | 56 | /** 57 | * Override shield status for the specified player. 58 | * 59 | * @param client Client index. 60 | * @param override Override parameter: 0= no override, 1= force no shields, 2= force shields. 61 | * @return 62 | * @error Invalid client. 63 | */ 64 | native void OverridePlayerShield(int client, int override); 65 | 66 | /** 67 | * Remove the shield for the specified player. 68 | * 69 | * @param client Client index. 70 | * @return 71 | * @error Invalid client. 72 | */ 73 | native void RemovePlayerShield(int client); -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/smartjaildoors.inc: -------------------------------------------------------------------------------- 1 | // © Maxim "Kailo" Telezhenko, 2015 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation, either version 3 of the License, or 6 | // (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with this program. If not, see 15 | 16 | #if defined _smartjaildoors_included_ 17 | #endinput 18 | #endif 19 | #define _smartjaildoors_included_ 20 | 21 | /** 22 | * Open jail's doors on current map saved in Smart Jail Doors config. 23 | * 24 | * @noreturn 25 | */ 26 | native void SJD_OpenDoors(); 27 | 28 | /** 29 | * Close jail's doors on current map saved in Smart Jail Doors config. 30 | * 31 | * @noreturn 32 | */ 33 | native void SJD_CloseDoors(); 34 | 35 | /** 36 | * Toggle jail's doors on current map saved in Smart Jail Doors config. 37 | * If door can't be toggled - nothing. 38 | * 39 | * @noreturn 40 | */ 41 | native void SJD_ToggleDoors(); 42 | 43 | /** 44 | * Toggle jail's doors on current map saved in Smart Jail Doors config. 45 | * If door can't be toggled - open. 46 | * 47 | * @noreturn 48 | */ 49 | native void SJD_ToggleExDoors(); 50 | 51 | /** 52 | * Check if exist doors config for said map. 53 | * 54 | * @param mapName String with map name for check. 55 | * @return 56 | */ 57 | native bool SJD_IsMapConfigured(const char[] mapName); 58 | 59 | /** 60 | * Check if exist doors config for current map. 61 | */ 62 | stock bool SJD_IsCurrentMapConfigured() 63 | { 64 | char mapName[64]; 65 | GetCurrentMap(mapName, sizeof(mapName)); 66 | 67 | return SJD_IsMapConfigured(mapName); 68 | } 69 | 70 | public SharedPlugin:__pl_smartjaildoors = 71 | { 72 | name = "smartjaildoors", 73 | file = "smartjaildoors.smx", 74 | #if defined REQUIRE_PLUGIN 75 | required = 1, 76 | #else 77 | required = 0, 78 | #endif 79 | }; 80 | 81 | #if !defined REQUIRE_PLUGIN 82 | public __pl_smartjaildoors_SetNTVOptional() 83 | { 84 | MarkNativeAsOptional("SJD_OpenDoors"); 85 | MarkNativeAsOptional("SJD_CloseDoors"); 86 | MarkNativeAsOptional("SJD_ToggleDoors"); 87 | MarkNativeAsOptional("SJD_IsMapConfigured"); 88 | } 89 | #endif -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/store.inc: -------------------------------------------------------------------------------- 1 | #if defined _store_included 2 | #endinput 3 | #endif 4 | #define _store_included 5 | 6 | // new g_cvarChatTag = -1; 7 | #define CHAT_TAG g_eCvars[g_cvarChatTag][sCache] 8 | 9 | #define ITEM_NAME_LENGTH 64 10 | #define STORE_MAX_ITEMS 2048 11 | #define STORE_MAX_HANDLERS 64 12 | #define STORE_MAX_PLANS 8 13 | #define STORE_MAX_SLOTS 4 14 | 15 | enum Item_Plan 16 | { 17 | String:szName[ITEM_NAME_LENGTH], 18 | iPrice, 19 | iTime 20 | } 21 | 22 | enum Store_Item 23 | { 24 | String:szName[ITEM_NAME_LENGTH], 25 | String:szUniqueId[PLATFORM_MAX_PATH], 26 | String:szShortcut[64], 27 | iId, 28 | iPrice, 29 | iParent, 30 | iHandler, 31 | iFlagBits, 32 | iData, 33 | iPlans, 34 | bool:bBuyable, 35 | bool:bIgnoreVIP, 36 | Handle:hAttributes 37 | } 38 | 39 | enum Type_Handler 40 | { 41 | String:szType[64], 42 | String:szUniqueKey[32], 43 | bool:bEquipable, 44 | bool:bRaw, 45 | Handle:hPlugin, 46 | Function:fnMapStart, 47 | Function:fnReset, 48 | Function:fnConfig, 49 | Function:fnUse, 50 | Function:fnRemove 51 | } 52 | 53 | enum Client_Item 54 | { 55 | iId, 56 | iUniqueId, 57 | bool:bSynced, 58 | bool:bDeleted, 59 | iDateOfPurchase, 60 | iDateOfExpiration, 61 | iPriceOfPurchase, 62 | } 63 | 64 | native Store_RegisterHandler(String:type[], String:uniquekey[], Function:mapstart, Function:reset, Function:config, Function:use, Function:remove, bool:equipable = true, bool:raw = false); 65 | native Store_RegisterMenuHandler(String:identifier[], Function:menu, Function:handler); 66 | native Store_SetDataIndex(itemid, index); 67 | native Store_GetDataIndex(itemid); 68 | native Store_GetEquippedItem(client, String:type[], slot=0); 69 | native Store_IsClientLoaded(client); 70 | native Store_DisplayPreviousMenu(client); 71 | native Store_SetClientMenu(client, num); 72 | native Store_GetClientCredits(client); 73 | native Store_SetClientCredits(client, credits); 74 | native Store_IsClientVIP(client); 75 | native Store_IsItemInBoughtPackage(client, itemid, uid=-1); 76 | native Store_ShouldConfirm(); 77 | native Store_DisplayConfirmMenu(client, String:title[], Function:callback, data); 78 | native Store_GetItem(itemid, output[Store_Item]); 79 | native Store_GetHandler(index, output[Type_Handler]); 80 | native Store_GiveItem_Z(client, itemid, purchase=0, expiration=0, price=0); 81 | native Store_RemoveItem(client, itemid); 82 | native Store_GetClientItem(client, itemid, output[Client_Item]); 83 | native Store_GetClientTarget(client); 84 | native Store_GiveClientItem(client, recipient, itemid); 85 | native Store_HasClientItem(client, itemid); 86 | native Store_IterateEquippedItems(client, &start, bool:attributes=false); 87 | 88 | forward Store_OnClientModelChanged(client, String:model[]); 89 | 90 | public Extension:__ext_store_sm = 91 | { 92 | name = "Store - The Resurrection", 93 | file = "store_sm.ext", 94 | #if defined AUTOLOAD_EXTENSIONS 95 | autoload = 1, 96 | #else 97 | autoload = 0, 98 | #endif 99 | required = 0, 100 | }; -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/CustomPlayerSkins.inc: -------------------------------------------------------------------------------- 1 | //Custom Player Skins include file 2 | 3 | #if defined _CustomPlayerSkins_included 4 | #endinput 5 | #endif 6 | #define _CustomPlayerSkins_included 7 | 8 | #define CPS_NOFLAGS 0 9 | #define CPS_RENDER (1 << 0) //Does not make the model invisible. (useful for glows) (used on RemoveSkin it will not force the player's render back to Normal.) 10 | #define CPS_NOATTACHMENT (1 << 1) //Does not 'SetParentAttachment' variant. (Useful for non-bone merging) 11 | #define CPS_IGNOREDEATH (1 << 2) //This will prevent the removal of the skin on death. 12 | 13 | /** 14 | * Sets the client's skin from the given path. 15 | * 16 | * @param client Client index 17 | * @param model User input for model path 18 | * @param flags flags are used to determine what this function does and does not do. 19 | * @noreturn 20 | * @error Invalid client. 21 | */ 22 | native CPS_SetSkin(client, String:model[], flags); 23 | 24 | /** 25 | * Gets the client's skin entity reference. 26 | * 27 | * @param client Client index 28 | * @return Returns the entity reference of the player's skin, INVALID_ENT_REFERENCE if there is no skin. 29 | * @error Invalid client. 30 | */ 31 | native CPS_GetSkin(client); 32 | 33 | /** 34 | * Simple check if the client already has a skin. 35 | * 36 | * @param client Client index 37 | * @return Returns if the client has a skin currently. (will not check if the player is alive, etc.) 38 | * @error Invalid client. 39 | */ 40 | native bool:CPS_HasSkin(client); 41 | 42 | /** 43 | * Removes and resets the player and their skin. 44 | * 45 | * @param client Client index 46 | * @noreturn 47 | * @error Invalid client. 48 | */ 49 | native CPS_RemoveSkin(client, flags = CPS_NOFLAGS); 50 | 51 | 52 | /** 53 | * Sets the client's transmit variable (see below) 54 | * NOTE: Check if the player is between 0 and MAXPLAYERS. 55 | * 56 | * @param owner Client index of the skin's owner 57 | * @param client Client index of the player that will see the skin. 58 | * @param transmit 0 - Do not transmit at all. 59 | 1 - Transmit only if other cases pass. 60 | 2 - Override other checks. 61 | * @noreturn 62 | * @error Invalid client. 63 | */ 64 | native CPS_SetTransmit(owner, client, transmit); 65 | 66 | 67 | /** 68 | * Simple native to return the skin's flags 69 | * NOTE: Check if the player is between 0 and MAXPLAYERS. 70 | * 71 | * @param client Client index 72 | * @return Returns the client index's skin flags. 73 | */ 74 | native CPS_GetFlags(client); 75 | 76 | public SharedPlugin:__pl_CustomPlayerSkins = 77 | { 78 | name = "CustomPlayerSkins", 79 | file = "CustomPlayerSkins.smx", 80 | #if defined REQUIRE_PLUGIN 81 | required = 1, 82 | #else 83 | required = 0, 84 | #endif 85 | }; 86 | 87 | #if !defined REQUIRE_PLUGIN 88 | public __pl_CustomPlayerSkins_SetNTVOptional() 89 | { 90 | MarkNativeAsOptional("CPS_SetSkin"); 91 | MarkNativeAsOptional("CPS_GetSkin"); 92 | MarkNativeAsOptional("CPS_HasSkin"); 93 | MarkNativeAsOptional("CPS_RemoveSkin"); 94 | MarkNativeAsOptional("CPS_SetTransmit"); 95 | MarkNativeAsOptional("CPS_GetFlags"); 96 | } 97 | #endif 98 | -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/store/store-inventory.inc: -------------------------------------------------------------------------------- 1 | #if defined _store_inventory_included 2 | #endinput 3 | #endif 4 | #define _store_inventory_included 5 | 6 | //Globals 7 | enum Store_ItemUseAction 8 | { 9 | Store_EquipItem, 10 | Store_UnequipItem, 11 | Store_DeleteItem, 12 | Store_DoNothing 13 | } 14 | 15 | //Prototypes 16 | typedef Store_ItemUseCallback = function Store_ItemUseAction(int client, int itemId, bool equipped); 17 | 18 | /** 19 | * Opens the inventory menu for a client. 20 | * 21 | * @param client Client index. 22 | * 23 | * @noreturn 24 | */ 25 | native void Store_OpenInventory(int client); 26 | 27 | /** 28 | * Opens the inventory menu for a client in a specific category. 29 | * 30 | * @param client Client index. 31 | * @param categoryId The category that you want to open. 32 | * 33 | * @noreturn 34 | */ 35 | native void Store_OpenInventoryCategory(int client, int categoryId); 36 | 37 | /** 38 | * Registers an item type. 39 | * 40 | * A type of an item defines its behaviour. Once you register a type, 41 | * the store will provide two callbacks for you: 42 | * - Use callback: called when a player selects your item in his inventory. 43 | * - Attributes callback: called when the store loads the attributes of your item (optional). 44 | * 45 | * It is recommended that each plugin registers *one* item type. 46 | * 47 | * @param type Item type unique identifer - maximum 32 characters, no whitespaces, lower case only. 48 | * @param useCallback Called when a player selects your item in his inventory. 49 | * @param attrsCallback Called when the store loads the attributes of your item. 50 | * 51 | * @noreturn 52 | */ 53 | native void Store_RegisterItemType(const char[] type, Store_ItemUseCallback useCallback, Store_ItemGetAttributesCallback attrsCallback = INVALID_FUNCTION); 54 | 55 | /** 56 | * Determines whether or not a specific item type string is registered. 57 | * 58 | * @param type Item type unique identifer. 59 | * 60 | * @return True if registered, false otherwise. 61 | */ 62 | native bool Store_IsItemTypeRegistered(const char[] type); 63 | 64 | /** 65 | * Calls item type's attributes callback. 66 | * 67 | * This method is designed for store-database, that loads attributes from the database. 68 | * It shouldn't be used anywhere else. 69 | * 70 | * @param type Item type unique identifer. 71 | * @param itemName 72 | * @param attrs 73 | * 74 | * @return True if successful, false otherwise. 75 | */ 76 | native bool Store_CallItemAttrsCallback(const char[] type, const char[] itemName, const char[] attrs); 77 | 78 | public SharedPlugin __pl_store_inventory = 79 | { 80 | name = "store-inventory", 81 | file = "store-inventory.smx", 82 | #if defined REQUIRE_PLUGIN 83 | required = 1, 84 | #else 85 | required = 0, 86 | #endif 87 | }; 88 | 89 | #if defined REQUIRE_PLUGIN 90 | public __pl_store_inventory_SetNTVOptional() 91 | { 92 | MarkNativeAsOptional("Store_OpenInventory"); 93 | MarkNativeAsOptional("Store_OpenInventoryCategory"); 94 | 95 | MarkNativeAsOptional("Store_RegisterItemType"); 96 | MarkNativeAsOptional("Store_IsItemTypeRegistered"); 97 | 98 | MarkNativeAsOptional("Store_CallItemAttrsCallback"); 99 | } 100 | #endif -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/store/store-stocks.inc: -------------------------------------------------------------------------------- 1 | #if defined _store_stocks_included 2 | #endinput 3 | #endif 4 | #define _store_stocks_included 5 | 6 | ////////////////////////////////////////////// 7 | //General Stocks for the Store system to use. Some are from SMLib, some are from other places. 8 | 9 | #define SIZE_OF_INT 2147483647 // without 0 10 | 11 | //From SMLib 12 | stock int String_GetRandom(char[] buffer, int size, int length = 32, const char[] chrs = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234556789") 13 | { 14 | int random; int len; 15 | size--; 16 | 17 | if (chrs[0] != '\0') 18 | { 19 | len = strlen(chrs) - 1; 20 | } 21 | 22 | int n = 0; 23 | while (n < length && n < size) 24 | { 25 | if (chrs[0] == '\0') 26 | { 27 | random = Math_GetRandomInt(33, 126); 28 | buffer[n] = random; 29 | } 30 | else 31 | { 32 | random = Math_GetRandomInt(0, len); 33 | buffer[n] = chrs[random]; 34 | } 35 | 36 | n++; 37 | } 38 | 39 | buffer[length] = '\0'; 40 | } 41 | 42 | //From SMLib 43 | stock Math_GetRandomInt(min, max) 44 | { 45 | new random = GetURandomInt(); 46 | 47 | if (random == 0) { 48 | random++; 49 | } 50 | 51 | return RoundToCeil(float(random) / (float(SIZE_OF_INT) / float(max - min + 1))) + min - 1; 52 | } 53 | 54 | //My own Invention (Drixevel) (Designed for handles) 55 | stock bool ClearArray2(Handle hGlobalArray) 56 | { 57 | if (hGlobalArray != null) 58 | { 59 | for (int i = 0; i < GetArraySize(hGlobalArray); i++) 60 | { 61 | Handle hArray = GetArrayCell(hGlobalArray, i); 62 | 63 | if (hArray != null) 64 | { 65 | CloseHandle(hArray); 66 | hArray = null; 67 | } 68 | } 69 | 70 | ClearArray(hGlobalArray); 71 | 72 | return true; 73 | } 74 | 75 | return false; 76 | } 77 | 78 | //Debug Stock... Don't ask why. 79 | stock void GenerateDebugPrint(const char[] sFunc = "N/A") 80 | { 81 | char sName[64]; 82 | GetPluginFilename(INVALID_HANDLE, sName, sizeof(sName)); 83 | PrintToServer("Name: %s - Function Call: %s", sName, sFunc); 84 | } 85 | 86 | //Because Useful (Kappas all around to KissLick) 87 | stock void PushMenuCell(Handle hndl, const char[] id, int data) 88 | { 89 | char DataString[64]; 90 | IntToString(data, DataString, sizeof(DataString)); 91 | AddMenuItem(hndl, id, DataString, ITEMDRAW_IGNORE); 92 | } 93 | 94 | stock int GetMenuCell(Handle hndl, const char[] id, int DefaultValue = 0) 95 | { 96 | int ItemCount = GetMenuItemCount(hndl); 97 | char info[64]; char data[64]; 98 | 99 | for (int i = 0; i < ItemCount; i++) 100 | { 101 | GetMenuItem(hndl, i, info, sizeof(info), _, data, sizeof(data)); 102 | 103 | if (StrEqual(info, id)) 104 | { 105 | return StringToInt(data); 106 | } 107 | } 108 | 109 | return DefaultValue; 110 | } 111 | 112 | stock bool AddMenuItemFormat(Handle &menu, const char[] info, int style = ITEMDRAW_DEFAULT, const char[] format, any...) 113 | { 114 | char display[128]; 115 | VFormat(display, sizeof(display), format, 5); 116 | 117 | return AddMenuItem(menu, info, display, style); 118 | } 119 | 120 | stock void PushMenuString(Handle hndl, const char[] id, const char[] data) 121 | { 122 | AddMenuItem(hndl, id, data, ITEMDRAW_IGNORE); 123 | } 124 | 125 | stock bool GetMenuString(Handle hndl, const char[] id, char[] Buffer, int size) 126 | { 127 | int ItemCount = GetMenuItemCount(hndl); 128 | char info[64]; char data[64]; 129 | 130 | for (int i = 0; i < ItemCount; i++) 131 | { 132 | GetMenuItem(hndl, i, info, sizeof(info), _, data, sizeof(data)); 133 | 134 | if (StrEqual(info, id)) 135 | { 136 | strcopy(Buffer, size, data); 137 | return true; 138 | } 139 | } 140 | 141 | return false; 142 | } -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/hosties.inc: -------------------------------------------------------------------------------- 1 | /* 2 | * SourceMod Hosties Project 3 | * by: databomb & dataviruset 4 | * 5 | * This file is part of the SM Hosties project. 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | // Double include protection 21 | #if defined _Hosties_Included_ 22 | #endinput 23 | #endif 24 | #define _Hosties_Included_ 25 | 26 | // Change to include your own clan tag but leave the '%t' intact 27 | #define CHAT_BANNER "\x03[SM] \x04%t" 28 | #define NORMAL_VISION 90 29 | 30 | enum GameType 31 | { 32 | Game_Unknown = -1, 33 | Game_CSS, 34 | Game_CSGO 35 | }; 36 | 37 | enum FreekillPunishment 38 | { 39 | FP_Slay = 0, 40 | FP_Kick, 41 | FP_Ban 42 | }; 43 | 44 | enum MediaType 45 | { 46 | type_Generic = 0, 47 | type_Sound, 48 | type_Material, 49 | type_Model, 50 | type_Decal 51 | }; 52 | 53 | stock ShowOverlayToClient(client, const String:overlaypath[]) 54 | { 55 | ClientCommand(client, "r_screenoverlay \"%s\"", overlaypath); 56 | } 57 | 58 | stock ShowOverlayToAll(const String:overlaypath[]) 59 | { 60 | // x = client index. 61 | for (new x = 1; x <= MaxClients; x++) 62 | { 63 | // If client isn't in-game, then stop. 64 | if (IsClientInGame(x) && !IsFakeClient(x)) 65 | { 66 | ShowOverlayToClient(x, overlaypath); 67 | } 68 | } 69 | } 70 | 71 | stock StripAllWeapons(client) 72 | { 73 | new wepIdx; 74 | for (new i; i < 4; i++) 75 | { 76 | if ((wepIdx = GetPlayerWeaponSlot(client, i)) != -1) 77 | { 78 | RemovePlayerItem(client, wepIdx); 79 | AcceptEntityInput(wepIdx, "Kill"); 80 | } 81 | } 82 | } 83 | 84 | stock BlockEntity(client, cachedOffset) 85 | { 86 | SetEntData(client, cachedOffset, 5, 4, true); 87 | } 88 | 89 | stock UnblockEntity(client, cachedOffset) 90 | { 91 | SetEntData(client, cachedOffset, 2, 4, true); 92 | } 93 | 94 | stock BlockClientAll() 95 | { 96 | for (new i = 1; i <= MaxClients; i++) 97 | { 98 | if ( IsClientInGame(i) && IsPlayerAlive(i) ) 99 | { 100 | BlockEntity(i); 101 | } 102 | } 103 | } 104 | 105 | stock UnblockClientAll() 106 | { 107 | for (new i = 1; i <= MaxClients; i++) 108 | { 109 | if ( IsClientInGame(i) && IsPlayerAlive(i) ) 110 | { 111 | UnblockEntity(i); 112 | } 113 | } 114 | } 115 | 116 | stock MutePlayer(client) 117 | { 118 | SetClientListeningFlags(client, VOICE_MUTED); 119 | } 120 | 121 | stock UnmutePlayer(client) 122 | { 123 | SetClientListeningFlags(client, VOICE_NORMAL); 124 | } 125 | 126 | stock CacheTheFile(const String:path[], MediaType:filetype) 127 | { 128 | decl String:sDownloadPath[PLATFORM_MAX_PATH]; 129 | switch (filetype) 130 | { 131 | case type_Sound: 132 | { 133 | PrecacheSoundAny(path, true); 134 | Format(sDownloadPath, PLATFORM_MAX_PATH, "sound/%s", path); 135 | AddFileToDownloadsTable(sDownloadPath); 136 | } 137 | case type_Decal, type_Material: 138 | { 139 | PrecacheDecal(path, true); 140 | Format(sDownloadPath, PLATFORM_MAX_PATH, "materials/%s", path); 141 | AddFileToDownloadsTable(sDownloadPath); 142 | } 143 | case type_Model: 144 | { 145 | PrecacheModel(path, true); 146 | Format(sDownloadPath, PLATFORM_MAX_PATH, "models/%s", path); 147 | AddFileToDownloadsTable(sDownloadPath); 148 | } 149 | default: 150 | { 151 | PrecacheGeneric(path, true); 152 | AddFileToDownloadsTable(path); 153 | } 154 | } 155 | } -------------------------------------------------------------------------------- /ci/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ev 3 | 4 | BID=$6 5 | FILE=MyJS-$2-$BID.zip 6 | HOST=$3 7 | USER=$4 8 | PASS=$5 9 | 10 | 11 | echo "Download und extract sourcemod" 12 | wget -q "http://www.sourcemod.net/latest.php?version=$1&os=linux" -O sourcemod.tar.gz 13 | # wget "http://www.sourcemod.net/latest.php?version=$1&os=linux" -O sourcemod.tar.gz 14 | tar -xzf sourcemod.tar.gz 15 | 16 | echo "Give compiler rights for compile" 17 | chmod +x addons/sourcemod/scripting/spcomp 18 | 19 | echo "Set plugins version" 20 | for file in addons/sourcemod/scripting/myjailshop.sp 21 | do 22 | sed -i "s//$BID/g" $file > output.txt 23 | rm output.txt 24 | done 25 | 26 | 27 | echo "Compile MyJailShop plugins" 28 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop.sp 29 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_door.sp 30 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_freeday.sp 31 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_hud.sp 32 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_blackout.sp 33 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_jetpack.sp 34 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_jihad.sp 35 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop-sm-store.sp 36 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_tacticalshield.sp 37 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_icegrenade.sp 38 | addons/sourcemod/scripting/spcomp -E -v0 addons/sourcemod/scripting/myjailshop_parachute.sp 39 | 40 | 41 | 42 | echo "Remove plugins folder if exists" 43 | if [ -d "addons/sourcemod/plugins" ]; then 44 | rm -r addons/sourcemod/plugins 45 | fi 46 | 47 | echo "Create clean plugins folder" 48 | mkdir addons/sourcemod/plugins 49 | mkdir addons/sourcemod/plugins/disabled 50 | 51 | echo "Move all binary files to plugins folder" 52 | for file in *.smx 53 | do 54 | mv $file addons/sourcemod/plugins 55 | done 56 | 57 | echo "Move all optional binary files to plugins disabled folder" 58 | mv addons/sourcemod/plugins/myjailshop-sm-store.smx addons/sourcemod/plugins/disabled 59 | mv addons/sourcemod/plugins/myjailshop_tacticalshield.smx addons/sourcemod/plugins/disabled 60 | 61 | echo "Remove build folder if exists" 62 | if [ -d "build" ]; then 63 | rm -r build 64 | fi 65 | 66 | echo "Create clean build & sub folder" 67 | mkdir build 68 | 69 | echo "Move addons, cfg sound & fastdl folder" 70 | mv addons cfg sound fastDL build 71 | 72 | echo "Move license to build" 73 | mv install.txt license.txt CHANGELOG.md build/ 74 | 75 | echo "Remove sourcemod folders" 76 | rm -r build/addons/metamod 77 | rm -r build/addons/sourcemod/bin 78 | rm -r build/addons/sourcemod/configs 79 | rm -r build/addons/sourcemod/data 80 | rm -r build/addons/sourcemod/extensions 81 | rm -r build/addons/sourcemod/gamedata 82 | rm -r build/addons/sourcemod/scripting 83 | rm -r build/addons/sourcemod/translations 84 | rm -r build/cfg/sourcemod 85 | rm build/addons/sourcemod/*.txt 86 | 87 | echo "Remove placeholder files" 88 | rm -r build/addons/sourcemod/logs/MyJailShop/.gitkeep 89 | rm -r build/cfg/MyJailShop/.gitkeep 90 | 91 | echo "Download source and move to folder" 92 | git clone --depth=50 --branch=$2 https://github.com/shanapu/MyJailShop.git source/MyJailShop 93 | mv source/MyJailShop/addons/sourcemod/scripting build/addons/sourcemod 94 | 95 | echo "Create clean translation folder" 96 | mkdir build/addons/sourcemod/translations 97 | 98 | echo "Download und unzip translations files" 99 | wget -q -O translations.zip http://translator.mitchdempsey.com/sourcemod_plugins/268/download/MyJailShop.translations.zip 100 | unzip -qo translations.zip -d build/ 101 | 102 | echo "Clean root folder" 103 | rm sourcemod.tar.gz 104 | rm translations.zip 105 | 106 | echo "Go to build folder" 107 | cd build 108 | 109 | echo "Compress directories and files" 110 | zip -9rq $FILE addons fastDL cfg sound install.txt license.txt downloads.txt CHANGELOG.md 111 | 112 | echo "Upload file" 113 | lftp -c "set ftp:ssl-allow no; set ssl:verify-certificate no; open -u $USER,$PASS $HOST; put -O MyJailShop/downloads/SM$1/$2/ $FILE" 114 | 115 | echo "Build done" 116 | -------------------------------------------------------------------------------- /addons/sourcemod/scripting/myjailshop_hud.sp: -------------------------------------------------------------------------------- 1 | /* 2 | * MyJailShop - Credits HUD Plugin. 3 | * by: shanapu 4 | * https://github.com/shanapu/MyJailShop/ 5 | * 6 | * Copyright (C) 2016-2018 Thomas Schmidt (shanapu) 7 | * 8 | * This file is part of the MyJailShop SourceMod Plugin. 9 | * 10 | * This program is free software; you can redistribute it and/or modify it under 11 | * the terms of the GNU General Public License, version 3.0, as published by the 12 | * Free Software Foundation. 13 | * 14 | * This program is distributed in the hope that it will be useful, but WITHOUT 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 16 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 | * details. 18 | * 19 | * You should have received a copy of the GNU General Public License along with 20 | * this program. If not, see . 21 | */ 22 | 23 | /****************************************************************************** 24 | STARTUP 25 | ******************************************************************************/ 26 | 27 | // Includes 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | // Compiler Options 34 | #pragma semicolon 1 35 | #pragma newdecls required 36 | 37 | // Console Variables 38 | ConVar gc_bPlugin; 39 | ConVar gc_bAlive; 40 | ConVar gc_iRed; 41 | ConVar gc_iBlue; 42 | ConVar gc_iGreen; 43 | ConVar gc_iAlpha; 44 | ConVar gc_fX; 45 | ConVar gc_fY; 46 | 47 | // Handle 48 | Handle g_hHUD; 49 | 50 | // Info 51 | public Plugin myinfo = 52 | { 53 | name = "MyJailShop - Credits HUD", 54 | description = "A player HUD to display credits", 55 | author = "shanapu", 56 | version = "1.0", 57 | url = "https://github.com/shanapu/MyJailShop" 58 | } 59 | 60 | // Start 61 | public void OnPluginStart() 62 | { 63 | // AutoExecConfig 64 | AutoExecConfig_SetFile("Settings", "MyJailShop"); 65 | AutoExecConfig_SetCreateFile(true); 66 | 67 | gc_bPlugin = AutoExecConfig_CreateConVar("sm_jailshop_hud_enable", "1", "0 - disabled, 1 - enable this MyJailShop Module", _, true, 0.0, true, 1.0); 68 | gc_bAlive = AutoExecConfig_CreateConVar("sm_jailshop_hud_alive", "1", "0 - show hud only to alive player, 1 - show hud to dead & alive player", _, true, 0.0, true, 1.0); 69 | gc_fX = AutoExecConfig_CreateConVar("sm_jailshop_hud_x", "0.05", "x coordinate, from 0 to 1. -1.0 is the center", _, true, -1.0, true, 1.0); 70 | gc_fY = AutoExecConfig_CreateConVar("sm_jailshop_hud_y", "0.65", "y coordinate, from 0 to 1. -1.0 is the center", _, true, -1.0, true, 1.0); 71 | gc_iRed = AutoExecConfig_CreateConVar("sm_jailshop_hud_red", "200", "Color of sm_hud_type '1' (set R, G and B values to 255 to disable) (Rgb): x - red value", _, true, 0.0, true, 255.0); 72 | gc_iGreen = AutoExecConfig_CreateConVar("sm_jailshop_hud_green", "200", "Color of sm_hud_type '1' (set R, G and B values to 255 to disable) (rGb): x - green value", _, true, 0.0, true, 255.0); 73 | gc_iBlue = AutoExecConfig_CreateConVar("sm_jailshop_hud_blue", "0", "Color of sm_hud_type '1' (set R, G and B values to 255 to disable) (rgB): x - blue value", _, true, 0.0, true, 255.0); 74 | gc_iAlpha = AutoExecConfig_CreateConVar("sm_jailshop_hud_alpha", "200", "Alpha value of sm_hud_type '1' (set value to 255 to disable for transparency)", _, true, 0.0, true, 255.0); 75 | 76 | AutoExecConfig_ExecuteFile(); 77 | AutoExecConfig_CleanFile(); 78 | 79 | g_hHUD = CreateHudSynchronizer(); 80 | } 81 | 82 | // Prepare Plugin & modules 83 | public void OnMapStart() 84 | { 85 | if (gc_bPlugin.BoolValue) 86 | { 87 | CreateTimer(1.0, Timer_ShowHUD, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE); 88 | } 89 | 90 | } 91 | 92 | /****************************************************************************** 93 | TIMER 94 | ******************************************************************************/ 95 | 96 | public Action Timer_ShowHUD(Handle timer, Handle pack) 97 | { 98 | if (!gc_bPlugin.BoolValue) 99 | return Plugin_Handled; 100 | 101 | for (int i = 1; i <= MaxClients; i++) 102 | { 103 | if (!IsValidClient(i, false, gc_bAlive.BoolValue)) 104 | continue; 105 | 106 | ClearSyncHud(i, g_hHUD); 107 | SetHudTextParams(gc_fX.FloatValue, gc_fY.FloatValue, 5.0, gc_iRed.IntValue, gc_iGreen.IntValue, gc_iBlue.IntValue, gc_iAlpha.IntValue, 1, 1.0, 0.0, 0.0); 108 | 109 | ShowSyncHudText(i, g_hHUD, "Credits: %i¢", MyJailShop_GetCredits(i)); 110 | } 111 | 112 | return Plugin_Continue; 113 | } -------------------------------------------------------------------------------- /addons/sourcemod/translations/ko/MyJailShop.phrases.txt: -------------------------------------------------------------------------------- 1 | // Exported from SourceMod Translator 2 | // Date: 2018-08-20 21:17:57 UTC 3 | // Language: Korean (ko) 4 | // 5 | // To view other translations for this plugin, please visit: 6 | // http://translator.mitchdempsey.com/sourcemod_plugins/268 7 | // 8 | "Phrases" 9 | { 10 | 11 | "shop_alive" 12 | { 13 | "ko" "살아있을때에만 아이템들을 구매할 수 있습니다." 14 | } 15 | 16 | "shop_alreadyopen" 17 | { 18 | "ko" "감옥 문이 이미 열렸습니다." 19 | } 20 | 21 | "shop_awp" 22 | { 23 | "ko" "구매하였습니다. : AWP는 한발이면 충분하지!" 24 | } 25 | 26 | "shop_bhop" 27 | { 28 | "ko" "이제 당신은 버니합을 할 수 있습니다. 즐기세요!" 29 | } 30 | 31 | "shop_bird" 32 | { 33 | "ko" "당신은 새가 되었습니다. +dropweapon (기본G키) 로 날 수 있습니다." 34 | } 35 | 36 | "shop_buytime" 37 | { 38 | "ko" "구입 시간이 지났습니다. 다음 라운드부터 다시 구입을 할 수 있습니다." 39 | } 40 | 41 | "shop_costs" 42 | { 43 | "ko" "가격 : {2} 크레딧. 이제 당신은 {1} 크레딧 입니다." 44 | } 45 | 46 | "shop_credits" 47 | { 48 | "ko" "당신의 현재 크레딧 : {1}!" 49 | } 50 | 51 | "shop_dead" 52 | { 53 | "ko" "이 아이템을 사용하려면 죽어있는 상태이어야 합니다." 54 | } 55 | 56 | "shop_fulllive" 57 | { 58 | "ko" "당신은 이미 체력이 가득 찼습니다!" 59 | } 60 | 61 | "shop_get" 62 | { 63 | "ko" "당신은 당신 스스로에게 선물할 수 없습니다." 64 | } 65 | 66 | "shop_heal" 67 | { 68 | "ko" "당신은 치료되었습니다." 69 | } 70 | 71 | "shop_health" 72 | { 73 | "ko" "당신은 이제 +{1}HP 와 방탄복 및 헬멧을 가졌습니다." 74 | } 75 | 76 | "shop_invisible" 77 | { 78 | "ko" "당신은 {1} 초 동안 보이지 않습니다." 79 | } 80 | 81 | "shop_lastrequest" 82 | { 83 | "ko" "Last Request 로 당신은 {2} 크레딧을 얻었습니다. 당신의 크레딧 : {1}¢" 84 | } 85 | 86 | "shop_menu_armor" 87 | { 88 | "ko" "방어구 [{1}¢]" 89 | } 90 | 91 | "shop_menu_awp" 92 | { 93 | "ko" "AWP (한발) [{1}¢]" 94 | } 95 | 96 | "shop_menu_bhop" 97 | { 98 | "ko" "버니합 [{1}¢]" 99 | } 100 | 101 | "shop_menu_bird" 102 | { 103 | "ko" "새가 되려면 [{1}¢]" 104 | } 105 | 106 | "shop_menu_deagle" 107 | { 108 | "ko" "데저트 이글 (7발) [{1}¢]" 109 | } 110 | 111 | "shop_menu_froggyjump" 112 | { 113 | "ko" "개구리 점프 [{1}¢]" 114 | } 115 | 116 | "shop_menu_gravity" 117 | { 118 | "ko" "낮은 중력 [{1}]" 119 | } 120 | 121 | "shop_menu_health" 122 | { 123 | "ko" "+{2}HP 와 방어구 [{1}¢]" 124 | } 125 | 126 | "shop_menu_invisible" 127 | { 128 | "ko" "{2} 초 동안 보이지 않습니다.. [{1}¢]" 129 | } 130 | 131 | "shop_menu_model" 132 | { 133 | "ko" "간수 모델 [{1}¢]" 134 | } 135 | 136 | "shop_menu_nodamage" 137 | { 138 | "ko" "20초 동안 무적 [{1}¢]" 139 | } 140 | 141 | "shop_menu_openjail" 142 | { 143 | "ko" "감옥 문 열기 [{1}¢]" 144 | } 145 | 146 | "shop_menu_poisonsmoke" 147 | { 148 | "ko" "독 연막탄 [{1}¢]" 149 | } 150 | 151 | "shop_menu_taser" 152 | { 153 | "ko" "테이저 3발 [{1}¢]" 154 | } 155 | 156 | "shop_menu_vampire" 157 | { 158 | "ko" "뱀파이어 [{1}¢]" 159 | } 160 | 161 | "shop_menu_vampire" 162 | { 163 | "ko" "뱀파이어 [{1}¢]" 164 | } 165 | 166 | "shop_missingcredits" 167 | { 168 | "ko" "당신의 크레딧 : {1} (크레딧이 충분하지 않습니다. {2} 크레딧이 더 필요합니다.)" 169 | } 170 | 171 | "shop_molotov" 172 | { 173 | "ko" "구매하였습니다 : 화염병 + 2 섬광탄" 174 | } 175 | 176 | "shop_noclip" 177 | { 178 | "ko" "당신은 이제 {1} 초 동안 자유롭게 날아다닐 수 있습니다." 179 | } 180 | 181 | "shop_noclipend" 182 | { 183 | "ko" "NoClip이 끝났습니다." 184 | } 185 | 186 | "shop_nodamage" 187 | { 188 | "ko" "당신은 이제 {1} 초 동안 불사신 입니다!" 189 | } 190 | 191 | "shop_onlyt" 192 | { 193 | "ko" "이 아이템은 죄수만 사용할 수 있습니다!" 194 | } 195 | 196 | "shop_opencell" 197 | { 198 | "ko" "감옥 문을 열었습니다." 199 | } 200 | 201 | "shop_opencellall" 202 | { 203 | "ko" "{1} 님이 모든 문을 상점 구매로 열었습니다." 204 | } 205 | 206 | "shop_playtime" 207 | { 208 | "ko" "서버 플레이 보상으로 {1} 크레딧을 얻었습니다." 209 | } 210 | 211 | "shop_poisensmoke" 212 | { 213 | "ko" "아이템을 구매했습니다 : 독 연막탄" 214 | } 215 | 216 | "shop_revived" 217 | { 218 | "ko" "{1} 을 받았습니다. " 219 | } 220 | 221 | "shop_revivehint" 222 | { 223 | "ko" "!revive 명령어로 {1} 크레딧에 부활할 수 있습니다!" 224 | } 225 | 226 | "shop_set" 227 | { 228 | "ko" "당신은 {1} 님의 크레딧을 {2} 으로 설정하였습니다." 229 | } 230 | 231 | "shop_tag" 232 | { 233 | "ko" "[{green}감옥 상점{default}]" 234 | } 235 | 236 | "shop_taser" 237 | { 238 | "ko" "구매하였습니다 : 테이저 (3발)" 239 | } 240 | 241 | "shop_throwingknife" 242 | { 243 | "ko" "당신은 구매하였습니다. : 던지는 칼!" 244 | } 245 | 246 | "shop_unnodamage" 247 | { 248 | "ko" "당신은 이제 죽을 수 있습니다!" 249 | } 250 | 251 | "shop_vapire" 252 | { 253 | "ko" "이제 당신은 뱀파이어 입니다." 254 | } 255 | 256 | "shop_welcome" 257 | { 258 | "ko" "!jailshop 을 입력하면 상점을 열 수 있습니다. 크레딧을 얻으려면 킬/승리/플레이로 얻을 수 있습니다." 259 | } 260 | 261 | "shop_unwallhack" 262 | { 263 | "ko" "월핵이 끝났습니다!" 264 | } 265 | 266 | "shop_win" 267 | { 268 | "ko" "라운드를 승리 보상으로 {2} 크레딧을 획득하였습니다. 당신의 크레딧 : {1}¢" 269 | } 270 | 271 | "shop_onlyct" 272 | { 273 | "ko" "이 아이템은 간수만 사용할 수 있습니다." 274 | } 275 | 276 | "shop_randomtp_teleported" 277 | { 278 | "ko" "{1} 님이 당신을 순간이동 시켰습니다." 279 | } 280 | 281 | } 282 | -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/store/store-logging.inc: -------------------------------------------------------------------------------- 1 | #if defined _store_logging_included 2 | #endinput 3 | #endif 4 | #define _store_logging_included 5 | 6 | /* 7 | This whole system was recommended by Arrow, not me. Keep that in mind. 8 | Based on the standard logging format, more information here: https://en.wikipedia.org/wiki/Syslog 9 | */ 10 | 11 | /** 12 | * Creates a log to a file and if enabled, queries a database to insert the log. 13 | * Usage: System is unusable 14 | * Example: This level should not be used by applications. 15 | * 16 | * @param format A format string. See http://wiki.alliedmods.net/Format_Class_Functions_(SourceMod_Scripting) 17 | * @param ... Variable number of format parameters. 18 | * 19 | * @noreturn 20 | */ 21 | native void Store_LogEmergency(const char[] format, any...); 22 | 23 | /** 24 | * Creates a log to a file and if enabled, queries a database to insert the log. 25 | * Usage: Should be corrected immediately 26 | * Example: Loss of the primary ISP connection. 27 | * 28 | * @param format A format string. See http://wiki.alliedmods.net/Format_Class_Functions_(SourceMod_Scripting) 29 | * @param ... Variable number of format parameters. 30 | * 31 | * @noreturn 32 | */ 33 | native void Store_LogAlert(const char[] format, any...); 34 | 35 | /** 36 | * Creates a log to a file and if enabled, queries a database to insert the log. 37 | * Usage: Critical conditions 38 | * Example: A failure in the system's primary application. 39 | * 40 | * @param format A format string. See http://wiki.alliedmods.net/Format_Class_Functions_(SourceMod_Scripting) 41 | * @param ... Variable number of format parameters. 42 | * 43 | * @noreturn 44 | */ 45 | native void Store_LogCritical(const char[] format, any...); 46 | 47 | /** 48 | * Creates a log to a file and if enabled, queries a database to insert the log. 49 | * Usage: Error conditions 50 | * Example: An application has exceeded its file storage limit and attempts to write are failing. 51 | * 52 | * @param format A format string. See http://wiki.alliedmods.net/Format_Class_Functions_(SourceMod_Scripting) 53 | * @param ... Variable number of format parameters. 54 | * 55 | * @noreturn 56 | */ 57 | native void Store_LogError(const char[] format, any...); 58 | 59 | /** 60 | * Creates a log to a file and if enabled, queries a database to insert the log. 61 | * Usage: May indicate that an error will occur if action is not taken. 62 | * Example: A non-root file system has only 2GB remaining. 63 | * 64 | * @param format A format string. See http://wiki.alliedmods.net/Format_Class_Functions_(SourceMod_Scripting) 65 | * @param ... Variable number of format parameters. 66 | * 67 | * @noreturn 68 | */ 69 | native void Store_LogWarning(const char[] format, any...); 70 | 71 | /** 72 | * Creates a log to a file and if enabled, queries a database to insert the log. 73 | * Usage: Events that are unusual, but not error conditions. 74 | * Example: N/A 75 | * 76 | * @param format A format string. See http://wiki.alliedmods.net/Format_Class_Functions_(SourceMod_Scripting) 77 | * @param ... Variable number of format parameters. 78 | * 79 | * @noreturn 80 | */ 81 | native void Store_LogNotice(const char[] format, any...); 82 | 83 | /** 84 | * Creates a log to a file and if enabled, queries a database to insert the log. 85 | * Usage: Normal operational messages that require no action. 86 | * Example: An application has started, paused or ended successfully. 87 | * 88 | * @param format A format string. See http://wiki.alliedmods.net/Format_Class_Functions_(SourceMod_Scripting) 89 | * @param ... Variable number of format parameters. 90 | * 91 | * @noreturn 92 | */ 93 | native void Store_LogInformational(const char[] format, any...); 94 | 95 | /** 96 | * Creates a log to a file and if enabled, queries a database to insert the log. 97 | * Usage: Information useful to developers for debugging the application. 98 | * Example: N/A 99 | * 100 | * @param format A format string. See http://wiki.alliedmods.net/Format_Class_Functions_(SourceMod_Scripting) 101 | * @param ... Variable number of format parameters. 102 | * 103 | * @noreturn 104 | */ 105 | native void Store_LogDebug(const char[] format, any...); 106 | 107 | public SharedPlugin __pl_store_logging = 108 | { 109 | name = "store-logging", 110 | file = "store-logging.smx", 111 | #if defined REQUIRE_PLUGIN 112 | required = 1, 113 | #else 114 | required = 0, 115 | #endif 116 | }; 117 | 118 | #if defined REQUIRE_PLUGIN 119 | public __pl_store_logging_SetNTVOptional() 120 | { 121 | MarkNativeAsOptional("Store_LogEmergency"); 122 | MarkNativeAsOptional("Store_LogAlert"); 123 | MarkNativeAsOptional("Store_LogCritical"); 124 | MarkNativeAsOptional("Store_LogError"); 125 | MarkNativeAsOptional("Store_LogWarning"); 126 | MarkNativeAsOptional("Store_LogNotice"); 127 | MarkNativeAsOptional("Store_LogInformational"); 128 | MarkNativeAsOptional("Store_LogDebug"); 129 | } 130 | #endif 131 | -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/myjailshop.inc: -------------------------------------------------------------------------------- 1 | /* 2 | * MyJailShop - Include File. 3 | * by: shanapu 4 | * https://github.com/shanapu/MyJailShop/ 5 | * 6 | * This file is part of the MyJailShop SourceMod Plugin. 7 | * 8 | * This program is free software; you can redistribute it and/or modify it under 9 | * the terms of the GNU General Public License, version 3.0, as published by the 10 | * Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, but WITHOUT 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15 | * details. 16 | * 17 | * You should have received a copy of the GNU General Public License along with 18 | * this program. If not, see . 19 | */ 20 | 21 | 22 | #if defined _myjailshop_included_ 23 | #endinput 24 | #endif 25 | #define _myjailshop_included_ 26 | 27 | 28 | public SharedPlugin:__pl_myjailshop = 29 | { 30 | name = "myjailshop", 31 | file = "myjailshop.smx", 32 | 33 | #if defined REQUIRE_PLUGIN 34 | required = 1, 35 | #else 36 | required = 0, 37 | #endif 38 | }; 39 | 40 | 41 | #if !defined REQUIRE_PLUGIN 42 | public __pl_myjailshop_SetNTVOptional() 43 | { 44 | MarkNativeAsOptional("MyJailShop_SetCredits"); 45 | MarkNativeAsOptional("MyJailShop_GetCredits"); 46 | MarkNativeAsOptional("MyJailShop_IsBuyTime"); 47 | } 48 | #endif 49 | 50 | 51 | /********************************************************* 52 | * Called when a client get credits and sm_jailshop_credits_system "0" 53 | * 54 | * @param client The client who get the credits 55 | * @Return The credits of the client 56 | *********************************************************/ 57 | forward int MyJailShop_OnGetCredits(int client); 58 | 59 | 60 | 61 | /********************************************************* 62 | * Called when a client should remove his items 63 | * 64 | * @param client The client to reset 65 | * @NoReturn 66 | *********************************************************/ 67 | forward void MyJailShop_OnResetPlayer(int client); 68 | 69 | 70 | 71 | /********************************************************* 72 | * Called when a clients credits are set and sm_jailshop_credits_system "0" 73 | * 74 | * @param client The client who get the credits 75 | * @param Credits Amount of credits 76 | * @NoReturn 77 | *********************************************************/ 78 | forward void MyJailShop_OnSetCredits(int client, int NewCreditsAmount); 79 | 80 | 81 | 82 | /********************************************************* 83 | * Called when a client get credits 84 | * 85 | * @param client The client who get the credits 86 | * @param extraCredits Amount of credits 87 | * @NoReturn 88 | *********************************************************/ 89 | forward void MyJailShop_OnPlayerGetCredits(int client, int extraCredits); 90 | 91 | 92 | /********************************************************* 93 | * Called when a client buy an item 94 | * 95 | * @param client The client who bought the item 96 | * @param item The name of the item. 97 | * @NoReturn 98 | *********************************************************/ 99 | forward void MyJailShop_OnPlayerBuyItem(int client, char[] item); 100 | 101 | 102 | /********************************************************* 103 | * Called after the shop menu is built, but before it's displayed. 104 | * This is where you can add custom shopitem. See MyJailShop_OnShopMenuHandler 105 | * 106 | * @param client client Player's index. 107 | * @param menu Menu being displayed to the client. 108 | * @NoReturn 109 | *********************************************************/ 110 | forward void MyJailShop_OnShopMenu(int client, Menu menu); 111 | 112 | 113 | /********************************************************* 114 | * Called once a shop menu item has been selected 115 | * @param menu Menu displayed 116 | * @param action Menu Action 117 | * @param client client index 118 | * @param itemNum selected item number 119 | * @NoReturn 120 | *********************************************************/ 121 | forward void MyJailShop_OnShopMenuHandler(Menu menu, MenuAction action, int client, int itemNum); 122 | 123 | 124 | 125 | /********************************************************* 126 | * Get the Credits of the client 127 | * 128 | * @param client The client to get the credits 129 | * @Return The credits of the client 130 | *********************************************************/ 131 | native int MyJailShop_GetCredits(int client); 132 | 133 | 134 | /********************************************************* 135 | * Set new Credits of the client 136 | * 137 | * @param client The client to set the credits 138 | * @NoReturn 139 | *********************************************************/ 140 | native void MyJailShop_SetCredits(int client, int newCredits); 141 | 142 | 143 | /********************************************************* 144 | * Is buytime - can player buy item or is shopping restricted 145 | * 146 | * @param none 147 | * @true on buying allowed, false if not 148 | *********************************************************/ 149 | native bool MyJailShop_IsBuyTime(); -------------------------------------------------------------------------------- /addons/sourcemod/scripting/myjailshop_freeday.sp: -------------------------------------------------------------------------------- 1 | /* 2 | * MyJailShop - Freeday Item Module. 3 | * by: shanapu 4 | * https://github.com/shanapu/MyJailShop/ 5 | * 6 | * This file is part of the MyJailShop SourceMod Plugin. 7 | * 8 | * This program is free software; you can redistribute it and/or modify it under 9 | * the terms of the GNU General Public License, version 3.0, as published by the 10 | * Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, but WITHOUT 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15 | * details. 16 | * 17 | * You should have received a copy of the GNU General Public License along with 18 | * this program. If not, see . 19 | */ 20 | 21 | 22 | // Includes 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include // add new cvars to existing .cfg file 33 | 34 | 35 | // Compiler Options 36 | #pragma semicolon 1 37 | #pragma newdecls required 38 | 39 | 40 | // ConVars shop specific 41 | ConVar gc_iItemPrice; 42 | ConVar gc_sItemFlag; 43 | 44 | 45 | // Strings shop specific 46 | char g_sItemFlag[64]; 47 | char g_sPurchaseLogFile[PLATFORM_MAX_PATH]; 48 | 49 | 50 | // Handels shop specific 51 | Handle gF_hOnPlayerBuyItem; 52 | 53 | 54 | // Start 55 | public Plugin myinfo = 56 | { 57 | name = "Freeday for MyJailShop", 58 | author = "shanapu", 59 | description = "Buy a MyJB warden Freeday item for next round", 60 | version = "1.0", 61 | url = "https://github.com/shanapu" 62 | }; 63 | 64 | 65 | public void OnPluginStart() 66 | { 67 | // Translation 68 | LoadTranslations("MyJailShop.phrases"); 69 | 70 | // Add new Convars to existing Items.cfg 71 | AutoExecConfig_SetFile("Items", "MyJailShop"); 72 | AutoExecConfig_SetCreateFile(true); 73 | 74 | // Register ConVars 75 | gc_iItemPrice = AutoExecConfig_CreateConVar("sm_jailshop_freeday_price", "5000", "Price of a Freeday"); 76 | gc_sItemFlag = AutoExecConfig_CreateConVar("sm_jailshop_freeday_flag", "", "Set flag for admin/vip must have to get access to freeday. No flag = is available for all players!"); 77 | 78 | // Add new Convars to existing Items.cfg 79 | AutoExecConfig_ExecuteFile(); 80 | AutoExecConfig_CleanFile(); 81 | 82 | // Set file for Logs 83 | SetLogFile(g_sPurchaseLogFile, "purchase", "MyJailShop"); 84 | } 85 | 86 | 87 | public void OnConfigsExecuted() 88 | { 89 | gc_sItemFlag.GetString(g_sItemFlag, sizeof(g_sItemFlag)); 90 | } 91 | 92 | 93 | // Here we add an new item to shop menu 94 | public void MyJailShop_OnShopMenu(int client, Menu menu) 95 | { 96 | if (GetClientTeam(client) == CS_TEAM_T) 97 | { 98 | char info[64]; 99 | Format(info, sizeof(info), "%t", "shop_menu_freeday", gc_iItemPrice.IntValue); 100 | 101 | if (MyJailShop_GetCredits(client) >= gc_iItemPrice.IntValue && MyJailShop_IsBuyTime() && IsPlayerAlive(client) && CheckVipFlag(client, g_sItemFlag)) 102 | AddMenuItem(menu, "Freeday", info); 103 | else if (CheckVipFlag(client, g_sItemFlag)) 104 | AddMenuItem(menu, "Freeday", info, ITEMDRAW_DISABLED); 105 | } 106 | } 107 | 108 | 109 | // What should we do when new item was picked? 110 | public void MyJailShop_OnShopMenuHandler(Menu menu, MenuAction action, int client, int itemNum) 111 | { 112 | if (!IsValidClient(client, false, false)) 113 | { 114 | return; 115 | } 116 | 117 | if (action == MenuAction_Select) 118 | { 119 | if (MyJailShop_IsBuyTime()) 120 | { 121 | char info[64]; 122 | menu.GetItem(itemNum, info, sizeof(info)); 123 | 124 | if (StrEqual(info, "Freeday")) 125 | { 126 | Item_Freeday(client, info); 127 | } 128 | } 129 | } 130 | 131 | return; 132 | } 133 | 134 | 135 | // The item transaction and last checks 136 | void Item_Freeday(int client, char[] name) 137 | { 138 | // has player enough credits? 139 | if (MyJailShop_GetCredits(client) < gc_iItemPrice.IntValue) 140 | { 141 | CPrintToChat(client, "%t %t", "shop_tag", "shop_missingcredits", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 142 | return; 143 | } 144 | 145 | // now we take his money & push the forward 146 | MyJailShop_SetCredits(client,(MyJailShop_GetCredits(client) - gc_iItemPrice.IntValue)); 147 | Forward_OnPlayerBuyItem(client, name); 148 | 149 | // here he get the item with native 150 | warden_freeday_set(client); 151 | 152 | // announce it 153 | CPrintToChat(client, "%t %t", "shop_tag", "shop_freeday"); 154 | CPrintToChat(client, "%t %t", "shop_tag", "shop_costs", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 155 | 156 | // log it 157 | ConVar c_bLogging = FindConVar("sm_jailshop_log"); 158 | if (c_bLogging.BoolValue) 159 | { 160 | LogToFileEx(g_sPurchaseLogFile, "Player %L bought: Freeday for next round", client); 161 | } 162 | } 163 | 164 | 165 | // Forward MyJailShop_OnPlayerBuyItem 166 | void Forward_OnPlayerBuyItem(int client, char[] item) 167 | { 168 | Call_StartForward(gF_hOnPlayerBuyItem); 169 | Call_PushCell(client); 170 | Call_PushString(item); 171 | Call_Finish(); 172 | } 173 | 174 | public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) 175 | { 176 | gF_hOnPlayerBuyItem = CreateGlobalForward("MyJailShop_OnPlayerBuyItem", ET_Ignore, Param_Cell, Param_String); 177 | 178 | return APLRes_Success; 179 | } -------------------------------------------------------------------------------- /addons/sourcemod/scripting/myjailshop_blackout.sp: -------------------------------------------------------------------------------- 1 | /* 2 | * MyJailShop - Blackout Item Module. 3 | * by: shanapu 4 | * https://github.com/shanapu/MyJailShop/ 5 | * 6 | * This file is part of the MyJailShop SourceMod Plugin. 7 | * 8 | * This program is free software; you can redistribute it and/or modify it under 9 | * the terms of the GNU General Public License, version 3.0, as published by the 10 | * Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, but WITHOUT 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15 | * details. 16 | * 17 | * You should have received a copy of the GNU General Public License along with 18 | * this program. If not, see . 19 | */ 20 | 21 | 22 | // Includes 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include // add new cvars to existing .cfg file 33 | 34 | 35 | // Compiler Options 36 | #pragma semicolon 1 37 | #pragma newdecls required 38 | 39 | 40 | // ConVars shop specific 41 | ConVar gc_iItemPrice; 42 | ConVar gc_sItemFlag; 43 | ConVar gc_fItemTime; 44 | 45 | 46 | // Strings shop specific 47 | char g_sItemFlag[64]; 48 | char g_sPurchaseLogFile[PLATFORM_MAX_PATH]; 49 | 50 | char g_sSoundBlackout[64] = "music/MyJailshop/blackout.mp3"; 51 | char g_sSoundSwitch[64] = "music/MyJailshop/switch.mp3"; 52 | 53 | 54 | // Handels shop specific 55 | Handle gF_hOnPlayerBuyItem; 56 | 57 | 58 | // Start 59 | public Plugin myinfo = 60 | { 61 | name = "Blackout for MyJailShop", 62 | author = "shanapu", 63 | description = "Blackout item for MyJailShop - darken the map for a period", 64 | version = "1.0", 65 | url = "https://github.com/shanapu" 66 | }; 67 | 68 | 69 | public void OnPluginStart() 70 | { 71 | // Translation 72 | LoadTranslations("MyJailShop.phrases"); 73 | 74 | // Add new Convars to existing Items.cfg 75 | AutoExecConfig_SetFile("Items", "MyJailShop"); 76 | AutoExecConfig_SetCreateFile(true); 77 | 78 | // Register ConVars 79 | gc_iItemPrice = AutoExecConfig_CreateConVar("sm_jailshop_blackout_price", "1000", "Price of the Blackout perk"); 80 | gc_sItemFlag = AutoExecConfig_CreateConVar("sm_jailshop_blackout_flag", "", "Set flag for admin/vip must have to get access to Blackout. No flag = is available for all players!"); 81 | gc_fItemTime = AutoExecConfig_CreateConVar("sm_jailshop_blackout_time", "10", "How many seconds the blackout should be?"); 82 | 83 | // Add new Convars to existing Items.cfg 84 | AutoExecConfig_ExecuteFile(); 85 | AutoExecConfig_CleanFile(); 86 | 87 | // Set file for Logs 88 | SetLogFile(g_sPurchaseLogFile, "purchase", "MyJailShop"); 89 | } 90 | 91 | 92 | public void OnConfigsExecuted() 93 | { 94 | gc_sItemFlag.GetString(g_sItemFlag, sizeof(g_sItemFlag)); 95 | PrecacheSoundAnyDownload(g_sSoundBlackout); 96 | PrecacheSoundAnyDownload(g_sSoundSwitch); 97 | } 98 | 99 | 100 | // Here we add an new item to shop menu 101 | public void MyJailShop_OnShopMenu(int client, Menu menu) 102 | { 103 | if (GetClientTeam(client) == CS_TEAM_T) 104 | { 105 | char info[64]; 106 | Format(info, sizeof(info), "%t", "shop_menu_blackout", gc_iItemPrice.IntValue); 107 | 108 | if (MyJailShop_GetCredits(client) >= gc_iItemPrice.IntValue && MyJailShop_IsBuyTime() && IsPlayerAlive(client) && CheckVipFlag(client, g_sItemFlag)) 109 | AddMenuItem(menu, "Blackout", info); 110 | else if (CheckVipFlag(client, g_sItemFlag)) 111 | AddMenuItem(menu, "Blackout", info, ITEMDRAW_DISABLED); 112 | } 113 | } 114 | 115 | 116 | // What should we do when new item was picked? 117 | public void MyJailShop_OnShopMenuHandler(Menu menu, MenuAction action, int client, int itemNum) 118 | { 119 | if (!IsValidClient(client, false, false)) 120 | { 121 | return; 122 | } 123 | 124 | if (action == MenuAction_Select) 125 | { 126 | if (MyJailShop_IsBuyTime()) 127 | { 128 | char info[64]; 129 | menu.GetItem(itemNum, info, sizeof(info)); 130 | 131 | if (StrEqual(info, "Blackout")) 132 | { 133 | Item_Blackout(client, info); 134 | } 135 | } 136 | } 137 | 138 | return; 139 | } 140 | 141 | 142 | // The item transaction and last checks 143 | void Item_Blackout(int client, char[] name) 144 | { 145 | // is player alive? 146 | if (!IsPlayerAlive(client)) 147 | { 148 | CPrintToChat(client, "%t %t", "shop_tag", "shop_alive"); 149 | return; 150 | } 151 | 152 | // has player enough credits? 153 | if (MyJailShop_GetCredits(client) < gc_iItemPrice.IntValue) 154 | { 155 | CPrintToChat(client, "%t %t", "shop_tag", "shop_missingcredits", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 156 | return; 157 | } 158 | 159 | EmitSoundToAllAny(g_sSoundBlackout); 160 | CreateTimer(1.5, Timer_FogOn); 161 | 162 | // now we take his money & push the forward 163 | MyJailShop_SetCredits(client,(MyJailShop_GetCredits(client) - gc_iItemPrice.IntValue)); 164 | Forward_OnPlayerBuyItem(client, name); 165 | 166 | 167 | // announce it 168 | CPrintToChat(client, "%t %t", "shop_tag", "shop_blackout"); 169 | CPrintToChat(client, "%t %t", "shop_tag", "shop_costs", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 170 | 171 | // log it 172 | ConVar c_bLogging = FindConVar("sm_jailshop_log"); 173 | if (c_bLogging.BoolValue) 174 | { 175 | LogToFileEx(g_sPurchaseLogFile, "Player %L bought: Blackout", client); 176 | } 177 | } 178 | 179 | public Action Timer_FogOn(Handle tmr) 180 | { 181 | MyJailbreak_FogOn(); 182 | CPrintToChatAll("%t %t", "shop_tag", "shop_blackout_all"); 183 | CreateTimer(gc_fItemTime.FloatValue, Timer_FogOff, TIMER_FLAG_NO_MAPCHANGE); 184 | } 185 | 186 | public Action Timer_FogOff(Handle tmr) 187 | { 188 | MyJailbreak_FogOff(); 189 | EmitSoundToAllAny(g_sSoundSwitch); 190 | } 191 | 192 | // Forward MyJailShop_OnPlayerBuyItem 193 | void Forward_OnPlayerBuyItem(int client, char[] item) 194 | { 195 | Call_StartForward(gF_hOnPlayerBuyItem); 196 | Call_PushCell(client); 197 | Call_PushString(item); 198 | Call_Finish(); 199 | } 200 | 201 | public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) 202 | { 203 | gF_hOnPlayerBuyItem = CreateGlobalForward("MyJailShop_OnPlayerBuyItem", ET_Ignore, Param_Cell, Param_String); 204 | 205 | return APLRes_Success; 206 | } -------------------------------------------------------------------------------- /addons/sourcemod/scripting/myjailshop_tacticalshield.sp: -------------------------------------------------------------------------------- 1 | /* 2 | * MyJailShop - Shield Item Module. 3 | * by: shanapu 4 | * https://github.com/shanapu/MyJailShop/ 5 | * https://github.com/Keplyx/TacticalShield 6 | * 7 | * This file is part of the MyJailShop SourceMod Plugin. 8 | * 9 | * This program is free software; you can redistribute it and/or modify it under 10 | * the terms of the GNU General Public License, version 3.0, as published by the 11 | * Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, but WITHOUT 14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 15 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 16 | * details. 17 | * 18 | * You should have received a copy of the GNU General Public License along with 19 | * this program. If not, see . 20 | */ 21 | 22 | 23 | // Includes 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include // add new cvars to existing .cfg file 34 | 35 | 36 | // Compiler Options 37 | #pragma semicolon 1 38 | #pragma newdecls required 39 | 40 | 41 | // ConVars shop specific 42 | ConVar gc_iItemPrice; 43 | ConVar gc_sItemFlag; 44 | ConVar gc_iItemOnlyTeam; 45 | ConVar gc_sWeapon; 46 | 47 | 48 | // Strings shop specific 49 | char g_sItemFlag[64]; 50 | char g_sPurchaseLogFile[PLATFORM_MAX_PATH]; 51 | 52 | 53 | // Handels shop specific 54 | Handle gF_hOnPlayerBuyItem; 55 | 56 | 57 | // Start 58 | public Plugin myinfo = 59 | { 60 | name = "Shield for MyJailShop", 61 | author = "shanapu", 62 | description = "Buy a Tactical Shield item", 63 | version = "1.0", 64 | url = "https://github.com/shanapu" 65 | }; 66 | 67 | 68 | public void OnPluginStart() 69 | { 70 | // Translation 71 | LoadTranslations("MyJailShop.phrases"); 72 | 73 | // Add new Convars to existing Items.cfg 74 | AutoExecConfig_SetFile("Items", "MyJailShop"); 75 | AutoExecConfig_SetCreateFile(true); 76 | 77 | // Register ConVars 78 | gc_iItemPrice = AutoExecConfig_CreateConVar("sm_jailshop_shield_price", "5000", "Price of a Shield"); 79 | gc_sItemFlag = AutoExecConfig_CreateConVar("sm_jailshop_shield_flag", "", "Set flag for admin/vip must have to get access to shield. No flag = is available for all players!"); 80 | gc_iItemOnlyTeam = AutoExecConfig_CreateConVar("sm_jailshop_shield_access", "1", "0 - guards only, 1 - guards & prisoner, 2 - prisoner only", _, true, 0.0, true, 2.0); 81 | gc_sWeapon = AutoExecConfig_CreateConVar("sm_jailshop_shield_pistol", "weapon_usp_silencer", "Give player this pistol with one magazin if he havn't already a pistol, leave blank '' for no pistol with shield", _, true, 0.0, true, 2.0); 82 | 83 | // Add new Convars to existing Items.cfg 84 | AutoExecConfig_ExecuteFile(); 85 | AutoExecConfig_CleanFile(); 86 | 87 | // Set file for Logs 88 | SetLogFile(g_sPurchaseLogFile, "purchase", "MyJailShop"); 89 | } 90 | 91 | 92 | public void OnConfigsExecuted() 93 | { 94 | gc_sItemFlag.GetString(g_sItemFlag, sizeof(g_sItemFlag)); 95 | } 96 | 97 | 98 | // Here we add an new item to shop menu 99 | public void MyJailShop_OnShopMenu(int client, Menu menu) 100 | { 101 | if ((GetClientTeam(client) == CS_TEAM_CT && gc_iItemOnlyTeam.IntValue <= 1) || (GetClientTeam(client) == CS_TEAM_T && gc_iItemOnlyTeam.IntValue >= 1)) 102 | { 103 | char info[64]; 104 | Format(info, sizeof(info), "%t", "shop_menu_shield", gc_iItemPrice.IntValue); 105 | 106 | if (MyJailShop_GetCredits(client) >= gc_iItemPrice.IntValue && MyJailShop_IsBuyTime() && IsPlayerAlive(client) && CheckVipFlag(client, g_sItemFlag)) 107 | AddMenuItem(menu, "Shield", info); 108 | else if (CheckVipFlag(client, g_sItemFlag)) 109 | AddMenuItem(menu, "Shield", info, ITEMDRAW_DISABLED); 110 | } 111 | } 112 | 113 | 114 | // What should we do when new item was picked? 115 | public void MyJailShop_OnShopMenuHandler(Menu menu, MenuAction action, int client, int itemNum) 116 | { 117 | if (!IsValidClient(client, false, false)) 118 | { 119 | return; 120 | } 121 | 122 | if (action == MenuAction_Select) 123 | { 124 | if (MyJailShop_IsBuyTime()) 125 | { 126 | char info[64]; 127 | menu.GetItem(itemNum, info, sizeof(info)); 128 | 129 | if (StrEqual(info, "Shield")) 130 | { 131 | Item_Shield(client, info); 132 | } 133 | } 134 | } 135 | 136 | return; 137 | } 138 | 139 | 140 | // The item transaction and last checks 141 | void Item_Shield(int client, char[] name) 142 | { 143 | // is player alive? 144 | if (!IsPlayerAlive(client)) 145 | { 146 | CPrintToChat(client, "%t %t", "shop_tag", "shop_alive"); 147 | return; 148 | } 149 | 150 | // has player enough credits? 151 | if (MyJailShop_GetCredits(client) < gc_iItemPrice.IntValue) 152 | { 153 | CPrintToChat(client, "%t %t", "shop_tag", "shop_missingcredits", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 154 | return; 155 | } 156 | 157 | // now we take his money & push the forward 158 | MyJailShop_SetCredits(client,(MyJailShop_GetCredits(client) - gc_iItemPrice.IntValue)); 159 | Forward_OnPlayerBuyItem(client, name); 160 | 161 | char sBuffer[32]; 162 | gc_sWeapon.GetString(sBuffer, sizeof(sBuffer)); 163 | if (strlen(sBuffer) != 0) 164 | { 165 | int weapon; 166 | if ((weapon = GetPlayerWeaponSlot(client, CS_SLOT_SECONDARY)) == -1) 167 | { 168 | weapon = GivePlayerItem(client, sBuffer); 169 | SetEntProp(weapon, Prop_Send, "m_iPrimaryReserveAmmoCount", 0); 170 | } 171 | } 172 | 173 | // here he get the item with native 174 | OverridePlayerShield(client, 2); 175 | GivePlayerShield(client); 176 | 177 | // announce it 178 | CPrintToChat(client, "%t %t", "shop_tag", "shop_shield"); 179 | CPrintToChat(client, "%t %t", "shop_tag", "shop_costs", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 180 | 181 | // log it 182 | ConVar c_bLogging = FindConVar("sm_jailshop_log"); 183 | if (c_bLogging.BoolValue) 184 | { 185 | LogToFileEx(g_sPurchaseLogFile, "Player %L bought: Shield", client); 186 | } 187 | } 188 | 189 | 190 | // Forward MyJailShop_OnPlayerBuyItem 191 | void Forward_OnPlayerBuyItem(int client, char[] item) 192 | { 193 | Call_StartForward(gF_hOnPlayerBuyItem); 194 | Call_PushCell(client); 195 | Call_PushString(item); 196 | Call_Finish(); 197 | } 198 | 199 | public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) 200 | { 201 | gF_hOnPlayerBuyItem = CreateGlobalForward("MyJailShop_OnPlayerBuyItem", ET_Ignore, Param_Cell, Param_String); 202 | 203 | return APLRes_Success; 204 | } -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/emitsoundany.inc: -------------------------------------------------------------------------------- 1 | /** 2 | * vim: set ts=4 : 3 | * ============================================================================= 4 | * EmitSoundAny 5 | * Play sounds in a cross-game friendly way CS:GO and DOTA2 friendly way. 6 | * 7 | * EmitSoundAny (C)2014 AlliedModders and Powerlord (Ross Bemrose) 8 | * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved. 9 | * ============================================================================= 10 | * 11 | * This program is free software; you can redistribute it and/or modify it under 12 | * the terms of the GNU General Public License, version 3.0, as published by the 13 | * Free Software Foundation. 14 | * 15 | * This program is distributed in the hope that it will be useful, but WITHOUT 16 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 17 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 | * details. 19 | * 20 | * You should have received a copy of the GNU General Public License along with 21 | * this program. If not, see . 22 | * 23 | * As a special exception, AlliedModders LLC gives you permission to link the 24 | * code of this program (as well as its derivative works) to "Half-Life 2," the 25 | * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software 26 | * by the Valve Corporation. You must obey the GNU General Public License in 27 | * all respects for all other code used. Additionally, AlliedModders LLC grants 28 | * this exception to all derivative works. AlliedModders LLC defines further 29 | * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), 30 | * or . 31 | * 32 | * Version: 1.0.3 33 | */ 34 | #if defined _emitsoundany_included 35 | #endinput 36 | #endif 37 | #define _emitsoundany_included 38 | 39 | #include 40 | 41 | static bool:g_bCheckedEngine = false; 42 | static bool:g_bNeedsFakePrecache = false; 43 | 44 | stock static EmitSoundCheckEngineVersion() 45 | { 46 | if (g_bCheckedEngine) 47 | { 48 | return; 49 | } 50 | 51 | new EngineVersion:engVersion = GetEngineVersion(); 52 | 53 | if (engVersion == Engine_CSGO || engVersion == Engine_DOTA) 54 | { 55 | g_bNeedsFakePrecache = true; 56 | } 57 | g_bCheckedEngine = true; 58 | } 59 | 60 | stock static bool:FakePrecacheSoundEx( const String:szPath[] ) 61 | { 62 | decl String:szPathStar[PLATFORM_MAX_PATH]; 63 | Format(szPathStar, sizeof(szPathStar), "*%s", szPath); 64 | 65 | AddToStringTable( FindStringTable( "soundprecache" ), szPathStar ); 66 | return true; 67 | } 68 | 69 | stock bool:PrecacheSoundAny( const String:szPath[], bool:preload=false) 70 | { 71 | EmitSoundCheckEngineVersion(); 72 | 73 | if (g_bNeedsFakePrecache) 74 | { 75 | return FakePrecacheSoundEx(szPath); 76 | } 77 | else 78 | { 79 | return PrecacheSound(szPath, preload); 80 | } 81 | } 82 | 83 | stock EmitSoundAny(const clients[], 84 | numClients, 85 | const String:sample[], 86 | entity = SOUND_FROM_PLAYER, 87 | channel = SNDCHAN_AUTO, 88 | level = SNDLEVEL_NORMAL, 89 | flags = SND_NOFLAGS, 90 | Float:volume = SNDVOL_NORMAL, 91 | pitch = SNDPITCH_NORMAL, 92 | speakerentity = -1, 93 | const Float:origin[3] = NULL_VECTOR, 94 | const Float:dir[3] = NULL_VECTOR, 95 | bool:updatePos = true, 96 | Float:soundtime = 0.0) 97 | { 98 | EmitSoundCheckEngineVersion(); 99 | 100 | decl String:szSound[PLATFORM_MAX_PATH]; 101 | 102 | if (g_bNeedsFakePrecache) 103 | { 104 | Format(szSound, sizeof(szSound), "*%s", sample); 105 | } 106 | else 107 | { 108 | strcopy(szSound, sizeof(szSound), sample); 109 | } 110 | 111 | EmitSound(clients, numClients, szSound, entity, channel, level, flags, volume, pitch, speakerentity, origin, dir, updatePos, soundtime); 112 | } 113 | 114 | stock EmitSoundToClientAny(client, 115 | const String:sample[], 116 | entity = SOUND_FROM_PLAYER, 117 | channel = SNDCHAN_AUTO, 118 | level = SNDLEVEL_NORMAL, 119 | flags = SND_NOFLAGS, 120 | Float:volume = SNDVOL_NORMAL, 121 | pitch = SNDPITCH_NORMAL, 122 | speakerentity = -1, 123 | const Float:origin[3] = NULL_VECTOR, 124 | const Float:dir[3] = NULL_VECTOR, 125 | bool:updatePos = true, 126 | Float:soundtime = 0.0) 127 | { 128 | new clients[1]; 129 | clients[0] = client; 130 | /* Save some work for SDKTools and remove SOUND_FROM_PLAYER references */ 131 | entity = (entity == SOUND_FROM_PLAYER) ? client : entity; 132 | EmitSoundAny(clients, 1, sample, entity, channel, 133 | level, flags, volume, pitch, speakerentity, 134 | origin, dir, updatePos, soundtime); 135 | } 136 | 137 | stock EmitSoundToAllAny(const String:sample[], 138 | entity = SOUND_FROM_PLAYER, 139 | channel = SNDCHAN_AUTO, 140 | level = SNDLEVEL_NORMAL, 141 | flags = SND_NOFLAGS, 142 | Float:volume = SNDVOL_NORMAL, 143 | pitch = SNDPITCH_NORMAL, 144 | speakerentity = -1, 145 | const Float:origin[3] = NULL_VECTOR, 146 | const Float:dir[3] = NULL_VECTOR, 147 | bool:updatePos = true, 148 | Float:soundtime = 0.0) 149 | { 150 | new clients[MaxClients]; 151 | new total = 0; 152 | 153 | for (new i=1; i<=MaxClients; i++) 154 | { 155 | if (IsClientInGame(i)) 156 | { 157 | clients[total++] = i; 158 | } 159 | } 160 | 161 | if (!total) 162 | { 163 | return; 164 | } 165 | 166 | EmitSoundAny(clients, total, sample, entity, channel, 167 | level, flags, volume, pitch, speakerentity, 168 | origin, dir, updatePos, soundtime); 169 | } 170 | 171 | stock EmitAmbientSoundAny(const String:sample[], 172 | const Float:pos[3], 173 | entity = SOUND_FROM_WORLD, 174 | level = SNDLEVEL_NORMAL, 175 | flags = SND_NOFLAGS, 176 | Float:vol = SNDVOL_NORMAL, 177 | pitch = SNDPITCH_NORMAL, 178 | Float:delay = 0.0) 179 | { 180 | 181 | 182 | decl String:szSound[PLATFORM_MAX_PATH]; 183 | 184 | if (g_bNeedsFakePrecache) 185 | { 186 | Format(szSound, sizeof(szSound), "*%s", sample); 187 | } 188 | else 189 | { 190 | strcopy(szSound, sizeof(szSound), sample); 191 | } 192 | 193 | EmitAmbientSound(szSound, pos, entity, level, flags, vol, pitch, delay); 194 | } 195 | 196 | stock StopSoundAny(entity, channel, const String:name[]) 197 | { 198 | EmitSoundCheckEngineVersion(); 199 | 200 | decl String:szSound[PLATFORM_MAX_PATH]; 201 | 202 | if (g_bNeedsFakePrecache) 203 | { 204 | Format(szSound, sizeof(szSound), "*%s", name); 205 | } 206 | else 207 | { 208 | strcopy(szSound, sizeof(szSound), name); 209 | } 210 | 211 | StopSound(entity, channel, szSound); 212 | } -------------------------------------------------------------------------------- /addons/sourcemod/scripting/myjailshop_door.sp: -------------------------------------------------------------------------------- 1 | /* 2 | * MyJailShop - Door Item Module. 3 | * by: shanapu 4 | * https://github.com/shanapu/MyJailShop/ 5 | * 6 | * This file is part of the MyJailShop SourceMod Plugin. 7 | * 8 | * This program is free software; you can redistribute it and/or modify it under 9 | * the terms of the GNU General Public License, version 3.0, as published by the 10 | * Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, but WITHOUT 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15 | * details. 16 | * 17 | * You should have received a copy of the GNU General Public License along with 18 | * this program. If not, see . 19 | */ 20 | 21 | 22 | // Includes 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include // add new cvars to existing .cfg file 32 | 33 | 34 | // Compiler Options 35 | #pragma semicolon 1 36 | #pragma newdecls required 37 | 38 | 39 | // ConVars shop specific 40 | ConVar gc_iItemPrice; 41 | ConVar gc_sItemFlag; 42 | 43 | 44 | // Booleans shop specific 45 | bool g_bItem[MAXPLAYERS+1] = false; 46 | 47 | 48 | // Strings shop specific 49 | char g_sItemFlag[64]; 50 | char g_sPurchaseLogFile[PLATFORM_MAX_PATH]; 51 | 52 | 53 | // Handels shop specific 54 | Handle gF_hOnPlayerBuyItem; 55 | 56 | 57 | // Start 58 | public Plugin myinfo = 59 | { 60 | name = "ViewDoor for MyJailShop", 61 | author = "shanapu", 62 | description = "Open Door at View for MyJailShop", 63 | version = "1.0", 64 | url = "https://github.com/shanapu" 65 | }; 66 | 67 | 68 | public void OnPluginStart() 69 | { 70 | // Translation 71 | LoadTranslations("MyJailShop.phrases"); 72 | 73 | // Add new Convars to existing Items.cfg 74 | AutoExecConfig_SetFile("Items", "MyJailShop"); 75 | AutoExecConfig_SetCreateFile(true); 76 | 77 | // Register ConVars 78 | gc_iItemPrice = AutoExecConfig_CreateConVar("sm_jailshop_door_price", "1000", "Price of the Door perk"); 79 | gc_sItemFlag = AutoExecConfig_CreateConVar("sm_jailshop_door_flag", "", "Set flag for admin/vip must have to get access to Door. No flag = is available for all players!"); 80 | 81 | // Add new Convars to existing Items.cfg 82 | AutoExecConfig_ExecuteFile(); 83 | AutoExecConfig_CleanFile(); 84 | 85 | // Set file for Logs 86 | SetLogFile(g_sPurchaseLogFile, "purchase", "MyJailShop"); 87 | 88 | //Hook 89 | HookEvent("player_death", Event_PlayerDeath); 90 | } 91 | 92 | 93 | public void OnConfigsExecuted() 94 | { 95 | gc_sItemFlag.GetString(g_sItemFlag, sizeof(g_sItemFlag)); 96 | } 97 | 98 | 99 | // Here we add an new item to shop menu 100 | public void MyJailShop_OnShopMenu(int client, Menu menu) 101 | { 102 | if (GetClientTeam(client) == CS_TEAM_T) 103 | { 104 | char info[64]; 105 | Format(info, sizeof(info), "%t", "shop_menu_door", gc_iItemPrice.IntValue); 106 | 107 | if (MyJailShop_GetCredits(client) >= gc_iItemPrice.IntValue && MyJailShop_IsBuyTime() && IsPlayerAlive(client) && CheckVipFlag(client, g_sItemFlag)) 108 | AddMenuItem(menu, "Door", info); 109 | else if (CheckVipFlag(client, g_sItemFlag)) 110 | AddMenuItem(menu, "Door", info, ITEMDRAW_DISABLED); 111 | } 112 | } 113 | 114 | 115 | // What should we do when new item was picked? 116 | public void MyJailShop_OnShopMenuHandler(Menu menu, MenuAction action, int client, int itemNum) 117 | { 118 | if (!IsValidClient(client, false, false)) 119 | { 120 | return; 121 | } 122 | 123 | if (action == MenuAction_Select) 124 | { 125 | if (MyJailShop_IsBuyTime()) 126 | { 127 | char info[64]; 128 | menu.GetItem(itemNum, info, sizeof(info)); 129 | 130 | if (StrEqual(info, "Door")) 131 | { 132 | Item_Door(client, info); 133 | } 134 | } 135 | } 136 | 137 | return; 138 | } 139 | 140 | 141 | // The item transaction and last checks 142 | void Item_Door(int client, char[] name) 143 | { 144 | // is player alive? 145 | if (!IsPlayerAlive(client)) 146 | { 147 | CPrintToChat(client, "%t %t", "shop_tag", "shop_alive"); 148 | return; 149 | } 150 | 151 | // has player enough credits? 152 | if (MyJailShop_GetCredits(client) < gc_iItemPrice.IntValue) 153 | { 154 | CPrintToChat(client, "%t %t", "shop_tag", "shop_missingcredits", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 155 | return; 156 | } 157 | 158 | // with this we activate the item itself 159 | g_bItem[client] = true; 160 | 161 | 162 | // now we take his money & push the forward 163 | MyJailShop_SetCredits(client,(MyJailShop_GetCredits(client) - gc_iItemPrice.IntValue)); 164 | Forward_OnPlayerBuyItem(client, name); 165 | 166 | // announce it 167 | CPrintToChat(client, "%t %t", "shop_tag", "shop_door"); 168 | CPrintToChat(client, "%t %t", "shop_tag", "shop_costs", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 169 | 170 | // log it 171 | ConVar c_bLogging = FindConVar("sm_jailshop_log"); 172 | if (c_bLogging.BoolValue) 173 | { 174 | LogToFileEx(g_sPurchaseLogFile, "Player %L bought: Door", client); 175 | } 176 | 177 | } 178 | 179 | 180 | // Reset item on Player Death 181 | public void Event_PlayerDeath(Handle event, const char [] name, bool dontBroadcast) 182 | { 183 | int client = GetClientOfUserId(GetEventInt(event, "userid")); 184 | 185 | if (g_bItem[client]) 186 | { 187 | MyJailShop_OnResetPlayer(client); 188 | } 189 | } 190 | 191 | 192 | // Reset item on call 193 | public void MyJailShop_OnResetPlayer(int client) 194 | { 195 | g_bItem[client] = false; // remove the item in possession 196 | } 197 | 198 | 199 | // Forward MyJailShop_OnPlayerBuyItem 200 | void Forward_OnPlayerBuyItem(int client, char[] item) 201 | { 202 | Call_StartForward(gF_hOnPlayerBuyItem); 203 | Call_PushCell(client); 204 | Call_PushString(item); 205 | Call_Finish(); 206 | } 207 | 208 | public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) 209 | { 210 | gF_hOnPlayerBuyItem = CreateGlobalForward("MyJailShop_OnPlayerBuyItem", ET_Ignore, Param_Cell, Param_String); 211 | 212 | return APLRes_Success; 213 | } 214 | 215 | 216 | public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon) 217 | { 218 | if (!g_bItem[client] || !IsPlayerAlive(client)) 219 | return Plugin_Continue; 220 | 221 | if (buttons & IN_USE) 222 | { 223 | int target = GetClientAimTarget(client, false); 224 | 225 | if (target != -1) 226 | { 227 | char clsname[64]; 228 | GetEntityClassname(target, clsname, sizeof(clsname)); 229 | 230 | if (StrContains(clsname, "func_door") || StrContains(clsname, "func_movelinear")) 231 | { 232 | AcceptEntityInput(target, "Open"); 233 | g_bItem[client] = false; 234 | } 235 | } 236 | 237 | } 238 | return Plugin_Continue; 239 | } -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/myjailbreak.inc: -------------------------------------------------------------------------------- 1 | /* 2 | * MyJailbreak - Include File. 3 | * by: shanapu 4 | * https://github.com/shanapu/MyJailbreak/ 5 | * 6 | * This file is part of the MyJailbreak SourceMod Plugin. 7 | * 8 | * This program is free software; you can redistribute it and/or modify it under 9 | * the terms of the GNU General Public License, version 3.0, as published by the 10 | * Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, but WITHOUT 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15 | * details. 16 | * 17 | * You should have received a copy of the GNU General Public License along with 18 | * this program. If not, see . 19 | */ 20 | 21 | 22 | /****************************************************************************** 23 | STARTUP 24 | ******************************************************************************/ 25 | 26 | 27 | // Defines 28 | #define MYJB_VERSION "Beta 9.1.dev-" 29 | #define MYJB_URL_LINK "https://github.com/shanapu/MyJailbreak" 30 | 31 | 32 | #if defined _myjailbreak_included_ 33 | #endinput 34 | #endif 35 | #define _myjailbreak_included_ 36 | 37 | 38 | public SharedPlugin:__pl_myjailbreak = 39 | { 40 | name = "myjailbreak", 41 | file = "myjailbreak.smx", 42 | 43 | #if defined REQUIRE_PLUGIN 44 | required = 1, 45 | #else 46 | required = 0, 47 | #endif 48 | }; 49 | 50 | 51 | #if !defined REQUIRE_PLUGIN 52 | public __pl_myjailbreak_SetNTVOptional() 53 | { 54 | MarkNativeAsOptional("MyJailbreak_SetEventDayName"); 55 | MarkNativeAsOptional("MyJailbreak_GetEventDayName"); 56 | MarkNativeAsOptional("MyJailbreak_SetEventDayRunning"); 57 | MarkNativeAsOptional("MyJailbreak_IsEventDayRunning"); 58 | MarkNativeAsOptional("MyJailbreak_SetEventDayPlanned"); 59 | MarkNativeAsOptional("MyJailbreak_IsEventDayPlanned"); 60 | 61 | MarkNativeAsOptional("MyJailbreak_SetLastGuardRule"); 62 | MarkNativeAsOptional("MyJailbreak_IsLastGuardRule"); 63 | 64 | MarkNativeAsOptional("MyJailbreak_ActiveLogging"); 65 | 66 | MarkNativeAsOptional("MyJailbreak_FogOn"); 67 | MarkNativeAsOptional("MyJailbreak_FogOff"); 68 | 69 | MarkNativeAsOptional("MyJailbreak_BeaconOn"); 70 | MarkNativeAsOptional("MyJailbreak_BeaconOff"); 71 | } 72 | #endif 73 | 74 | 75 | 76 | /***************************************************************************** 77 | FORWARDS 78 | ******************************************************************************/ 79 | 80 | /********************************************************* 81 | * Called when a client trys to join the Guards(CT) or GuardQueue 82 | * 83 | * @param status Client ID 84 | * @return Return Plugin_Handled to block & Plugin_Continue to pass the client. 85 | *********************************************************/ 86 | forward Action MyJailbreak_OnJoinGuardQueue(int client); 87 | 88 | 89 | /********************************************************* 90 | * Called when a the Last Guard Rule is active 91 | * 92 | * @NoReturn 93 | *********************************************************/ 94 | forward void MyJailbreak_OnLastGuardRuleStart(); 95 | 96 | 97 | 98 | /********************************************************* 99 | * Called when a eventday has started 100 | * 101 | * @param EventDayName The name of the event day 102 | * @NoReturn 103 | *********************************************************/ 104 | forward void MyJailbreak_OnEventDayStart(char[] EventDayName); 105 | 106 | 107 | /********************************************************* 108 | * Called when a eventday has ended 109 | * 110 | * @param EventDayName The name of the event day 111 | * @param winner The winner team of this eventday. 0/1 = no winner 112 | * @NoReturn 113 | *********************************************************/ 114 | forward void MyJailbreak_OnEventDayEnd(char[] EventDayName, int winner); 115 | 116 | 117 | 118 | /****************************************************************************** 119 | NATIVES 120 | ******************************************************************************/ 121 | 122 | 123 | /********************************************************* 124 | * Set the name of the planned/running Event Day 125 | * 126 | * @param name The name of the Event Day 127 | * @NoReturn 128 | *********************************************************/ 129 | native void MyJailbreak_SetEventDayName(const char[] name); 130 | 131 | 132 | /********************************************************* 133 | * Get the name of the planned/running Event Day 134 | * 135 | * 136 | * @Return The name of the Event Day 137 | *********************************************************/ 138 | native void MyJailbreak_GetEventDayName(char[] name); 139 | 140 | 141 | /********************************************************* 142 | * Set Boolean Event Day is running 143 | * 144 | * @param status Boolean is running (true = running) 145 | * @param winner Winning team when event day ends 146 | * @NoReturn 147 | *********************************************************/ 148 | native void MyJailbreak_SetEventDayRunning(bool status, int winner); 149 | 150 | 151 | /********************************************************* 152 | * Check bool Event Day is running 153 | * 154 | * 155 | * @Return true on running, false if not 156 | *********************************************************/ 157 | native bool MyJailbreak_IsEventDayRunning(); 158 | 159 | 160 | /********************************************************* 161 | * Set Boolean Event Day is planned 162 | * 163 | * @param status Boolean is planned (true = running) 164 | * @NoReturn 165 | *********************************************************/ 166 | native void MyJailbreak_SetEventDayPlanned(bool status); 167 | 168 | 169 | /********************************************************* 170 | * Check bool Event Day is planned 171 | * 172 | * 173 | * @Return true on planned, false if not 174 | *********************************************************/ 175 | native bool MyJailbreak_IsEventDayPlanned(); 176 | 177 | 178 | /********************************************************* 179 | * Set Boolean Last Guard Rule is active 180 | * 181 | * @param status Boolean is active (true = active) 182 | * @NoReturn 183 | *********************************************************/ 184 | native void MyJailbreak_SetLastGuardRule(bool status); 185 | 186 | 187 | /********************************************************* 188 | * Check bool Last Guard Rule is active 189 | * 190 | * 191 | * @Return true on active, false if not 192 | *********************************************************/ 193 | native bool MyJailbreak_IsLastGuardRule(); 194 | 195 | 196 | /********************************************************* 197 | * Check bool is logging active 198 | * 199 | * 200 | * @Return true on active, false if not 201 | *********************************************************/ 202 | native bool MyJailbreak_ActiveLogging(); 203 | 204 | 205 | /********************************************************* 206 | * Set map fog 207 | * 208 | * 209 | * @noreturn 210 | *********************************************************/ 211 | native void MyJailbreak_FogOn(); 212 | 213 | 214 | /********************************************************* 215 | * Remove a map fog 216 | * 217 | * 218 | * @noreturn 219 | *********************************************************/ 220 | native void MyJailbreak_FogOff(); 221 | 222 | 223 | /********************************************************* 224 | * Set client Beacon 225 | * 226 | * 227 | * @noreturn 228 | *********************************************************/ 229 | native void MyJailbreak_BeaconOn(int client, float interval); 230 | 231 | 232 | /********************************************************* 233 | * Remove client Beacon (auto remove on mapend/playerdeath/roundend) 234 | * 235 | * 236 | * @noreturn 237 | *********************************************************/ 238 | native void MyJailbreak_BeaconOff(int client); -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/myjbwarden.inc: -------------------------------------------------------------------------------- 1 | /* 2 | * MyJailbreak - Warden Include File. 3 | * by: shanapu 4 | * https://github.com/shanapu/MyJailbreak/ 5 | * 6 | * This file is part of the MyJailbreak SourceMod Plugin. 7 | * 8 | * Copyright (C) 2016-2017 Thomas Schmidt (shanapu) 9 | * 10 | * This program is free software; you can redistribute it and/or modify it under 11 | * the terms of the GNU General Public License, version 3.0, as published by the 12 | * Free Software Foundation. 13 | * 14 | * This program is distributed in the hope that it will be useful, but WITHOUT 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 16 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 | * details. 18 | * 19 | * You should have received a copy of the GNU General Public License along with 20 | * this program. If not, see . 21 | */ 22 | 23 | #if defined _myjbwarden_included 24 | #endinput 25 | #endif 26 | #define _myjbwarden_included 27 | 28 | 29 | public SharedPlugin __pl_myjbwarden = 30 | { 31 | name = "warden", 32 | file = "warden.smx", 33 | 34 | #if defined REQUIRE_PLUGIN 35 | required = 1, 36 | #else 37 | required = 0, 38 | #endif 39 | }; 40 | 41 | 42 | #if !defined REQUIRE_PLUGIN 43 | public __pl_myjbwarden_SetNTVOptional() 44 | { 45 | MarkNativeAsOptional("warden_get"); 46 | MarkNativeAsOptional("warden_getlast"); 47 | 48 | MarkNativeAsOptional("warden_deputy_exist"); 49 | MarkNativeAsOptional("warden_deputy_isdeputy"); 50 | MarkNativeAsOptional("warden_deputy_set"); 51 | MarkNativeAsOptional("warden_deputy_remove"); 52 | MarkNativeAsOptional("warden_deputy_get"); 53 | MarkNativeAsOptional("warden_deputy_getlast"); 54 | 55 | MarkNativeAsOptional("warden_handcuffs_givepaperclip"); 56 | MarkNativeAsOptional("warden_handcuffs_iscuffed"); 57 | 58 | MarkNativeAsOptional("warden_freeday_set"); 59 | MarkNativeAsOptional("warden_freeday_has"); 60 | } 61 | #endif 62 | 63 | 64 | 65 | /********************************************************* 66 | * Called when a client trys to set/become warden 67 | * By player, admin, randomchoose... 68 | * 69 | * @param client The client who try to become warden 70 | * @param caller The client who called the set or become warden command 71 | * @return Return Plugin_Handled to block & Plugin_Continue to pass the client. 72 | *********************************************************/ 73 | forward Action warden_OnWardenCreate(int client, int caller); 74 | 75 | 76 | /********************************************************* 77 | * Called when a client become new warden 78 | * 79 | * @param client The client who is new warden 80 | * @NoReturn 81 | *********************************************************/ 82 | forward void warden_OnWardenCreatedByUser(int client); 83 | 84 | 85 | /********************************************************* 86 | * Called when a admin set a new warden 87 | * 88 | * @param client The client is new warden 89 | * @NoReturn 90 | *********************************************************/ 91 | forward void warden_OnWardenCreatedByAdmin(int client); 92 | 93 | 94 | /********************************************************* 95 | * Called when a the warden was removed by an admin 96 | * 97 | * @param client The admin who removed the warden 98 | * @NoReturn 99 | *********************************************************/ 100 | forward void warden_OnWardenRemovedByAdmin(int client); 101 | 102 | 103 | /********************************************************* 104 | * Called when a the warden retire hisself 105 | * 106 | * @param client The client who was warden 107 | * @NoReturn 108 | *********************************************************/ 109 | forward void warden_OnWardenRemovedBySelf(int client); 110 | 111 | 112 | /********************************************************* 113 | * Called when a the warden disconnect 114 | * 115 | * @param client The client who disconnected 116 | * @NoReturn 117 | *********************************************************/ 118 | forward void warden_OnWardenDisconnected(int client); 119 | 120 | 121 | /********************************************************* 122 | * Called when a the warden dies 123 | * 124 | * @param client The client who was warden 125 | * @NoReturn 126 | *********************************************************/ 127 | forward void warden_OnWardenDeath(int client); 128 | 129 | 130 | 131 | /********************************************************* 132 | * Called everytime the deputy position become free. 133 | * On depury dead, disconnect, removed, move to warden... 134 | * 135 | * @param client The client who was deputy 136 | * @NoReturn 137 | *********************************************************/ 138 | forward void warden_OnDeputyRemoved(int client); 139 | 140 | 141 | /********************************************************* 142 | * Called when a client trys to become deputy 143 | * By player, admin, randomchoose... 144 | * 145 | * @param client The client who try to become deputy 146 | * @NoReturn 147 | *********************************************************/ 148 | forward void warden_OnDeputyCreated(int client); 149 | 150 | 151 | 152 | /********************************************************* 153 | * get the current warden if he exists 154 | * 155 | * 156 | * @Return Client Index of warden 157 | *********************************************************/ 158 | native int warden_get(); 159 | 160 | 161 | /********************************************************* 162 | * get the last warden if he exist 163 | * 164 | * 165 | * @Return Client Index of last warden 166 | *********************************************************/ 167 | native int warden_getlast(); 168 | 169 | 170 | 171 | /********************************************************* 172 | * Checks if any Deputy exist 173 | * 174 | * 175 | * @Return true on match, false if not 176 | *********************************************************/ 177 | native bool warden_deputy_exist(); 178 | 179 | 180 | /********************************************************* 181 | * returns if client is Deputy 182 | * 183 | * @param client The client to run the check on 184 | * @Return true on match, false if not 185 | *********************************************************/ 186 | native bool warden_deputy_isdeputy(int client); 187 | 188 | 189 | /********************************************************* 190 | * Set a client as Deputy 191 | * 192 | * @param client The client to set as Deputy 193 | * @NoReturn 194 | *********************************************************/ 195 | native void warden_deputy_set(int client); 196 | 197 | 198 | /********************************************************* 199 | * Removes the current Deputy if he exists 200 | * 201 | * @param client The Deputy client to remove 202 | * @NoReturn 203 | *********************************************************/ 204 | native void warden_deputy_remove(int client); 205 | 206 | 207 | /********************************************************* 208 | * get the current Deputy if he exists 209 | * 210 | * 211 | * @Return Client index of deputy 212 | *********************************************************/ 213 | native int warden_deputy_get(); 214 | 215 | 216 | /********************************************************* 217 | * get the last deputy if he exists 218 | * 219 | * 220 | * @Return Client Index of last deputy 221 | *********************************************************/ 222 | native int warden_deputy_getlast(); 223 | 224 | 225 | 226 | /********************************************************* 227 | * Give a client a amount of paperclips 228 | * 229 | * @param client The client to give the paperclips 230 | * @param amount The amount of paperclips 231 | * @NoReturn 232 | *********************************************************/ 233 | native void warden_handcuffs_givepaperclip(int client, int amount); 234 | 235 | 236 | /********************************************************* 237 | * returns if client is in handcuffs 238 | * 239 | * @param client The client to run the check on 240 | * @Retrun true on match, false if not 241 | *********************************************************/ 242 | native bool warden_handcuffs_iscuffed(int client); 243 | 244 | 245 | 246 | /********************************************************* 247 | * Set the client get a freeday 248 | * 249 | * @param client The client to run the check on 250 | * @NoReturn 251 | *********************************************************/ 252 | native void warden_freeday_set(int client); 253 | 254 | 255 | /********************************************************* 256 | * returns if client has a freeday now 257 | * 258 | * @param client The client to run the check on 259 | * @Return true on match, false if not 260 | *********************************************************/ 261 | native bool warden_freeday_has(int client); -------------------------------------------------------------------------------- /addons/sourcemod/scripting/myjailshop_icegrenade.sp: -------------------------------------------------------------------------------- 1 | /* 2 | * MyJailShop - IceGrenade Item Module. 3 | * by: shanapu 4 | * https://github.com/shanapu/MyJailShop/ 5 | * 6 | * This file is part of the MyJailShop SourceMod Plugin. 7 | * 8 | * This program is free software; you can redistribute it and/or modify it under 9 | * the terms of the GNU General Public License, version 3.0, as published by the 10 | * Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, but WITHOUT 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15 | * details. 16 | * 17 | * You should have received a copy of the GNU General Public License along with 18 | * this program. If not, see . 19 | */ 20 | 21 | 22 | // Includes 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include // add new cvars to existing .cfg file 33 | 34 | 35 | #define FREEZE_SOUND "music/MyJailbreak/freeze.mp3" 36 | 37 | // Compiler Options 38 | #pragma semicolon 1 39 | #pragma newdecls required 40 | 41 | // ConVars shop specific 42 | ConVar gc_iItemPrice; 43 | ConVar gc_sItemFlag; 44 | ConVar gc_iItemOnlyTeam; 45 | ConVar gc_fItemTime; 46 | ConVar gc_fItemRadius; 47 | ConVar gc_sItemModel; 48 | ConVar gc_bItemAffectTeam; 49 | 50 | 51 | // Strings shop specific 52 | char g_sItemFlag[64]; 53 | char g_sItemModel[64]; 54 | char g_sPurchaseLogFile[PLATFORM_MAX_PATH]; 55 | 56 | 57 | //Bool 58 | bool g_bItem[MAXPLAYERS+1] = false; 59 | int g_iIceEntity[MAXPLAYERS+1] = -1; 60 | 61 | // Handels shop specific 62 | Handle gF_hOnPlayerBuyItem; 63 | 64 | 65 | // Start 66 | public Plugin myinfo = 67 | { 68 | name = "Ice Grenade item for MyJailShop", 69 | author = "shanapu", 70 | description = "Ice Grenade item for MyJailShop", 71 | version = "1.0", 72 | url = "https://github.com/shanapu" 73 | }; 74 | 75 | 76 | public void OnPluginStart() 77 | { 78 | // Translation 79 | LoadTranslations("MyJailShop.phrases"); 80 | 81 | // Add new Convars to existing Items.cfg 82 | AutoExecConfig_SetFile("Items", "MyJailShop"); 83 | AutoExecConfig_SetCreateFile(true); 84 | 85 | // Register ConVars 86 | gc_iItemPrice = AutoExecConfig_CreateConVar("sm_jailshop_icegrenade_price", "1000", "Price of the IceGrenade perk"); 87 | gc_sItemFlag = AutoExecConfig_CreateConVar("sm_jailshop_icegrenade_flag", "", "Set flag for admin/vip must have to get access to IceGrenade. No flag = is available for all players!"); 88 | gc_iItemOnlyTeam = AutoExecConfig_CreateConVar("sm_jailshop_icegrenade_access", "1", "0 - guards only, 1 - guards & prisoner, 2 - prisoner only", _, true, 0.0, true, 2.0); 89 | gc_fItemRadius = AutoExecConfig_CreateConVar("sm_jailshop_icegrenade_radius", "180", "Radius to freeze?"); 90 | gc_bItemAffectTeam = AutoExecConfig_CreateConVar("sm_jailshop_icegrenade_affect", "1", "0 - freeze only guards in radius , 1 - freeze guards & prisoner in radius ", _, true, 0.0, true, 1.0); 91 | gc_fItemTime = AutoExecConfig_CreateConVar("sm_jailshop_icegrenade_time", "12", "How many seconds the IceGrenade freeze?"); 92 | gc_sItemModel = AutoExecConfig_CreateConVar("sm_jailshop_icegrenade_model", "models/spree/spree.mdl", "path to the ice model"); 93 | 94 | // Add new Convars to existing Items.cfg 95 | AutoExecConfig_ExecuteFile(); 96 | AutoExecConfig_CleanFile(); 97 | 98 | HookEvent("flashbang_detonate", Event_FlashFlashDetonate, EventHookMode_Pre); 99 | 100 | // Set file for Logs 101 | SetLogFile(g_sPurchaseLogFile, "purchase", "MyJailShop"); 102 | } 103 | 104 | public void OnConfigsExecuted() 105 | { 106 | gc_sItemFlag.GetString(g_sItemFlag, sizeof(g_sItemFlag)); 107 | gc_sItemModel.GetString(g_sItemModel, sizeof(g_sItemModel)); 108 | 109 | if (!IsModelPrecached(g_sItemModel)) 110 | { 111 | PrecacheModel(g_sItemModel); 112 | } 113 | Downloader_AddFileToDownloadsTable(g_sItemModel); 114 | 115 | PrecacheSoundAnyDownload(FREEZE_SOUND); 116 | } 117 | 118 | 119 | // Here we add an new item to shop menu 120 | public void MyJailShop_OnShopMenu(int client, Menu menu) 121 | { 122 | if ((GetClientTeam(client) == CS_TEAM_CT && gc_iItemOnlyTeam.IntValue <= 1) || (GetClientTeam(client) == CS_TEAM_T && gc_iItemOnlyTeam.IntValue >= 1)) 123 | { 124 | char info[64]; 125 | Format(info, sizeof(info), "%t", "shop_menu_icegrenade", gc_iItemPrice.IntValue); 126 | 127 | if (MyJailShop_GetCredits(client) >= gc_iItemPrice.IntValue && MyJailShop_IsBuyTime() && IsPlayerAlive(client) && CheckVipFlag(client, g_sItemFlag)) 128 | AddMenuItem(menu, "IceGrenade", info); 129 | else if (CheckVipFlag(client, g_sItemFlag)) 130 | AddMenuItem(menu, "IceGrenade", info, ITEMDRAW_DISABLED); 131 | } 132 | } 133 | 134 | 135 | // What should we do when new item was picked? 136 | public void MyJailShop_OnShopMenuHandler(Menu menu, MenuAction action, int client, int itemNum) 137 | { 138 | if (!IsValidClient(client, false, false)) 139 | return; 140 | 141 | if (action == MenuAction_Select) 142 | { 143 | if (MyJailShop_IsBuyTime()) 144 | { 145 | char info[64]; 146 | menu.GetItem(itemNum, info, sizeof(info)); 147 | 148 | if (StrEqual(info, "IceGrenade")) 149 | { 150 | Item_icegrenade(client, info); 151 | } 152 | } 153 | } 154 | } 155 | 156 | 157 | // The item transaction and last checks 158 | void Item_icegrenade(int client, char[] name) 159 | { 160 | // is player alive? 161 | if (!IsPlayerAlive(client)) 162 | { 163 | CPrintToChat(client, "%t %t", "shop_tag", "shop_alive"); 164 | return; 165 | } 166 | 167 | // has player enough credits? 168 | if (MyJailShop_GetCredits(client) < gc_iItemPrice.IntValue) 169 | { 170 | CPrintToChat(client, "%t %t", "shop_tag", "shop_missingcredits", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 171 | return; 172 | } 173 | 174 | g_bItem[client] = true; 175 | GivePlayerItem(client, "weapon_flashbang"); 176 | 177 | // now we take his money & push the forward 178 | MyJailShop_SetCredits(client,(MyJailShop_GetCredits(client) - gc_iItemPrice.IntValue)); 179 | Forward_OnPlayerBuyItem(client, name); 180 | 181 | // announce it 182 | CPrintToChat(client, "%t %t", "shop_tag", "shop_icegrenade"); 183 | CPrintToChat(client, "%t %t", "shop_tag", "shop_costs", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 184 | 185 | // log it 186 | ConVar c_bLogging = FindConVar("sm_jailshop_log"); 187 | if (c_bLogging.BoolValue) 188 | { 189 | LogToFileEx(g_sPurchaseLogFile, "Player %L bought: IceGrenade", client); 190 | } 191 | } 192 | 193 | public Action Event_FlashFlashDetonate(Event event, const char[] name, bool dontBroadcast) 194 | { 195 | int client = GetClientOfUserId(event.GetInt("userid")); 196 | 197 | if (!g_bItem[client]) 198 | return; 199 | 200 | g_bItem[client] = false; 201 | 202 | float DetonateOrigin[3]; 203 | DetonateOrigin[0] = event.GetFloat("x"); 204 | DetonateOrigin[1] = event.GetFloat("y"); 205 | DetonateOrigin[2] = event.GetFloat("z"); 206 | 207 | for (int i = 1; i <= MaxClients; i++) 208 | { 209 | // Check that client is a real player who is alive and is a CT 210 | if (IsValidClient(i, true, true)) 211 | { 212 | if (!gc_bItemAffectTeam.BoolValue && GetClientTeam(i) == CS_TEAM_T) 213 | continue; 214 | 215 | float vec[3]; 216 | GetClientAbsOrigin(i, vec); 217 | 218 | float distance = GetVectorDistance(vec, DetonateOrigin, false); 219 | 220 | if (RoundToFloor(gc_fItemRadius.FloatValue - (distance / 2.0)) <= 0) // distance to ground zero 221 | continue; 222 | 223 | g_iIceEntity[i] = CreateEntityByName("prop_dynamic_override"); 224 | 225 | if (g_iIceEntity[i] == -1) 226 | return; 227 | 228 | SetEntityModel(g_iIceEntity[i], g_sItemModel); 229 | SetEntProp(g_iIceEntity[i], Prop_Send, "m_nSolidType", 6); 230 | 231 | TeleportEntity(g_iIceEntity[i], vec, NULL_VECTOR, NULL_VECTOR); 232 | SetEntityMoveType(i, MOVETYPE_NONE); 233 | 234 | EnableWeaponFire(i, false); 235 | 236 | CreateTimer(gc_fItemTime.FloatValue, Timer_Unfreeze, GetClientUserId(i)); 237 | } 238 | } 239 | 240 | EmitSoundToAllAny(FREEZE_SOUND); 241 | } 242 | 243 | public Action Timer_Unfreeze(Handle timer, int userid) 244 | { 245 | int client = GetClientOfUserId(userid); 246 | 247 | if (!IsValidClient(client, true, true)) 248 | return Plugin_Handled; 249 | 250 | SetEntityMoveType(client, MOVETYPE_WALK); 251 | EnableWeaponFire(client); 252 | 253 | if (g_iIceEntity[client] == -1) 254 | return Plugin_Handled; 255 | 256 | AcceptEntityInput(g_iIceEntity[client], "kill"); 257 | g_iIceEntity[client] = -1; 258 | 259 | return Plugin_Handled; 260 | } 261 | 262 | // Forward MyJailShop_OnPlayerBuyItem 263 | void Forward_OnPlayerBuyItem(int client, char[] item) 264 | { 265 | Call_StartForward(gF_hOnPlayerBuyItem); 266 | Call_PushCell(client); 267 | Call_PushString(item); 268 | Call_Finish(); 269 | } 270 | 271 | public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) 272 | { 273 | gF_hOnPlayerBuyItem = CreateGlobalForward("MyJailShop_OnPlayerBuyItem", ET_Ignore, Param_Cell, Param_String); 274 | 275 | return APLRes_Success; 276 | } -------------------------------------------------------------------------------- /addons/sourcemod/translations/it/MyJailShop.phrases.txt: -------------------------------------------------------------------------------- 1 | // Exported from SourceMod Translator 2 | // Date: 2017-02-20 16:12:11 UTC 3 | // Language: Italian (it) 4 | // 5 | // To view other translations for this plugin, please visit: 6 | // http://translator.mitchdempsey.com/sourcemod_plugins/268 7 | // 8 | "Phrases" 9 | { 10 | 11 | "shop_alive" 12 | { 13 | "it" "Devi essere vivo per comprare questo oggetto!" 14 | } 15 | 16 | "shop_alreadyopen" 17 | { 18 | "it" "Le celle sono gia' aperte." 19 | } 20 | 21 | "shop_awp" 22 | { 23 | "it" "Hai comprato: AWP con un proiettile, impara ad usarlo!" 24 | } 25 | 26 | "shop_bhop" 27 | { 28 | "it" "Ora sai Bunnyhoppare, divertiti!" 29 | } 30 | 31 | "shop_bird" 32 | { 33 | "it" "Sei un uccello! Attiva la fly con '+dropweapon'" 34 | } 35 | 36 | "shop_buytime" 37 | { 38 | "it" "Non puoi piu' usare shop, aspetta il prossimo round." 39 | } 40 | 41 | "shop_costs" 42 | { 43 | "it" "Costo: {2} ¢redits. Ora hai {1} ¢rediti" 44 | } 45 | 46 | "shop_credits" 47 | { 48 | "it" "Hai attualmente: {1} ¢redits!" 49 | } 50 | 51 | "shop_dead" 52 | { 53 | "it" "Devi essere morto per comprare questo oggetto!" 54 | } 55 | 56 | "shop_deagle" 57 | { 58 | "it" "Hai comprato: Deagle con un caricatore, impara ad usarla!" 59 | } 60 | 61 | "shop_disabled" 62 | { 63 | "it" "Lo shop e' attualmente {purple}disabilitato{default}!" 64 | } 65 | 66 | "shop_firegrenade" 67 | { 68 | "it" "Hai comprato: HE that burn the opponent!" 69 | } 70 | 71 | "shop_froggyjump" 72 | { 73 | "it" "Ora salti come una rana!" 74 | } 75 | 76 | "shop_fulllive" 77 | { 78 | "it" "La tua vita e' gia' al completo!" 79 | } 80 | 81 | "shop_get" 82 | { 83 | "it" "Non ti puoi inviare da solo crediti." 84 | } 85 | 86 | "shop_getset" 87 | { 88 | "it" "I tuoi ¢rediti sono stati impostati a {1} da {2}" 89 | } 90 | 91 | "shop_give" 92 | { 93 | "it" "Hai dato {1} ¢rediti a {2}" 94 | } 95 | 96 | "shop_gravity" 97 | { 98 | "it" "Ora hai la bassa gravita'!" 99 | } 100 | 101 | "shop_heal" 102 | { 103 | "it" "Ti sei curato!" 104 | } 105 | 106 | "shop_health" 107 | { 108 | "it" "Ora hai +{1}HP con il kevlar + elmo!" 109 | } 110 | 111 | "shop_invisible" 112 | { 113 | "it" "Ora sei invisibile per {1} secondi!" 114 | } 115 | 116 | "shop_killedct" 117 | { 118 | "it" "Hai guadagnato {2} ¢rediti per avere ucciso una guardia {3}. Ora ne hai': {1}¢" 119 | } 120 | 121 | "shop_killedt" 122 | { 123 | "it" "Hai guadagnato {2} ¢rediti per avere ucciso un terrorista {3}. Ora ne hai': {1}¢" 124 | } 125 | 126 | "shop_knife" 127 | { 128 | "it" "Hai comprato: un colltello che one-shotta!" 129 | } 130 | 131 | "shop_lastrequest" 132 | { 133 | "it" "Hai guadagnato {2} ¢rediti per aver raggiunto l'ultima richiesta. Ora ne hai': {1}¢" 134 | } 135 | 136 | "shop_max" 137 | { 138 | "it" "Hai gia' comprato questo oggetto in questo round, aspetta il prossimo round per ricomprarlo." 139 | } 140 | 141 | "shop_maxcredits" 142 | { 143 | "it" "I tuoi ¢rediti nello shop: {1}, limite massimo raggiunto!" 144 | } 145 | 146 | "shop_menu_armor" 147 | { 148 | "it" "Armatura [{1}¢]" 149 | } 150 | 151 | "shop_menu_awp" 152 | { 153 | "it" "AWP con un proiettile [{1}¢]" 154 | } 155 | 156 | "shop_menu_bhop" 157 | { 158 | "it" "BunnyHop [{1}¢]" 159 | } 160 | 161 | "shop_menu_bird" 162 | { 163 | "it" "Diventa un uccello [{1}¢]" 164 | } 165 | 166 | "shop_menu_deagle" 167 | { 168 | "it" "Deagle con un caricatore [{1}¢]" 169 | } 170 | 171 | "shop_menu_firegrenade" 172 | { 173 | "it" "Napalm HE [{1}¢]" 174 | } 175 | 176 | "shop_menu_froggyjump" 177 | { 178 | "it" "Salto da rana [{1}¢]" 179 | } 180 | 181 | "shop_menu_gravity" 182 | { 183 | "it" "Bassa gravita' [{1}¢]" 184 | } 185 | 186 | "shop_menu_heal" 187 | { 188 | "it" "Vita [{1}¢]" 189 | } 190 | 191 | "shop_menu_health" 192 | { 193 | "it" "+{2}hp e armatura [{1}¢]" 194 | } 195 | 196 | "shop_menu_invisible" 197 | { 198 | "it" "Invisibilita' per {2} sec. [{1}¢]" 199 | } 200 | 201 | "shop_menu_knife" 202 | { 203 | "it" "Coltello one-hit [{1}¢]" 204 | } 205 | 206 | "shop_menu_model" 207 | { 208 | "it" "Modello da guardia [{1}¢]" 209 | } 210 | 211 | "shop_menu_molotov" 212 | { 213 | "it" "Molotov + 2 flash [{1}¢]" 214 | } 215 | 216 | "shop_menu_noclip" 217 | { 218 | "it" "No Clip per {2} sec. [{1}¢]" 219 | } 220 | 221 | "shop_menu_nodamage" 222 | { 223 | "it" "Immortalita' per 20 secondi [{1}¢]" 224 | } 225 | 226 | "shop_menu_openjail" 227 | { 228 | "it" "Scassina le celle [{1}¢]" 229 | } 230 | 231 | "shop_menu_playercredits" 232 | { 233 | "it" "¢rediti dei giocatori nello shop:" 234 | } 235 | 236 | "shop_menu_player¢redits" 237 | { 238 | "it" "¢rediti dei giocatori nello shop:" 239 | } 240 | 241 | "shop_menu_poisonsmoke" 242 | { 243 | "it" "Smoke avvelenata [{1}¢]" 244 | } 245 | 246 | "shop_menu_revive" 247 | { 248 | "it" "Resuscita [{1}¢]" 249 | } 250 | 251 | "shop_menu_taser" 252 | { 253 | "it" "Taser con 3 munizioni [{1}¢]" 254 | } 255 | 256 | "shop_menu_teleportsmoke" 257 | { 258 | "it" "Smoke teletrasporto [{1}¢]" 259 | } 260 | 261 | "shop_menu_throwingknife" 262 | { 263 | "it" "one-hit coltello lanciabile [{1}¢]" 264 | } 265 | 266 | "shop_menu_title" 267 | { 268 | "it" "Jail Shop. Possiedi {1}¢" 269 | } 270 | 271 | "shop_menu_vampire" 272 | { 273 | "it" "Vampiro [{1}¢]" 274 | } 275 | 276 | "shop_menu_wallhack" 277 | { 278 | "it" "Wallhack [{1}¢]" 279 | } 280 | 281 | "shop_missingcredits" 282 | { 283 | "it" "I tuoi ¢rediti: {1} (Non ne' hai abbastanza. Te ne' servono: {2}¢)" 284 | } 285 | 286 | "shop_model" 287 | { 288 | "it" "Ora sei travestito da guardia, stai attento!" 289 | } 290 | 291 | "shop_molotov" 292 | { 293 | "it" "Hai comprato: Molotov + 2 flashs!" 294 | } 295 | 296 | "shop_noclip" 297 | { 298 | "it" "Ora hai la noclip per {1} secondi!" 299 | } 300 | 301 | "shop_noclipend" 302 | { 303 | "it" "La NoClip e' finita!" 304 | } 305 | 306 | "shop_nodamage" 307 | { 308 | "it" "Ora sei immortale per {1} secondi!" 309 | } 310 | 311 | "shop_onlyt" 312 | { 313 | "it" "Questo oggetto e' solo per i prigionieri!" 314 | } 315 | 316 | "shop_opencell" 317 | { 318 | "it" "Hai scassinato le celle." 319 | } 320 | 321 | "shop_opencellall" 322 | { 323 | "it" "{1} ha scassinato tutte le celle con lo shop" 324 | } 325 | 326 | "shop_playtime" 327 | { 328 | "it" "Hai ottenuto {1} ¢rediti per avere giocato un questo server" 329 | } 330 | 331 | "shop_poisensmoke" 332 | { 333 | "it" "Hai comprato: Poison Smoke!" 334 | } 335 | 336 | "shop_revived" 337 | { 338 | "it" "{1} e' resuscitato!" 339 | } 340 | 341 | "shop_revivehint" 342 | { 343 | "it" "Sei morto, puoi usare !revive per resuscitarti al costo di {1} crediti!" 344 | } 345 | 346 | "shop_set" 347 | { 348 | "it" "Hai impostato i ¢rediti a {2} a {1}" 349 | } 350 | 351 | "shop_tag" 352 | { 353 | "it" "[{green}jail.shop{default}]" 354 | } 355 | 356 | "shop_taser" 357 | { 358 | "it" "Hai comprato: Taser con 3 munizioni, impara ad usarlo!" 359 | } 360 | 361 | "shop_teleportsmoke" 362 | { 363 | "it" "Hai comprato: Teleporter Smoke!" 364 | } 365 | 366 | "shop_throwingknife" 367 | { 368 | "it" "Hai comprato: Throwing knife!" 369 | } 370 | 371 | "shop_tonly" 372 | { 373 | "it" "Shop solo per i prigionieri!" 374 | } 375 | 376 | "shop_unnodamage" 377 | { 378 | "it" "Sei nuovamente mortale!" 379 | } 380 | 381 | "shop_vapire" 382 | { 383 | "it" "Ora sei un vampiro!" 384 | } 385 | 386 | "shop_visible" 387 | { 388 | "it" "Sei nuovamente visibile!" 389 | } 390 | 391 | "shop_wallhack" 392 | { 393 | "it" "Ora hai la Wallhack!" 394 | } 395 | 396 | "shop_welcome" 397 | { 398 | "it" "Digita !jailshop per aprire lo shop. Uccidi/vinci/gioca per vincere ¢rediti per lo shop." 399 | } 400 | 401 | "shop_menu_paperclip" 402 | { 403 | "it" "Prendi {2} graffetta(e). [{1}¢]" 404 | } 405 | 406 | "shop_paperclip" 407 | { 408 | "it" "Hai comprato: {1} graffetta(e) per le manette!" 409 | } 410 | 411 | "shop_unwallhack" 412 | { 413 | "it" "La Wallhack e' finita!" 414 | } 415 | 416 | "shop_win" 417 | { 418 | "it" "Hai guadagnato {2} ¢crediti per avere vinto il round. Ora ne hai': {1}¢" 419 | } 420 | 421 | "shop_giftyourself" 422 | { 423 | "it" "Non ti puoi inviare da solo crediti." 424 | } 425 | 426 | "shop_onlyct" 427 | { 428 | "it" "Quest'oggetto e' solo per le guardie!" 429 | } 430 | 431 | "shop_saleon" 432 | { 433 | "it" "Sconti Attivi! Tutti gli oggetti hanno il {1}%% di sconto!" 434 | } 435 | 436 | "shop_saleend" 437 | { 438 | "it" "Saldi finiti!" 439 | } 440 | 441 | "shop_menu_title_sale" 442 | { 443 | "it" "%%SALE%% {1}%% sconto!" 444 | } 445 | 446 | "shop_jetpack" 447 | { 448 | "it" "Hai comprato: Jetpack | premi CTRL + SPAZIO (duck+jump)" 449 | } 450 | 451 | "shop_jetpack" 452 | { 453 | "it" "Hai comprato: Jetpack | premi CTRL + SPAZIO (duck+jump)" 454 | } 455 | 456 | "shop_jihad" 457 | { 458 | "it" "Hai comprato: Bomba dello Jihad | premi Mouse1 + E (attack+use)" 459 | } 460 | 461 | "shop_menu_door" 462 | { 463 | "it" "Apri la porta alla quale stai guardando [{1}¢]" 464 | } 465 | 466 | "shop_door" 467 | { 468 | "it" "Hai comprato: Apri la porta alla quale stai guardando | premi E (use) mentre la guardi" 469 | } 470 | 471 | "shop_menu_blackout" 472 | { 473 | "it" "Blackout - mappa oscurata [{1}¢]" 474 | } 475 | 476 | "shop_blackout" 477 | { 478 | "it" "Hai comprato: Blackout - Zzztt..." 479 | } 480 | 481 | "shop_blackout_all" 482 | { 483 | "it" "Abbiamo un grave dispersione di energia!" 484 | } 485 | 486 | } 487 | -------------------------------------------------------------------------------- /addons/sourcemod/translations/hu/MyJailShop.phrases.txt: -------------------------------------------------------------------------------- 1 | // Exported from SourceMod Translator 2 | // Date: 2018-08-20 21:17:57 UTC 3 | // Language: Hungarian (hu) 4 | // 5 | // To view other translations for this plugin, please visit: 6 | // http://translator.mitchdempsey.com/sourcemod_plugins/268 7 | // 8 | "Phrases" 9 | { 10 | 11 | "shop_alive" 12 | { 13 | "hu" "Életben kell legyél ,hogy ezt a tárgyat megvedd!" 14 | } 15 | 16 | "shop_alreadyopen" 17 | { 18 | "hu" "A cellák kivannak nyitva." 19 | } 20 | 21 | "shop_awp" 22 | { 23 | "hu" "Megvásároltad: AWP egy darab lőszerrel!" 24 | } 25 | 26 | "shop_bhop" 27 | { 28 | "hu" "A BunnyHop-od aktiv!" 29 | } 30 | 31 | "shop_bird" 32 | { 33 | "hu" "Egy madár lettél! (+dropweapon (Konzolba))" 34 | } 35 | 36 | "shop_buytime" 37 | { 38 | "hu" "A vásárlási idő lejárt. A következő körben újra elérhető lesz." 39 | } 40 | 41 | "shop_costs" 42 | { 43 | "hu" "Költöttél: {2} ¢reditet. Most {1} ¢redited van." 44 | } 45 | 46 | "shop_credits" 47 | { 48 | "hu" "Jelenlegi ¢rediteid: {1}!" 49 | } 50 | 51 | "shop_dead" 52 | { 53 | "hu" "Halottnak kell lenned ,hogy újraéledj!" 54 | } 55 | 56 | "shop_deagle" 57 | { 58 | "hu" "Vásároltál: Deagle 7 lőszerrel." 59 | } 60 | 61 | "shop_disabled" 62 | { 63 | "hu" "A !shop jelenleg {red}nem aktiv{default}!" 64 | } 65 | 66 | "shop_firegrenade" 67 | { 68 | "hu" "Vásároltál: Gyújtógránát." 69 | } 70 | 71 | "shop_froggyjump" 72 | { 73 | "hu" "Elérhető a békaugrásod!" 74 | } 75 | 76 | "shop_fulllive" 77 | { 78 | "hu" "Az életerőd maximális!" 79 | } 80 | 81 | "shop_get" 82 | { 83 | "hu" "Nem adhatod magadnak." 84 | } 85 | 86 | "shop_getset" 87 | { 88 | "hu" "A ¢rediteid beállitva {1}. Beállitotta {2}" 89 | } 90 | 91 | "shop_give" 92 | { 93 | "hu" "A gravitációd szintje kisebbítve." 94 | } 95 | 96 | "shop_gravity" 97 | { 98 | "hu" "A gravitációd szintje kisebbítve." 99 | } 100 | 101 | "shop_heal" 102 | { 103 | "hu" "Az életerőd megnövelve!" 104 | } 105 | 106 | "shop_health" 107 | { 108 | "hu" "Kaptál +{1}HP -t és +100ARMOR-t!" 109 | } 110 | 111 | "shop_invisible" 112 | { 113 | "hu" "Láthatatlan lettél {1} másodpercig!" 114 | } 115 | 116 | "shop_killedct" 117 | { 118 | "hu" "Kaptál {2} ¢reditet ,mert megölted {3} őrt. Most {1} ¢redited van" 119 | } 120 | 121 | "shop_killedt" 122 | { 123 | "hu" "Kaptál {2} ¢reditet ,mert megölted {3} rabot. Jelenleg {1} ¢redited van" 124 | } 125 | 126 | "shop_knife" 127 | { 128 | "hu" "Vásároltál: Egy ütéses kést!" 129 | } 130 | 131 | "shop_lastrequest" 132 | { 133 | "hu" "Kaptál {2} ¢reditet ,mert eljutottál az lr-ig. Jelenleg: {1} ¢redited van." 134 | } 135 | 136 | "shop_max" 137 | { 138 | "hu" "Már vásároltál ebből a tárgyból a kör folyamán, várj a következő körig." 139 | } 140 | 141 | "shop_maxcredits" 142 | { 143 | "hu" "A ¢rediteid: {1}, elérted a maximumot!" 144 | } 145 | 146 | "shop_menu_armor" 147 | { 148 | "hu" "Páncél [{1}¢]" 149 | } 150 | 151 | "shop_menu_awp" 152 | { 153 | "hu" "AWP 1 lőszerrel [{1}¢]" 154 | } 155 | 156 | "shop_menu_bhop" 157 | { 158 | "hu" "BunnyHop [{1}¢]" 159 | } 160 | 161 | "shop_menu_bird" 162 | { 163 | "hu" "Legyél madár [{1}¢]" 164 | } 165 | 166 | "shop_menu_deagle" 167 | { 168 | "hu" "Deagle 1 tárral [{1}¢]" 169 | } 170 | 171 | "shop_menu_firegrenade" 172 | { 173 | "hu" "Gyújtógránát" 174 | } 175 | 176 | "shop_menu_froggyjump" 177 | { 178 | "hu" "Béka ugrás [{1}¢]" 179 | } 180 | 181 | "shop_menu_gravity" 182 | { 183 | "hu" "Kissebb gravitáció [{1}¢]" 184 | } 185 | 186 | "shop_menu_heal" 187 | { 188 | "hu" "Élet [{1}¢]" 189 | } 190 | 191 | "shop_menu_health" 192 | { 193 | "hu" "+{2}hp és armor [{1}¢]" 194 | } 195 | 196 | "shop_menu_invisible" 197 | { 198 | "hu" "Láthatatlanság {2} másodpercre. [{1}¢]" 199 | } 200 | 201 | "shop_menu_knife" 202 | { 203 | "hu" "Egy ütéses kés [{1}¢]" 204 | } 205 | 206 | "shop_menu_model" 207 | { 208 | "hu" "Őr modell [{1}¢]" 209 | } 210 | 211 | "shop_menu_molotov" 212 | { 213 | "hu" "Molotov + 2 flash [{1}¢]" 214 | } 215 | 216 | "shop_menu_noclip" 217 | { 218 | "hu" "Végtelen tár {2} másodpercig. [{1}¢]" 219 | } 220 | 221 | "shop_menu_nodamage" 222 | { 223 | "hu" "Sebezhetetlenség 20 másodpercig [{1}¢]" 224 | } 225 | 226 | "shop_menu_openjail" 227 | { 228 | "hu" "Cellák kinyitása [{1}¢]" 229 | } 230 | 231 | "shop_menu_playercredits" 232 | { 233 | "hu" "Játékosok ¢reditei a boltban:" 234 | } 235 | 236 | "shop_menu_player¢redits" 237 | { 238 | "hu" "Játékos ¢reditei a boltban:" 239 | } 240 | 241 | "shop_menu_poisonsmoke" 242 | { 243 | "hu" "Mérgező füstgránát [{1}¢]" 244 | } 245 | 246 | "shop_menu_revive" 247 | { 248 | "hu" "Újraéledés [{1}¢]" 249 | } 250 | 251 | "shop_menu_taser" 252 | { 253 | "hu" "Sokkoló 3 tölténnyel [{1}¢]" 254 | } 255 | 256 | "shop_menu_teleportsmoke" 257 | { 258 | "hu" "Teleportáló füstgránát [{1}¢]" 259 | } 260 | 261 | "shop_menu_throwingknife" 262 | { 263 | "hu" "Egy ütéses kés [{1}¢]" 264 | } 265 | 266 | "shop_menu_title" 267 | { 268 | "hu" "Shop. Neked {1}¢redited van" 269 | } 270 | 271 | "shop_menu_vampire" 272 | { 273 | "hu" "Gyorsaság + Nagyobb sebzés [{1}¢]" 274 | } 275 | 276 | "shop_menu_wallhack" 277 | { 278 | "hu" "Wallhack [{1}¢]" 279 | } 280 | 281 | "shop_missingcredits" 282 | { 283 | "hu" "A ¢rediteid: {1} (Nincs elég ¢redited. Kell: {2} ¢redit)" 284 | } 285 | 286 | "shop_model" 287 | { 288 | "hu" "Álcázva lettél őrként legyél óvatos a nametag-ed észrevehetik. Csak a kinézeted változott!" 289 | } 290 | 291 | "shop_molotov" 292 | { 293 | "hu" "Vásároltál: Molotov + 2 flash!" 294 | } 295 | 296 | "shop_noclip" 297 | { 298 | "hu" "Végtelen tár {1} másodpercig!" 299 | } 300 | 301 | "shop_nodamage" 302 | { 303 | "hu" "Halhatatlan lettél {1} másodpercre." 304 | } 305 | 306 | "shop_onlyt" 307 | { 308 | "hu" "Ez a tárgy csak raboknak elérhető!" 309 | } 310 | 311 | "shop_opencell" 312 | { 313 | "hu" "Kinyitottad a cellákat!" 314 | } 315 | 316 | "shop_opencellall" 317 | { 318 | "hu" "{1} kinyitotta a cella ajtókat." 319 | } 320 | 321 | "shop_playtime" 322 | { 323 | "hu" "Kaptál {1} ¢reditet a szerveren eltöltött idődért" 324 | } 325 | 326 | "shop_poisensmoke" 327 | { 328 | "hu" "Vásároltál: Mérgező füstgránát." 329 | } 330 | 331 | "shop_revived" 332 | { 333 | "hu" "{1} újraélesztve!" 334 | } 335 | 336 | "shop_revivehint" 337 | { 338 | "hu" "Meghaltál, használhatod a !revive -ot {1} creditért!" 339 | } 340 | 341 | "shop_set" 342 | { 343 | "hu" "Beállitottad {2} ¢rediteit erre: {1}" 344 | } 345 | 346 | "shop_tag" 347 | { 348 | "hu" "[{green}shop{default}]" 349 | } 350 | 351 | "shop_taser" 352 | { 353 | "hu" "Vásároltál: Sokkoló 3 lövéssel." 354 | } 355 | 356 | "shop_teleportsmoke" 357 | { 358 | "hu" "Vásároltál: Teleportáló füstgránát!" 359 | } 360 | 361 | "shop_throwingknife" 362 | { 363 | "hu" "Vásároltál: Dobókés." 364 | } 365 | 366 | "shop_tonly" 367 | { 368 | "hu" "A bolt csak bűnözőknek elérhető!" 369 | } 370 | 371 | "shop_unnodamage" 372 | { 373 | "hu" "Mostmár újra sebezhető vagy!" 374 | } 375 | 376 | "shop_vapire" 377 | { 378 | "hu" "Gyorsaság és Nagyobb sebzés aktiválva!" 379 | } 380 | 381 | "shop_vapire" 382 | { 383 | "hu" "Gyorsagá" 384 | } 385 | 386 | "shop_visible" 387 | { 388 | "hu" "Most már újra látható vagy!" 389 | } 390 | 391 | "shop_wallhack" 392 | { 393 | "hu" "Most aktiv a wallhack-ed!" 394 | } 395 | 396 | "shop_welcome" 397 | { 398 | "hu" "A vásárlás elérhető a rabok számára: !shop a chat-be. Ölj/Nyerj/Játssz ,hogy ¢reditet szerezz a vásárláshoz!" 399 | } 400 | 401 | "shop_menu_paperclip" 402 | { 403 | "hu" "Kapsz {2} paperclip. [{1}¢]" 404 | } 405 | 406 | "shop_paperclip" 407 | { 408 | "hu" "Vásároltál {1} paperclip-et bilincshez!" 409 | } 410 | 411 | "shop_unwallhack" 412 | { 413 | "hu" "A Wallhack lejárt!" 414 | } 415 | 416 | "shop_win" 417 | { 418 | "hu" "Kaptál {2} ¢reditet ,mert megnyerted a kört. Jelenleg {1} ¢redited van." 419 | } 420 | 421 | "shop_giftyourself" 422 | { 423 | "hu" "Nem adhatod magadnak." 424 | } 425 | 426 | "shop_onlyct" 427 | { 428 | "hu" "Ez a vásárlás csak az őröknek elérhető!" 429 | } 430 | 431 | "shop_saleon" 432 | { 433 | "hu" "Minden tárgy eladó {1}% kedvezményben!" 434 | } 435 | 436 | "shop_saleend" 437 | { 438 | "hu" "Eladás befejezve!" 439 | } 440 | 441 | "shop_menu_title_sale" 442 | { 443 | "hu" "%%Eladás%% {1}%% kedvezmény!" 444 | } 445 | 446 | "shop_randomtp" 447 | { 448 | "hu" "Teleportáltak: {1}!" 449 | } 450 | 451 | "shop_randomtp_teleported" 452 | { 453 | "hu" "{1} hozzád teleportált!" 454 | } 455 | 456 | "shop_menu_randomtp" 457 | { 458 | "hu" "Teleportálás egy véletlenszerű rabhoz [{1}¢]" 459 | } 460 | 461 | "shop_menu_jetpack" 462 | { 463 | "hu" "Jetpack [{1}¢]" 464 | } 465 | 466 | "shop_jetpack" 467 | { 468 | "hu" "Vásároltál: Jetpack | Nyomd meg a CTRL + SPACE" 469 | } 470 | 471 | "shop_menu_jihad" 472 | { 473 | "hu" "Jihad bomba [{1}¢]" 474 | } 475 | 476 | "shop_jihad" 477 | { 478 | "hu" "Vásároltál: Jihad bomba | Nyomd meg a Mouse1 + E" 479 | } 480 | 481 | "shop_menu_door" 482 | { 483 | "hu" "Ajtó nyitás [{1}¢]" 484 | } 485 | 486 | "shop_door" 487 | { 488 | "hu" "Vásároltál: Nyisd ki az ajtót nézetben | nyomd meg az E-betűt miközben nézed az ajtót." 489 | } 490 | 491 | "shop_menu_blackout" 492 | { 493 | "hu" "Map besötétités [{1}¢]" 494 | } 495 | 496 | "shop_blackout" 497 | { 498 | "hu" "Vásároltál: Blackout" 499 | } 500 | 501 | "shop_blackout_all" 502 | { 503 | "hu" "Van egy kritikus áramkimaradás!" 504 | } 505 | 506 | } 507 | -------------------------------------------------------------------------------- /addons/sourcemod/translations/pl/MyJailShop.phrases.txt: -------------------------------------------------------------------------------- 1 | // Exported from SourceMod Translator 2 | // Date: 2018-08-20 21:17:56 UTC 3 | // Language: Polish (pl) 4 | // 5 | // To view other translations for this plugin, please visit: 6 | // http://translator.mitchdempsey.com/sourcemod_plugins/268 7 | // 8 | "Phrases" 9 | { 10 | 11 | "shop_alive" 12 | { 13 | "pl" "Musisz być żywy, aby zakupuć ten przedmiot!" 14 | } 15 | 16 | "shop_alreadyopen" 17 | { 18 | "pl" "Cele są już otwarte!" 19 | } 20 | 21 | "shop_awp" 22 | { 23 | "pl" "Zakupiłeś: AWP z jednym nabojem, spożytkuj dobrze!" 24 | } 25 | 26 | "shop_bhop" 27 | { 28 | "pl" "Teraz masz BunnyHop!" 29 | } 30 | 31 | "shop_bird" 32 | { 33 | "pl" "Jesteś ptakiem! Kieruj '+dropweapon'" 34 | } 35 | 36 | "shop_buytime" 37 | { 38 | "pl" "Czas na zakup minął." 39 | } 40 | 41 | "shop_costs" 42 | { 43 | "pl" "Koszt: {2} kredytów. Aktualnie posiadasz {1} kredytów" 44 | } 45 | 46 | "shop_credits" 47 | { 48 | "pl" "Aktualnie posiadasz: {1} kredytów!" 49 | } 50 | 51 | "shop_dead" 52 | { 53 | "pl" "Musisz być nie żywy, aby użyć tego przedmiotu!" 54 | } 55 | 56 | "shop_deagle" 57 | { 58 | "pl" "Zakupiłeś: Deagle z siedmioma nabojami, spożytkuj dobrze!" 59 | } 60 | 61 | "shop_disabled" 62 | { 63 | "pl" "Jail Shop jest aktualnie {purple}wyłączony{default}!" 64 | } 65 | 66 | "shop_firegrenade" 67 | { 68 | "pl" "Zakupiłeś: Granata zapalającego!" 69 | } 70 | 71 | "shop_froggyjump" 72 | { 73 | "pl" "Dostajesz żabi skok!" 74 | } 75 | 76 | "shop_fulllive" 77 | { 78 | "pl" "Już posiadasz maksymalną ilość HP!" 79 | } 80 | 81 | "shop_get" 82 | { 83 | "pl" "Dostałeś {1} kredytów od gracza {2}" 84 | } 85 | 86 | "shop_getset" 87 | { 88 | "pl" "Twoje kredyty zostały zmienione z {1} na {2}" 89 | } 90 | 91 | "shop_give" 92 | { 93 | "pl" "Wysłałeś {1} kredytów do gracza {2}" 94 | } 95 | 96 | "shop_gravity" 97 | { 98 | "pl" "Teraz masz zmiejszoną grawitację!" 99 | } 100 | 101 | "shop_heal" 102 | { 103 | "pl" "Zostałeś uleczony!" 104 | } 105 | 106 | "shop_health" 107 | { 108 | "pl" "Dostajesz +{1}HP oraz kamizelke z hełmem!" 109 | } 110 | 111 | "shop_invisible" 112 | { 113 | "pl" "Jesteś niewidzialny przez {1} sekund!" 114 | } 115 | 116 | "shop_killedct" 117 | { 118 | "pl" "Dostajesz {2} kredytów za zabicie strażnika {3}. Aktualnie posiadasz: {1}¢" 119 | } 120 | 121 | "shop_killedt" 122 | { 123 | "pl" "Dostajesz {2} kredytów za zabicie więźnia {3}. Aktualnie posiadasz: {1}¢" 124 | } 125 | 126 | "shop_knife" 127 | { 128 | "pl" "Zakupiłeś: Nóż zabijający na hita!" 129 | } 130 | 131 | "shop_lastrequest" 132 | { 133 | "pl" "Dostajesz {2} kredytów za przeżycie do ostatniego życzenia. Aktualnie posiadasz: {1}¢" 134 | } 135 | 136 | "shop_max" 137 | { 138 | "pl" "Już kupiłeś ten przedmiot w tej rundzie!." 139 | } 140 | 141 | "shop_maxcredits" 142 | { 143 | "pl" "Posiadasz maksymalną ilość kredytów: {1}!" 144 | } 145 | 146 | "shop_menu_armor" 147 | { 148 | "pl" "Kamizelka [{1}¢]" 149 | } 150 | 151 | "shop_menu_awp" 152 | { 153 | "pl" "AWP z 1 nabojem [{1}¢]" 154 | } 155 | 156 | "shop_menu_bhop" 157 | { 158 | "pl" "BunnyHop [{1}¢]" 159 | } 160 | 161 | "shop_menu_bird" 162 | { 163 | "pl" "Bądź ptakiem [{1}¢]" 164 | } 165 | 166 | "shop_menu_deagle" 167 | { 168 | "pl" "Deagle z 1 magazynkiem [{1}¢]" 169 | } 170 | 171 | "shop_menu_firegrenade" 172 | { 173 | "pl" "Granat zapalający [{1}¢]" 174 | } 175 | 176 | "shop_menu_froggyjump" 177 | { 178 | "pl" "Żabi skok [{1}¢]" 179 | } 180 | 181 | "shop_menu_gravity" 182 | { 183 | "pl" "Mniejsza grawitacja [{1}¢]" 184 | } 185 | 186 | "shop_menu_heal" 187 | { 188 | "pl" "Uzdrownienie [{1}¢]" 189 | } 190 | 191 | "shop_menu_health" 192 | { 193 | "pl" "+{2}hp i kamizelka [{1}¢]" 194 | } 195 | 196 | "shop_menu_invisible" 197 | { 198 | "pl" "Niewidzialność przez {2} sek. [{1}¢]" 199 | } 200 | 201 | "shop_menu_knife" 202 | { 203 | "pl" "Nóż zabijający na hita [{1}¢]" 204 | } 205 | 206 | "shop_menu_model" 207 | { 208 | "pl" "Model strażnika [{1}¢]" 209 | } 210 | 211 | "shop_menu_molotov" 212 | { 213 | "pl" "Mołotow + 2 flashami [{1}¢]" 214 | } 215 | 216 | "shop_menu_noclip" 217 | { 218 | "pl" "No Clip przez {2} sek. [{1}¢]" 219 | } 220 | 221 | "shop_menu_nodamage" 222 | { 223 | "pl" "Nieśmiertelność przez 20 sekund [{1}¢]" 224 | } 225 | 226 | "shop_menu_openjail" 227 | { 228 | "pl" "Otwarcie cel [{1}¢]" 229 | } 230 | 231 | "shop_menu_playercredits" 232 | { 233 | "pl" "Ilość kredytów graczy:" 234 | } 235 | 236 | "shop_menu_player¢redits" 237 | { 238 | "pl" "Ilość kredytów graczy:" 239 | } 240 | 241 | "shop_menu_poisonsmoke" 242 | { 243 | "pl" "Trujący smoke [{1}¢]" 244 | } 245 | 246 | "shop_menu_revive" 247 | { 248 | "pl" "Odrodzenie [{1}¢]" 249 | } 250 | 251 | "shop_menu_taser" 252 | { 253 | "pl" "Paralizator z 3 nabojami [{1}¢]" 254 | } 255 | 256 | "shop_menu_teleportsmoke" 257 | { 258 | "pl" "Teleportujący smoke [{1}¢]" 259 | } 260 | 261 | "shop_menu_throwingknife" 262 | { 263 | "pl" "Nóż do rzucania, zabijający na hita [{1}¢]" 264 | } 265 | 266 | "shop_menu_title" 267 | { 268 | "pl" "Jail Shop. Posiadasz {1}¢" 269 | } 270 | 271 | "shop_menu_vampire" 272 | { 273 | "pl" "Wampiryzm [{1}¢]" 274 | } 275 | 276 | "shop_menu_wallhack" 277 | { 278 | "pl" "Wallhack [{1}¢]" 279 | } 280 | 281 | "shop_missingcredits" 282 | { 283 | "pl" "Posiadasz: {1} kredytów (Nie masz wystarczającej ilości. Potrzebujesz: {2}¢)" 284 | } 285 | 286 | "shop_model" 287 | { 288 | "pl" "Jesteś przebrany za strażnika, bądź uważny!" 289 | } 290 | 291 | "shop_molotov" 292 | { 293 | "pl" "Zakupiłeś: Mołotow + 2 flashami!" 294 | } 295 | 296 | "shop_noclip" 297 | { 298 | "pl" "Teraz masz no clip przez {1} sekund!" 299 | } 300 | 301 | "shop_noclipend" 302 | { 303 | "pl" "NoClip się skończył!" 304 | } 305 | 306 | "shop_nodamage" 307 | { 308 | "pl" "Jesteś nieśmiertelny przez {1} sekund!" 309 | } 310 | 311 | "shop_onlyt" 312 | { 313 | "pl" "Ten przedmiot jest dostępny tylko dla więźniów!" 314 | } 315 | 316 | "shop_opencell" 317 | { 318 | "pl" "Otworzyłeś cele." 319 | } 320 | 321 | "shop_opencellall" 322 | { 323 | "pl" "{1} otworzył cele!" 324 | } 325 | 326 | "shop_playtime" 327 | { 328 | "pl" "Dostajesz {1} kredytów za granie na tym serwerze" 329 | } 330 | 331 | "shop_poisensmoke" 332 | { 333 | "pl" "Zakupiłeś: Trujący smoke!" 334 | } 335 | 336 | "shop_revived" 337 | { 338 | "pl" "{1} użył odrodzenia!" 339 | } 340 | 341 | "shop_revivehint" 342 | { 343 | "pl" "Zginąłeś, możesz użyć !revive, aby się odrodzić za {1} kredytów!" 344 | } 345 | 346 | "shop_set" 347 | { 348 | "pl" "Ustawiłeś {2} kredytów dla {1}" 349 | } 350 | 351 | "shop_tag" 352 | { 353 | "pl" "[{green}Jail.Shop{default}]" 354 | } 355 | 356 | "shop_taser" 357 | { 358 | "pl" "Zakupiłeś: Paralizator z 3 nabojami, spożytkuj dobrze!" 359 | } 360 | 361 | "shop_teleportsmoke" 362 | { 363 | "pl" "Zakupiłeś: Teleportujący smoke!" 364 | } 365 | 366 | "shop_throwingknife" 367 | { 368 | "pl" "Zakupiłeś: Rzucający nóż" 369 | } 370 | 371 | "shop_tonly" 372 | { 373 | "pl" "Sklep dostępny tylko dla więźniów!" 374 | } 375 | 376 | "shop_unnodamage" 377 | { 378 | "pl" "Nieśmiertelność skończyła się!" 379 | } 380 | 381 | "shop_vapire" 382 | { 383 | "pl" "Teraz jesteś wampirem!" 384 | } 385 | 386 | "shop_visible" 387 | { 388 | "pl" "Niewidzialność dobiegła końca!" 389 | } 390 | 391 | "shop_wallhack" 392 | { 393 | "pl" "Teraz masz Wallhack!" 394 | } 395 | 396 | "shop_welcome" 397 | { 398 | "pl" "Wpisz !jailshop, aby otworzyć sklep. Zabijaj/wygrywaj/graj, aby zdobywać kredyty." 399 | } 400 | 401 | "shop_menu_paperclip" 402 | { 403 | "pl" "Kup {2} wytrych. [{1}¢]" 404 | } 405 | 406 | "shop_paperclip" 407 | { 408 | "pl" "Zakupiłeś: {1} wytrych do kajdanek!" 409 | } 410 | 411 | "shop_unwallhack" 412 | { 413 | "pl" "Wallhack skończył się!" 414 | } 415 | 416 | "shop_win" 417 | { 418 | "pl" "Dostajesz {2} kredytów za wygranie rundy. Aktualnie posiadasz: {1}¢" 419 | } 420 | 421 | "shop_giftyourself" 422 | { 423 | "pl" "Nie możesz dać sobie prezentu." 424 | } 425 | 426 | "shop_onlyct" 427 | { 428 | "pl" "Ten przedmiot jest tylko dla strażników!" 429 | } 430 | 431 | "shop_saleon" 432 | { 433 | "pl" "Wyprzedaż! Wszystkie przedmioty mają {1}%% zniżki!" 434 | } 435 | 436 | "shop_saleend" 437 | { 438 | "pl" "Wyprzedaż zakończyła się!" 439 | } 440 | 441 | "shop_randomtp" 442 | { 443 | "pl" "Zostałeś przeteleportowany do {1}!" 444 | } 445 | 446 | "shop_randomtp_teleported" 447 | { 448 | "pl" "{1} teleportował się do Ciebie!" 449 | } 450 | 451 | "shop_menu_randomtp" 452 | { 453 | "pl" "Teleportacja do losowego terrorysty [{1}¢]" 454 | } 455 | 456 | "shop_menu_jetpack" 457 | { 458 | "pl" "Jetpack [{1}¢]" 459 | } 460 | 461 | "shop_jetpack" 462 | { 463 | "pl" "Kupiłeś: Jetpack | naciśnij CTRL + SPACJA " 464 | } 465 | 466 | "shop_menu_jihad" 467 | { 468 | "pl" "Jihad Bomb [{1}¢]" 469 | } 470 | 471 | "shop_jihad" 472 | { 473 | "pl" "Kupiłeś: Jihad Bomb | naciśnij Mouse1 + E" 474 | } 475 | 476 | "shop_blackout" 477 | { 478 | "pl" "Kupiłeś: Blackout - Zzztt..." 479 | } 480 | 481 | "shop_menu_freeday" 482 | { 483 | "pl" "Freeday w następnej rundzie [{1}¢]" 484 | } 485 | 486 | "shop_freeday" 487 | { 488 | "pl" "Kupiłeś: Freeday na następną rundę" 489 | } 490 | 491 | "shop_randomtp_fail" 492 | { 493 | "pl" "Nie ma żadnego żywego więźnia, do którego mógłbyś się przeteleportować" 494 | } 495 | 496 | "shop_shield" 497 | { 498 | "pl" "Kupiłeś: Tarcza Taktyczna" 499 | } 500 | 501 | "shop_menu_shield" 502 | { 503 | "pl" "Tarcza taktyczna [{1}¢]" 504 | } 505 | 506 | "shop_menu_icegrenade" 507 | { 508 | "pl" "Granat Lodowy [{1}¢]" 509 | } 510 | 511 | "shop_icegrenade" 512 | { 513 | "pl" "Kupiłeś: Granat Lodowy" 514 | } 515 | 516 | } 517 | -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/smartdm.inc: -------------------------------------------------------------------------------- 1 | #if !defined _smartdm_include 2 | #define _smartdm_include 3 | 4 | #define STRING(%1) %1, sizeof(%1) 5 | 6 | stock Downloader_ParseMDL(const String:model[], String:internal[], maxlen1, String:files[][], maxsize, maxlen2) 7 | { 8 | if(!FileExists2(model)) 9 | return 0; 10 | 11 | new m_iID; 12 | new m_iVersion; 13 | new m_iNum = 0; 14 | new m_iDirNum = 0; 15 | new m_iOffset = 0; 16 | new m_iDirOffset = 0; 17 | new m_iNameOffset = 0; 18 | new m_iIdx = 0; 19 | 20 | new Handle:m_hFile = OpenFile2(model, "rb"); 21 | if(m_hFile==INVALID_HANDLE) 22 | return 0; 23 | 24 | ReadFileCell(m_hFile, m_iID, 4); 25 | ReadFileCell(m_hFile, m_iVersion, 4); 26 | FileSeek(m_hFile, 4, SEEK_CUR); 27 | ReadFileString(m_hFile, internal, maxlen1); 28 | 29 | FileSeek(m_hFile, 204, SEEK_SET); 30 | ReadFileCell(m_hFile, m_iNum, 4); 31 | ReadFileCell(m_hFile, m_iOffset, 4); 32 | ReadFileCell(m_hFile, m_iDirNum, 4); 33 | ReadFileCell(m_hFile, m_iDirOffset, 4); 34 | 35 | new String:m_szPath[PLATFORM_MAX_PATH]; 36 | if(m_iDirNum!=0) 37 | { 38 | FileSeek(m_hFile, m_iDirOffset, SEEK_SET); 39 | ReadFileCell(m_hFile, m_iDirOffset, 4); 40 | FileSeek(m_hFile, m_iDirOffset, SEEK_SET); 41 | ReadFileString(m_hFile, STRING(m_szPath)); 42 | } 43 | 44 | new String:m_szMaterial[PLATFORM_MAX_PATH]; 45 | for(m_iIdx=0;m_iIdx 0) 118 | { 119 | m_bFound[i]=true; 120 | while(m_szLine[m_iPos] != '"' && m_szLine[m_iPos] != ' ' && m_szLine[m_iPos] != ' ') 121 | ++m_iPos; 122 | while(m_szLine[m_iPos] == ' ' || m_szLine[m_iPos] == ' ' || m_szLine[m_iPos] == '"') 123 | ++m_iPos; 124 | m_iLast = m_iPos; 125 | while(m_szLine[m_iLast] != '"' && m_szLine[m_iLast] != '\r' && m_szLine[m_iLast] != '\n' && m_szLine[m_iLast] != ' ' && m_szLine[m_iLast] != ' ' && m_szLine[m_iLast] != 0) 126 | ++m_iLast; 127 | m_szLine[m_iLast] = 0; 128 | strcopy(materials[m_iNum], maxlen, m_szLine[m_iPos]); 129 | ++m_iNum; 130 | } 131 | } 132 | } 133 | 134 | CloseHandle(m_hFile); 135 | 136 | return m_iNum; 137 | } 138 | 139 | new Handle:g_hCachedFiles = INVALID_HANDLE; 140 | new Handle:g_hCachedNums = INVALID_HANDLE; 141 | stock Downloader_AddFileToDownloadsTable(char[] filename) 142 | { 143 | int len = strlen(filename); 144 | ReplaceString(filename, len, "\\", "/"); 145 | for(int ch=0; ch. 19 | */ 20 | 21 | 22 | // Includes 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include // add new cvars to existing .cfg file 32 | 33 | 34 | // Compiler Options 35 | #pragma semicolon 1 36 | #pragma newdecls required 37 | 38 | 39 | // ConVars shop specific 40 | ConVar gc_iItemPrice; 41 | ConVar gc_sItemFlag; 42 | 43 | // ConVars item specific 44 | ConVar gc_bStandStill; 45 | ConVar gc_fBombRadius; 46 | ConVar gc_sSoundSuicideBomberPath; 47 | ConVar gc_sSoundBoomPath; 48 | 49 | 50 | // Booleans shop specific 51 | bool g_bItem[MAXPLAYERS+1] = false; 52 | 53 | // Booleans item specific 54 | 55 | 56 | // Integers item specific 57 | 58 | 59 | // Strings shop specific 60 | char g_sJihadFlag[64]; 61 | char g_sPurchaseLogFile[PLATFORM_MAX_PATH]; 62 | 63 | // Strings item specific 64 | char g_sSoundBoomPath[256]; 65 | char g_sSoundSuicideBomberPath[256]; 66 | 67 | // Handels shop specific 68 | Handle gF_hOnPlayerBuyItem; 69 | 70 | // Handels item specific 71 | 72 | 73 | // Start 74 | public Plugin myinfo = 75 | { 76 | name = "Jihad for MyJailShop", 77 | author = "shanapu", 78 | description = "A Jihad for MyJailShop", 79 | version = "1.0", 80 | url = "https://github.com/shanapu" 81 | }; 82 | 83 | 84 | public void OnPluginStart() 85 | { 86 | // Translation 87 | LoadTranslations("MyJailShop.phrases"); 88 | 89 | // Add new Convars to existing Items.cfg 90 | AutoExecConfig_SetFile("Items", "MyJailShop"); 91 | AutoExecConfig_SetCreateFile(true); 92 | 93 | // Register ConVars 94 | gc_iItemPrice = AutoExecConfig_CreateConVar("sm_jailshop_jihad_price", "20", "Price of the Jihad perk"); 95 | gc_sItemFlag = AutoExecConfig_CreateConVar("sm_jailshop_jihad_flag", "", "Set flag for admin/vip must have to get access to Jihad. No flag = is available for all players!"); 96 | 97 | gc_bStandStill = AutoExecConfig_CreateConVar("sm_jailshop_standstill", "1", "0 - disabled, 1 - standstill(cant move) on Activate bomb", _, true, 0.0, true, 1.0); 98 | gc_fBombRadius = AutoExecConfig_CreateConVar("sm_jailshop_bomb_radius", "200.0", "Radius for bomb damage", _, true, 10.0, true, 999.0); 99 | 100 | gc_sSoundSuicideBomberPath = AutoExecConfig_CreateConVar("sm_jailshop_sounds_jihad", "music/MyJailbreak/suicidebomber.mp3", "Path to the soundfile which should be played on activatebomb."); 101 | gc_sSoundBoomPath = AutoExecConfig_CreateConVar("sm_jailshop_sounds_boom", "music/MyJailbreak/boom.mp3", "Path to the soundfile which should be played on detonation."); 102 | 103 | // Add new Convars to existing Items.cfg 104 | AutoExecConfig_ExecuteFile(); 105 | AutoExecConfig_CleanFile(); 106 | 107 | // Set file for Logs 108 | SetLogFile(g_sPurchaseLogFile, "purchase", "MyJailShop"); 109 | 110 | //Hook 111 | HookEvent("player_death", Event_PlayerDeath); 112 | } 113 | 114 | 115 | public void OnConfigsExecuted() 116 | { 117 | gc_sItemFlag.GetString(g_sJihadFlag, sizeof(g_sJihadFlag)); 118 | gc_sSoundSuicideBomberPath.GetString(g_sSoundSuicideBomberPath, sizeof(g_sSoundSuicideBomberPath)); 119 | gc_sSoundBoomPath.GetString(g_sSoundBoomPath, sizeof(g_sSoundBoomPath)); 120 | } 121 | 122 | 123 | // Here we add an new item to shop menu 124 | public void MyJailShop_OnShopMenu(int client, Menu menu) 125 | { 126 | if (GetClientTeam(client) == CS_TEAM_T) 127 | { 128 | char info[64]; 129 | Format(info, sizeof(info), "%t", "shop_menu_jihad", gc_iItemPrice.IntValue); 130 | 131 | if (MyJailShop_GetCredits(client) >= gc_iItemPrice.IntValue && MyJailShop_IsBuyTime() && IsPlayerAlive(client) && CheckVipFlag(client, g_sJihadFlag)) 132 | AddMenuItem(menu, "Jihad", info); 133 | else if (CheckVipFlag(client, g_sJihadFlag)) 134 | AddMenuItem(menu, "Jihad", info, ITEMDRAW_DISABLED); 135 | } 136 | } 137 | 138 | 139 | // What should we do when new item was picked? 140 | public void MyJailShop_OnShopMenuHandler(Menu menu, MenuAction action, int client, int itemNum) 141 | { 142 | if (!IsValidClient(client, false, false)) 143 | { 144 | return; 145 | } 146 | 147 | if (action == MenuAction_Select) 148 | { 149 | if (MyJailShop_IsBuyTime()) 150 | { 151 | char info[64]; 152 | menu.GetItem(itemNum, info, sizeof(info)); 153 | 154 | if (StrEqual(info, "Jihad")) 155 | { 156 | Item_jihad(client, info); 157 | } 158 | } 159 | } 160 | 161 | return; 162 | } 163 | 164 | 165 | // The item transaction and last checks 166 | void Item_jihad(int client, char[] name) 167 | { 168 | // is player alive? 169 | if (!IsPlayerAlive(client)) 170 | { 171 | CPrintToChat(client, "%t %t", "shop_tag", "shop_alive"); 172 | return; 173 | } 174 | 175 | // has player enough credits? 176 | if (MyJailShop_GetCredits(client) < gc_iItemPrice.IntValue) 177 | { 178 | CPrintToChat(client, "%t %t", "shop_tag", "shop_missingcredits", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 179 | return; 180 | } 181 | 182 | // with this we activate the item itself 183 | g_bItem[client] = true; 184 | 185 | // give the needed item 186 | GivePlayerItem(client, "weapon_c4"); 187 | 188 | // now we take his money & push the forward 189 | MyJailShop_SetCredits(client,(MyJailShop_GetCredits(client) - gc_iItemPrice.IntValue)); 190 | Forward_OnPlayerBuyItem(client, name); 191 | 192 | // announce it 193 | CPrintToChat(client, "%t %t", "shop_tag", "shop_jihad"); 194 | CPrintToChat(client, "%t %t", "shop_tag", "shop_costs", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 195 | 196 | // log it 197 | ConVar c_bLogging = FindConVar("sm_jailshop_log"); 198 | if (c_bLogging.BoolValue) 199 | { 200 | LogToFileEx(g_sPurchaseLogFile, "Player %L bought: Jihad", client); 201 | } 202 | 203 | } 204 | 205 | 206 | // Reset item on Player Death 207 | public void Event_PlayerDeath(Handle event, const char [] name, bool dontBroadcast) 208 | { 209 | int client = GetClientOfUserId(GetEventInt(event, "userid")); 210 | 211 | if (g_bItem[client]) 212 | { 213 | MyJailShop_OnResetPlayer(client); 214 | } 215 | } 216 | 217 | 218 | // Reset item on call 219 | public void MyJailShop_OnResetPlayer(int client) 220 | { 221 | g_bItem[client] = false; // remove the item in possession 222 | } 223 | 224 | 225 | // Forward MyJailShop_OnPlayerBuyItem 226 | void Forward_OnPlayerBuyItem(int client, char[] item) 227 | { 228 | Call_StartForward(gF_hOnPlayerBuyItem); 229 | Call_PushCell(client); 230 | Call_PushString(item); 231 | Call_Finish(); 232 | } 233 | 234 | public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) 235 | { 236 | gF_hOnPlayerBuyItem = CreateGlobalForward("MyJailShop_OnPlayerBuyItem", ET_Ignore, Param_Cell, Param_String); 237 | 238 | return APLRes_Success; 239 | } 240 | 241 | 242 | public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon) 243 | { 244 | if (!g_bItem[client] || !IsPlayerAlive(client)) 245 | return Plugin_Continue; 246 | 247 | if (buttons & IN_USE && buttons & IN_ATTACK) 248 | { 249 | int iWeapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon"); 250 | char weaponName[64]; 251 | 252 | if (IsValidEdict(iWeapon)) 253 | { 254 | GetEdictClassname(iWeapon, weaponName, sizeof(weaponName)); 255 | 256 | if (GetClientTeam(client) == CS_TEAM_T) 257 | { 258 | if (StrEqual(weaponName, "weapon_c4")) 259 | { 260 | EmitSoundToAllAny(g_sSoundSuicideBomberPath); 261 | CreateTimer(1.0, Timer_DetonateBomb, GetClientUserId(client)); 262 | if (gc_bStandStill.BoolValue) 263 | { 264 | SetEntityMoveType(client, MOVETYPE_NONE); 265 | SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 0.0); 266 | } 267 | } 268 | } 269 | } 270 | } 271 | return Plugin_Continue; 272 | } 273 | 274 | // Detonate Bomb / Kill Player 275 | public Action Timer_DetonateBomb(Handle timer, int userid) 276 | { 277 | int client = GetClientOfUserId(userid); 278 | 279 | EmitSoundToAllAny(g_sSoundBoomPath); 280 | 281 | float suicide_bomber_vec[3]; 282 | GetClientAbsOrigin(client, suicide_bomber_vec); 283 | 284 | int deathList[MAXPLAYERS+1]; // store players that this bomb kills 285 | int numKilledPlayers = 0; 286 | 287 | for (int i = 1; i <= MaxClients; i++) if (IsClientInGame(i)) 288 | { 289 | // Check that client is a real player who is alive and is a CT 290 | if (IsClientInGame(i) && IsPlayerAlive(i)) 291 | { 292 | float ct_vec[3]; 293 | GetClientAbsOrigin(i, ct_vec); 294 | 295 | float distance = GetVectorDistance(ct_vec, suicide_bomber_vec, false); 296 | 297 | // If CT was in explosion radius, damage or kill them 298 | // Formula used: damage = 200 - (d/2) 299 | int damage = RoundToFloor(gc_fBombRadius.FloatValue - (distance / 2.0)); 300 | 301 | if (damage <= 0) // this player was not damaged 302 | continue; 303 | 304 | // damage the surrounding players 305 | int curHP = GetClientHealth(i); 306 | 307 | if (curHP - damage <= 0) 308 | { 309 | deathList[numKilledPlayers] = i; 310 | numKilledPlayers++; 311 | } 312 | else 313 | { // Survivor 314 | SetEntityHealth(i, curHP - damage); 315 | IgniteEntity(i, 2.0); 316 | } 317 | } 318 | } 319 | if (numKilledPlayers > 0) 320 | { 321 | for (int i = 0; i < numKilledPlayers;++i) 322 | { 323 | ForcePlayerSuicide(deathList[i]); 324 | } 325 | } 326 | ForcePlayerSuicide(client); 327 | } 328 | -------------------------------------------------------------------------------- /addons/sourcemod/scripting/include/lastrequest.inc: -------------------------------------------------------------------------------- 1 | /* 2 | * SourceMod Hosties Project 3 | * by: databomb & dataviruset 4 | * 5 | * This file is part of the SM Hosties project. 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | // Double include protection 21 | #if defined _LastRequest_Included_ 22 | #endinput 23 | #endif 24 | #define _LastRequest_Included_ 25 | 26 | // Custom types 27 | enum LastRequest 28 | { 29 | LR_KnifeFight = 0, 30 | LR_Shot4Shot, 31 | LR_GunToss, 32 | LR_ChickenFight, 33 | LR_HotPotato, 34 | LR_Dodgeball, 35 | LR_NoScope, 36 | LR_RockPaperScissors, 37 | LR_Rebel, 38 | LR_Mag4Mag, 39 | LR_Race, 40 | LR_RussianRoulette, 41 | LR_JumpContest 42 | }; 43 | 44 | enum PartnersArray 45 | { 46 | Block_LRType = 0, 47 | Block_Prisoner, 48 | Block_Guard, 49 | Block_PrisonerData, 50 | Block_GuardData, 51 | Block_Global1, 52 | Block_Global2, 53 | Block_Global3, 54 | Block_Global4, 55 | Block_DataPackHandle 56 | }; 57 | 58 | enum DataType 59 | { 60 | Type_Int = 0, 61 | Type_Float, 62 | Type_Handle, 63 | Type_LastRequest, 64 | Type_PartnerArray 65 | }; 66 | 67 | enum LR_Structure 68 | { 69 | DataType:LR_Type, 70 | DataType:Prisoner_Index, 71 | DataType:Guard_Index, 72 | DataType:Prisoner_Data, 73 | DataType:Guard_Data, 74 | DataType:Global1, 75 | DataType:Global2, 76 | DataType:Global3, 77 | DataType:Global4, 78 | DataType:TheDataPack 79 | }; 80 | 81 | public SharedPlugin __pl_lastrequest = 82 | { 83 | name = "lastrequest", 84 | file = "sm_hosties.smx", 85 | #if defined REQUIRE_PLUGIN 86 | required = 1, 87 | #else 88 | required = 0, 89 | #endif 90 | }; 91 | 92 | public void __pl_lastrequest_SetNTVOptional() 93 | { 94 | MarkNativeAsOptional("IsClientRebel"); 95 | MarkNativeAsOptional("IsClientInLastRequest"); 96 | MarkNativeAsOptional("IsLastRequestAvailable"); 97 | MarkNativeAsOptional("AddLastRequestToList"); 98 | MarkNativeAsOptional("RemoveLastRequestFromList"); 99 | MarkNativeAsOptional("ProcessAllLastRequests"); 100 | MarkNativeAsOptional("ChangeRebelStatus"); 101 | MarkNativeAsOptional("InitializeLR"); 102 | MarkNativeAsOptional("CleanupLR"); 103 | } 104 | 105 | functag FuncLastRequest public(type, prisoner, guard); 106 | functag FuncProcessLR public(Handle:array, iLRNumber); 107 | 108 | 109 | forward void OnStartLR(int PrisonerIndex, int GuardIndex, int LR_Type); 110 | 111 | forward void OnAvailableLR(int Announced); 112 | 113 | /** 114 | * Find if last request is available. 115 | * 116 | * @return True if last request is available, false otherwise. 117 | */ 118 | native bool IsLastRequestAvailable(); 119 | 120 | /** 121 | * Find if a client is listed as a rebel. 122 | * 123 | * @param client Client index. 124 | * @return True if rebel, false otherwise. 125 | * @error Invalid client index. 126 | */ 127 | native bool IsClientRebel(int client); 128 | 129 | /** 130 | * Find if a client is in a last request. 131 | * 132 | * @param client Client index. 133 | * @return False if not in LR 134 | * Otherwise client index of partner or -1 if in LR but no partner exists 135 | * @error Invalid client index. 136 | */ 137 | native int IsClientInLastRequest(int client); 138 | 139 | /** 140 | * Adds a custom last request. 141 | * 142 | * @param Start Function call to when the LR is started. 143 | * @param Stop Function call to when the LR is ended. 144 | * @param LR_Name The name for the LR that will appear on the menu. 145 | * @param AutoStart Whether the LR will start immediately (true) or if additional menus are needed (false). 146 | * @return The type index of the LR added. 147 | */ 148 | native int AddLastRequestToList(FuncProcessLR Start, FuncLastRequest Stop, char[] LR_Name, bool AutoStart = true); 149 | 150 | /** 151 | * Removes a custom last request. 152 | * 153 | * @param Start Function call to when the LR is started. 154 | * @param Stop Function call to when the LR is ended. 155 | * @param LR_Name Name of the LR that appeared on the menu. 156 | * @noreturn 157 | * @error Last request not found. 158 | */ 159 | native void RemoveLastRequestFromList(FuncProcessLR Start, FuncLastRequest Stop, char[] LR_Name); 160 | 161 | /** 162 | * Provides iteration for all active last requests. 163 | * 164 | * @param ProcessLR Function call to process each last request. 165 | * @param iLastRequestIndex Index number of last request in array. 166 | * @return Number of last requests in progress. 167 | */ 168 | native int ProcessAllLastRequests(FuncProcessLR ProcessLR, int iLastRequestIndex); 169 | 170 | /** 171 | * Alters the boolean array determining if a given client is considered a rebel. 172 | * 173 | * @param client Client Index 174 | * @param status Boolean Rebel Status (true = rebel) 175 | * @noreturn 176 | * @error Invalid parameters 177 | */ 178 | native void ChangeRebelStatus(int client, int status); 179 | 180 | /** 181 | * Starts the lr if autostart is false. 182 | * 183 | * @param prisoner Prisoner Index 184 | * @noreturn 185 | * @error Invalid parameters or wrong client index 186 | */ 187 | native void InitializeLR(int prisoner); 188 | 189 | /** 190 | * Cleanup the data about the autostart LR for a client. 191 | * (All the data stored by using the Prisoner's client index) 192 | * 193 | * @param prisoner Prisoner Index 194 | * @noreturn 195 | * @error Invalid parameters or wrong client index 196 | */ 197 | native void CleanupLR(int prisoner); 198 | 199 | stock void SetThirdPerson(int client) 200 | { 201 | if (IsValidEntity(client) && IsClientInGame(client)) 202 | { 203 | SetEntPropEnt(client, Prop_Send, "m_hObserverTarget", 0); 204 | SetEntProp(client, Prop_Send, "m_iObserverMode", 1); 205 | SetEntProp(client, Prop_Send, "m_bDrawViewmodel", 0); 206 | SetEntProp(client, Prop_Send, "m_iFOV", 120); 207 | } 208 | } 209 | 210 | stock void SetFirstPerson(int client) 211 | { 212 | if (IsValidEntity(client) && IsClientInGame(client)) 213 | { 214 | SetEntPropEnt(client, Prop_Send, "m_hObserverTarget", 1); 215 | SetEntProp(client, Prop_Send, "m_iObserverMode", 0); 216 | SetEntProp(client, Prop_Send, "m_bDrawViewmodel", 1); 217 | SetEntProp(client, Prop_Send, "m_iFOV", 90); 218 | } 219 | } 220 | 221 | stock void CancelAllMenus() 222 | { 223 | for (int idx = 1; idx < MaxClients; idx++) 224 | { 225 | if (IsClientInGame(idx)) 226 | { 227 | if (GetClientMenu(idx)) 228 | { 229 | CancelClientMenu(idx); 230 | } 231 | } 232 | } 233 | } 234 | 235 | stock void ClosePotentialLRMenus() 236 | { 237 | for (int idx = 1; idx < MaxClients; idx++) 238 | { 239 | if (IsClientInGame(idx)) 240 | { 241 | if (GetClientTeam(idx) == CS_TEAM_T) 242 | { 243 | if (GetClientMenu(idx)) 244 | { 245 | CancelClientMenu(idx); 246 | } 247 | } 248 | } 249 | } 250 | } 251 | 252 | stock bool PlayerHasGun(int client) 253 | { 254 | if (PlayerHasPrimary(client) || PlayerHasSecondary(client)) 255 | { 256 | return true; 257 | } 258 | return false; 259 | } 260 | 261 | stock bool PlayerHasPrimary(int client) 262 | { 263 | if (GetPlayerWeaponSlot(client, CS_SLOT_PRIMARY) != -1) 264 | { 265 | return true; 266 | } 267 | return false; 268 | } 269 | 270 | stock bool PlayerHasSecondary(int client) 271 | { 272 | if (GetPlayerWeaponSlot(client, CS_SLOT_SECONDARY) != -1) 273 | { 274 | return true; 275 | } 276 | return false; 277 | } 278 | 279 | // filter function to ignore everything 280 | public bool Trace_FilterNothing(int entity, int contentsMask) 281 | { 282 | return entity == 0; 283 | } 284 | 285 | // Based on Client_IsLookingAtWall, Edict_GetClosestToEdict from SM-LIB with permission from Berni 286 | // detects if it's safe to teleport a player where the player is aiming 287 | stock bool IsClientTooNearObstacle(int client, float distance = 110.0, bool checkAllEntities = false) 288 | { 289 | float posEye[3], posEyeAngles[3], vecOrigin[3], vecOrigin_edict[3]; 290 | char Class_edict[64]; 291 | bool isClientLookingAtWall = false; 292 | bool isClientCloseToEdict = false; 293 | 294 | GetClientAbsOrigin(client, vecOrigin); 295 | 296 | if (checkAllEntities) 297 | { 298 | for (int edict=1; edict <= GetMaxEntities(); edict++) 299 | { 300 | 301 | if (!IsValidEntity(edict)) 302 | { 303 | continue; 304 | } 305 | 306 | GetEdictClassname(edict, Class_edict, sizeof(Class_edict)); 307 | 308 | if (StrContains(Class_edict, "player") != -1) 309 | { 310 | continue; 311 | } 312 | 313 | if (StrContains(Class_edict, "weapon") != -1) 314 | { 315 | continue; 316 | } 317 | 318 | if (GetEntSendPropOffs(edict, "m_vecOrigin") == -1) 319 | { 320 | continue; 321 | } 322 | 323 | GetEntPropVector(edict, Prop_Data, "m_vecOrigin", vecOrigin_edict); 324 | 325 | float edict_distance = GetVectorDistance(vecOrigin, vecOrigin_edict); 326 | 327 | if (edict_distance <= distance) 328 | { 329 | isClientCloseToEdict = true; 330 | } 331 | } 332 | } 333 | 334 | GetClientEyePosition(client, posEye); 335 | GetClientEyeAngles(client, posEyeAngles); 336 | 337 | posEyeAngles[0] = 0.0; 338 | 339 | Handle trace = TR_TraceRayFilterEx(posEye, posEyeAngles, CONTENTS_SOLID, RayType_Infinite, Trace_FilterNothing); 340 | 341 | if (TR_DidHit(trace)) 342 | { 343 | float posEnd[3]; 344 | 345 | TR_GetEndPosition(posEnd, trace); 346 | 347 | if (GetVectorDistance(posEye, posEnd) <= distance) 348 | { 349 | float m_vHullMin[3] = {-16.0, -16.0, 0.0}; 350 | float m_vHullMax[3] = {16.0, 16.0, 72.0}; 351 | Handle hullTrace = TR_TraceHullEx(posEye, posEnd, m_vHullMin, m_vHullMax, CONTENTS_SOLID); 352 | if (TR_DidHit(hullTrace)) 353 | { 354 | TR_GetEndPosition(posEnd, hullTrace); 355 | if (GetVectorDistance(posEye, posEnd) <= distance) 356 | { 357 | isClientLookingAtWall = true; 358 | } 359 | } 360 | CloseHandle(hullTrace); 361 | } 362 | } 363 | 364 | CloseHandle(trace); 365 | 366 | if (isClientCloseToEdict || isClientLookingAtWall) 367 | { 368 | return true; 369 | } 370 | return false; 371 | } -------------------------------------------------------------------------------- /addons/sourcemod/translations/ru/MyJailShop.phrases.txt: -------------------------------------------------------------------------------- 1 | // Exported from SourceMod Translator 2 | // Date: 2018-08-20 21:17:57 UTC 3 | // Language: Russian (ru) 4 | // 5 | // To view other translations for this plugin, please visit: 6 | // http://translator.mitchdempsey.com/sourcemod_plugins/268 7 | // 8 | "Phrases" 9 | { 10 | 11 | "shop_alive" 12 | { 13 | "ru" "Вы должны быть живы, чтобы покупать предметы!" 14 | } 15 | 16 | "shop_alreadyopen" 17 | { 18 | "ru" "Камеры уже открыты." 19 | } 20 | 21 | "shop_awp" 22 | { 23 | "ru" "Вы приобрели: АВП с одним выстрелом, вы знаете как его использовать!" 24 | } 25 | 26 | "shop_bhop" 27 | { 28 | "ru" "Теперь у вас есть BunnyHop, получайте удовольствие!" 29 | } 30 | 31 | "shop_bird" 32 | { 33 | "ru" "Вы птица! Переключатель полёта с '+dropweapon'" 34 | } 35 | 36 | "shop_buytime" 37 | { 38 | "ru" "Время покупок истекло. Вы можете покупать в следующем раунде снова." 39 | } 40 | 41 | "shop_costs" 42 | { 43 | "ru" "Расходы: {2} ¢редитов. Теперь вы имеете {1} ¢редитов" 44 | } 45 | 46 | "shop_credits" 47 | { 48 | "ru" "Ваши текущие ¢редиты: {1}!" 49 | } 50 | 51 | "shop_dead" 52 | { 53 | "ru" "Вы должны быть мертвы, чтобы использовать этот предмет!" 54 | } 55 | 56 | "shop_deagle" 57 | { 58 | "ru" "Вы приобрели: Deagle с 7 патронами, вы знаете как его использовать!" 59 | } 60 | 61 | "shop_disabled" 62 | { 63 | "ru" "Тюремная лавка на данный момент {purple}отключена{default}!" 64 | } 65 | 66 | "shop_firegrenade" 67 | { 68 | "ru" "Вы приобрели: HE, которая поджигает противника!" 69 | } 70 | 71 | "shop_froggyjump" 72 | { 73 | "ru" "Теперь у вас есть Лягушачий Прыжок!" 74 | } 75 | 76 | "shop_fulllive" 77 | { 78 | "ru" "У вас уже полное здоровье!" 79 | } 80 | 81 | "shop_get" 82 | { 83 | "ru" "Вы не можете использовать подарок на себе." 84 | } 85 | 86 | "shop_getset" 87 | { 88 | "ru" "Ваши ¢редиты были установлены на {1} от {2}" 89 | } 90 | 91 | "shop_give" 92 | { 93 | "ru" "Теперь у вас есть низкая гравитация!" 94 | } 95 | 96 | "shop_gravity" 97 | { 98 | "ru" "Теперь у вас есть низкая гравитация!" 99 | } 100 | 101 | "shop_heal" 102 | { 103 | "ru" "Вы исцелены!" 104 | } 105 | 106 | "shop_health" 107 | { 108 | "ru" "Вы получили +{1}HP и броню с шлемом!" 109 | } 110 | 111 | "shop_invisible" 112 | { 113 | "ru" "Теперь вы невидимы на {1} секунд!" 114 | } 115 | 116 | "shop_killedct" 117 | { 118 | "ru" "Вы получили {2} ¢редитов за убийство охранника {3}. На данный момент вы имеете: {1}¢" 119 | } 120 | 121 | "shop_killedt" 122 | { 123 | "ru" "Вы получили {2} ¢редитов за убийство заключённого {3}. На данный момент вы имеете: {1}¢" 124 | } 125 | 126 | "shop_knife" 127 | { 128 | "ru" "Вы приобрели: супер-нож" 129 | } 130 | 131 | "shop_lastrequest" 132 | { 133 | "ru" "Вы получили {2} ¢редитов за достижение ЛР. На данный момент вы имеете: {1}¢" 134 | } 135 | 136 | "shop_max" 137 | { 138 | "ru" "Вы уже приобрели этот предмет в этом раунде, подождите до следующего раунда, чтобы купить снова." 139 | } 140 | 141 | "shop_maxcredits" 142 | { 143 | "ru" "Ваши ¢редиты в магазине: {1}, максимально допустимое!" 144 | } 145 | 146 | "shop_menu_armor" 147 | { 148 | "ru" "Броня [{1}¢]" 149 | } 150 | 151 | "shop_menu_awp" 152 | { 153 | "ru" "АВП с одним патроном [{1}¢]" 154 | } 155 | 156 | "shop_menu_bhop" 157 | { 158 | "ru" "BunnyHop [{1}¢]" 159 | } 160 | 161 | "shop_menu_bird" 162 | { 163 | "ru" "Стать птицей [{1}¢]" 164 | } 165 | 166 | "shop_menu_deagle" 167 | { 168 | "ru" "Deagle с 1 магазином [{1}¢]" 169 | } 170 | 171 | "shop_menu_firegrenade" 172 | { 173 | "ru" "Огненная гранта [{1}¢]" 174 | } 175 | 176 | "shop_menu_froggyjump" 177 | { 178 | "ru" "Лягушачий прыжок [{1}¢]" 179 | } 180 | 181 | "shop_menu_gravity" 182 | { 183 | "ru" "Маленькая гравитация [{1}¢]" 184 | } 185 | 186 | "shop_menu_heal" 187 | { 188 | "ru" "Излечение [{1}¢]" 189 | } 190 | 191 | "shop_menu_health" 192 | { 193 | "ru" "+{2}hp и брони [{1}¢]" 194 | } 195 | 196 | "shop_menu_invisible" 197 | { 198 | "ru" "Невидимость на {2} сек. [{1}¢]" 199 | } 200 | 201 | "shop_menu_knife" 202 | { 203 | "ru" "Один удар ножом [{1}¢]" 204 | } 205 | 206 | "shop_menu_model" 207 | { 208 | "ru" "Одежда охранника [{1}¢]" 209 | } 210 | 211 | "shop_menu_molotov" 212 | { 213 | "ru" "Молотов + 2 флэшки [{1}¢]" 214 | } 215 | 216 | "shop_menu_noclip" 217 | { 218 | "ru" "НоКлип на {2} сек. [{1}¢]" 219 | } 220 | 221 | "shop_menu_nodamage" 222 | { 223 | "ru" "Никаких повреждений в течение 20 секунд [{1}¢]" 224 | } 225 | 226 | "shop_menu_openjail" 227 | { 228 | "ru" "Открыть камеры [{1}¢]" 229 | } 230 | 231 | "shop_menu_playercredits" 232 | { 233 | "ru" "Кредиты игрока" 234 | } 235 | 236 | "shop_menu_player¢redits" 237 | { 238 | "ru" "¢редиты игроков в магазине:" 239 | } 240 | 241 | "shop_menu_poisonsmoke" 242 | { 243 | "ru" "Ядовитый дым [{1}¢]" 244 | } 245 | 246 | "shop_menu_revive" 247 | { 248 | "ru" "Воскрешение [{1}¢]" 249 | } 250 | 251 | "shop_menu_taser" 252 | { 253 | "ru" "Шокер с 3 выстрелами [{1}¢]" 254 | } 255 | 256 | "shop_menu_teleportsmoke" 257 | { 258 | "ru" "Смок-телепортации [{1}¢]" 259 | } 260 | 261 | "shop_menu_throwingknife" 262 | { 263 | "ru" "Бросить одним ударом нож [{1}¢]" 264 | } 265 | 266 | "shop_menu_title" 267 | { 268 | "ru" "Тюремная лавка. Вы имеете {1}¢" 269 | } 270 | 271 | "shop_menu_vampire" 272 | { 273 | "ru" "Вампир [{1}¢]" 274 | } 275 | 276 | "shop_menu_wallhack" 277 | { 278 | "ru" "WallHack [{1}¢]" 279 | } 280 | 281 | "shop_missingcredits" 282 | { 283 | "ru" "Ваши ¢редиты: {1} (У вас недостаточно ¢редитов для покупки. Вам необходимо: {2}¢)" 284 | } 285 | 286 | "shop_model" 287 | { 288 | "ru" "Вы замаскировались под охранника, будьте осторожны!" 289 | } 290 | 291 | "shop_molotov" 292 | { 293 | "ru" "Вы приобрели: Молотов + 2 флэшки!" 294 | } 295 | 296 | "shop_noclip" 297 | { 298 | "ru" "Теперь у вас есть НоКлип на {1} секунд!" 299 | } 300 | 301 | "shop_noclipend" 302 | { 303 | "ru" "NoClip закончился!" 304 | } 305 | 306 | "shop_nodamage" 307 | { 308 | "ru" "Теперь вы бессмертны на {1} секунд!" 309 | } 310 | 311 | "shop_onlyt" 312 | { 313 | "ru" "Этот предмет доступен только заключённым!" 314 | } 315 | 316 | "shop_opencell" 317 | { 318 | "ru" "Вы открыли камеры." 319 | } 320 | 321 | "shop_opencellall" 322 | { 323 | "ru" "{1} открыл все клетки, используя магазин" 324 | } 325 | 326 | "shop_playtime" 327 | { 328 | "ru" "Вы получили {1} ¢редитов за игру на этом сервере" 329 | } 330 | 331 | "shop_poisensmoke" 332 | { 333 | "ru" "Вы приобрели: Ядовитый дым!" 334 | } 335 | 336 | "shop_revived" 337 | { 338 | "ru" "{1} был возрождён!" 339 | } 340 | 341 | "shop_revivehint" 342 | { 343 | "ru" "Вы погибли, вы можете использовать !revive за {1} кредитов!" 344 | } 345 | 346 | "shop_set" 347 | { 348 | "ru" "Вы установили {2} ¢редитов {1}" 349 | } 350 | 351 | "shop_tag" 352 | { 353 | "ru" "[{green}jail.магазин{default}]" 354 | } 355 | 356 | "shop_taser" 357 | { 358 | "ru" "Вы приобрели: Шокер с 3 выстрелами!" 359 | } 360 | 361 | "shop_teleportsmoke" 362 | { 363 | "ru" "Вы приобрели: Смок-телепорт!" 364 | } 365 | 366 | "shop_throwingknife" 367 | { 368 | "ru" "Вы приобрели: Метательный нож!" 369 | } 370 | 371 | "shop_tonly" 372 | { 373 | "ru" "Магазин только для заключённых!" 374 | } 375 | 376 | "shop_unnodamage" 377 | { 378 | "ru" "Вы снова смертны!" 379 | } 380 | 381 | "shop_vapire" 382 | { 383 | "ru" "Теперь вы вампир!" 384 | } 385 | 386 | "shop_visible" 387 | { 388 | "ru" "Теперь вы снова видимы!" 389 | } 390 | 391 | "shop_wallhack" 392 | { 393 | "ru" "Теперь у вас есть WallHack!" 394 | } 395 | 396 | "shop_welcome" 397 | { 398 | "ru" "Введите !shop, чтобы открыть магазин. Убейте, чтобы выйграть ¢редитов в магазине." 399 | } 400 | 401 | "shop_menu_paperclip" 402 | { 403 | "ru" "Получить {2} скрепки. [{1}¢]" 404 | } 405 | 406 | "shop_paperclip" 407 | { 408 | "ru" "Вы приобрели: {1} скрепок для наручников!" 409 | } 410 | 411 | "shop_unwallhack" 412 | { 413 | "ru" "ВХ закончился!" 414 | } 415 | 416 | "shop_win" 417 | { 418 | "ru" "Вы получили {2} ¢редитов за победу в раунде! Теперь вы имеете: {1}¢" 419 | } 420 | 421 | "shop_giftyourself" 422 | { 423 | "ru" "Вы не можете использовать подарок на себе." 424 | } 425 | 426 | "shop_onlyct" 427 | { 428 | "ru" "Этот товар только для охраны!" 429 | } 430 | 431 | "shop_saleon" 432 | { 433 | "ru" "Распродажа! Все товары на скидке {1}%%!" 434 | } 435 | 436 | "shop_saleend" 437 | { 438 | "ru" "Распродажа закончена!" 439 | } 440 | 441 | "shop_menu_title_sale" 442 | { 443 | "ru" "%%РАСПРОДАЖА%% скидка {1}%%!" 444 | } 445 | 446 | "shop_randomtp" 447 | { 448 | "ru" "Вы телепортированы к {1}!" 449 | } 450 | 451 | "shop_randomtp_teleported" 452 | { 453 | "ru" "{1} телепортировался к вам!" 454 | } 455 | 456 | "shop_menu_randomtp" 457 | { 458 | "ru" "Телепортироваться к случайному Т [{1}¢]" 459 | } 460 | 461 | "shop_menu_jetpack" 462 | { 463 | "ru" "Джетпак [{1}¢]" 464 | } 465 | 466 | "shop_jetpack" 467 | { 468 | "ru" "Вы приобрели: Джетпак | нажмите CTRL + SPACE (duck+jump)" 469 | } 470 | 471 | "shop_menu_jihad" 472 | { 473 | "ru" "Джихад бомба [{1}¢]" 474 | } 475 | 476 | "shop_jihad" 477 | { 478 | "ru" "Вы приобрели: Джихад бомбу | нажмите Mouse1 + E (аттаку+активировать)" 479 | } 480 | 481 | "shop_jihad" 482 | { 483 | "ru" "Вы приобрели: Джихад бомбу | нажми Mouse1 + E (аттаку+активировать)" 484 | } 485 | 486 | "shop_menu_door" 487 | { 488 | "ru" " Открыть дверь в поле зрения [{1}¢]" 489 | } 490 | 491 | "shop_door" 492 | { 493 | "ru" "Вы приобрели: Открыть дверь в поле зрения | нажмите E (использовать), наблюдая за дверью" 494 | } 495 | 496 | "shop_menu_blackout" 497 | { 498 | "ru" "Затмение - затемнить карту [{1}¢]" 499 | } 500 | 501 | "shop_blackout" 502 | { 503 | "ru" "Вы приобрели: Затмение - Zzztt..." 504 | } 505 | 506 | "shop_blackout_all" 507 | { 508 | "ru" "Критическое отключение питания!" 509 | } 510 | 511 | "shop_noclipstuck" 512 | { 513 | "ru" "{1} застрял с NoClip!" 514 | } 515 | 516 | "shop_menu_freeday" 517 | { 518 | "ru" "Фридей следующий раунд [{1}¢]" 519 | } 520 | 521 | "shop_freeday" 522 | { 523 | "ru" "Вы купили: Фридей на следующий раунд" 524 | } 525 | 526 | "shop_randomtp_fail" 527 | { 528 | "ru" "Нет живых игроков для телепортации." 529 | } 530 | 531 | "shop_shield" 532 | { 533 | "ru" "Вы купили: Тактический щит" 534 | } 535 | 536 | "shop_menu_shield" 537 | { 538 | "ru" "Тактический щит [{1}¢]" 539 | } 540 | 541 | "shop_menu_icegrenade" 542 | { 543 | "ru" "Ледяная граната [{1}¢]" 544 | } 545 | 546 | "shop_icegrenade" 547 | { 548 | "ru" "Вы купили: Ледяная граната" 549 | } 550 | 551 | } 552 | -------------------------------------------------------------------------------- /addons/sourcemod/scripting/myjailshop_parachute.sp: -------------------------------------------------------------------------------- 1 | /* 2 | * MyJailShop - Parachute Item Module. 3 | * by: shanapu 4 | * https://github.com/shanapu/MyJailShop/ 5 | * 6 | * used code by zipcore 7 | * https://gitlab.com/Zipcore/HungerGames/blob/master/addons/sourcemod/scripting/hungergames/tools/parachute.sp 8 | * 9 | * This file is part of the MyJailShop SourceMod Plugin. 10 | * 11 | * This program is free software; you can redistribute it and/or modify it under 12 | * the terms of the GNU General Public License, version 3.0, as published by the 13 | * Free Software Foundation. 14 | * 15 | * This program is distributed in the hope that it will be useful, but WITHOUT 16 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 17 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 | * details. 19 | * 20 | * You should have received a copy of the GNU General Public License along with 21 | * this program. If not, see . 22 | */ 23 | 24 | 25 | // Includes 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include // add new cvars to existing .cfg file 35 | #include 36 | 37 | 38 | // Compiler Options 39 | #pragma semicolon 1 40 | #pragma newdecls required 41 | 42 | 43 | // ConVars shop specific 44 | ConVar gc_iItemPrice; 45 | ConVar gc_sItemFlag; 46 | ConVar gc_iItemOnlyTeam; 47 | ConVar gc_bWeapon; 48 | ConVar gc_fSpeed; 49 | ConVar gc_sItemModel; 50 | 51 | 52 | // Strings shop specific 53 | char g_sItemFlag[64]; 54 | char g_sPurchaseLogFile[PLATFORM_MAX_PATH]; 55 | 56 | // Booleans shop specific 57 | bool g_bItem[MAXPLAYERS+1] = false; 58 | 59 | // Handels shop specific 60 | Handle gF_hOnPlayerBuyItem; 61 | 62 | // Booleans item specific 63 | bool g_bParachute[MAXPLAYERS+1]; 64 | 65 | // Integer item specific 66 | int g_iParaEntRef[MAXPLAYERS+1] = {INVALID_ENT_REFERENCE, ...}; 67 | int g_iVelocity = -1; 68 | 69 | char g_sItemModel[64]; 70 | 71 | // Start 72 | public Plugin myinfo = 73 | { 74 | name = "Parachute for MyJailShop", 75 | author = "shanapu, zipcore", 76 | description = "Buy a parachute", 77 | version = "1.0", 78 | url = "https://github.com/shanapu" 79 | }; 80 | 81 | 82 | public void OnPluginStart() 83 | { 84 | // Translation 85 | LoadTranslations("MyJailShop.phrases"); 86 | 87 | // Add new Convars to existing Items.cfg 88 | AutoExecConfig_SetFile("Items", "MyJailShop"); 89 | AutoExecConfig_SetCreateFile(true); 90 | 91 | // Register ConVars 92 | gc_iItemPrice = AutoExecConfig_CreateConVar("sm_jailshop_parachute_price", "150", "Price of a parachute"); 93 | gc_sItemFlag = AutoExecConfig_CreateConVar("sm_jailshop_parachute_flag", "", "Set flag for admin/vip must have to get access to shield. No flag = is available for all players!"); 94 | gc_iItemOnlyTeam = AutoExecConfig_CreateConVar("sm_jailshop_parachute_access", "1", "0 - guards only, 1 - guards & prisoner, 2 - prisoner only", _, true, 0.0, true, 2.0); 95 | gc_bWeapon = AutoExecConfig_CreateConVar("sm_jailshop_parachute_shooting", "0", "0 - disabled / 1 - enable shooting while fly with parachute", _, true, 0.0, true, 1.0); 96 | gc_fSpeed = AutoExecConfig_CreateConVar("sm_jailshop_parachute_fallspeed", "100.0", "max fall speed", _, true, 1.1, true, 1000.0); 97 | gc_sItemModel = AutoExecConfig_CreateConVar("sm_jailshop_parachute_model", "models/parachute/parachute_carbon.mdl", "path to the parachute model"); 98 | 99 | // Add new Convars to existing Items.cfg 100 | AutoExecConfig_ExecuteFile(); 101 | AutoExecConfig_CleanFile(); 102 | 103 | // Set file for Logs 104 | SetLogFile(g_sPurchaseLogFile, "purchase", "MyJailShop"); 105 | 106 | //Hook 107 | HookEvent("player_death", Event_PlayerDeath); 108 | 109 | //Offset 110 | g_iVelocity = FindSendPropInfo("CBasePlayer", "m_vecVelocity[0]"); 111 | } 112 | 113 | public void OnConfigsExecuted() 114 | { 115 | gc_sItemFlag.GetString(g_sItemFlag, sizeof(g_sItemFlag)); 116 | gc_sItemModel.GetString(g_sItemModel, sizeof(g_sItemModel)); 117 | 118 | if (!IsModelPrecached(g_sItemModel)) 119 | { 120 | PrecacheModel(g_sItemModel); 121 | } 122 | Downloader_AddFileToDownloadsTable(g_sItemModel); 123 | } 124 | 125 | // Here we add an new item to shop menu 126 | public void MyJailShop_OnShopMenu(int client, Menu menu) 127 | { 128 | if ((GetClientTeam(client) == CS_TEAM_CT && gc_iItemOnlyTeam.IntValue <= 1) || (GetClientTeam(client) == CS_TEAM_T && gc_iItemOnlyTeam.IntValue >= 1)) 129 | { 130 | char info[64]; 131 | Format(info, sizeof(info), "%t", "shop_menu_parachute", gc_iItemPrice.IntValue); 132 | 133 | if (MyJailShop_GetCredits(client) >= gc_iItemPrice.IntValue && MyJailShop_IsBuyTime() && IsPlayerAlive(client) && CheckVipFlag(client, g_sItemFlag)) 134 | AddMenuItem(menu, "parachute", info); 135 | else if (CheckVipFlag(client, g_sItemFlag)) 136 | AddMenuItem(menu, "parachute", info, ITEMDRAW_DISABLED); 137 | } 138 | } 139 | 140 | 141 | // What should we do when new item was picked? 142 | public void MyJailShop_OnShopMenuHandler(Menu menu, MenuAction action, int client, int itemNum) 143 | { 144 | if (!IsValidClient(client, false, false)) 145 | return; 146 | 147 | if (action == MenuAction_Select) 148 | { 149 | if (MyJailShop_IsBuyTime()) 150 | { 151 | char info[64]; 152 | menu.GetItem(itemNum, info, sizeof(info)); 153 | 154 | if (StrEqual(info, "parachute")) 155 | { 156 | Item_Para(client, info); 157 | } 158 | } 159 | } 160 | 161 | return; 162 | } 163 | 164 | 165 | // The item transaction and last checks 166 | void Item_Para(int client, char[] name) 167 | { 168 | // is player alive? 169 | if (!IsPlayerAlive(client)) 170 | { 171 | CPrintToChat(client, "%t %t", "shop_tag", "shop_alive"); 172 | return; 173 | } 174 | 175 | // has player enough credits? 176 | if (MyJailShop_GetCredits(client) < gc_iItemPrice.IntValue) 177 | { 178 | CPrintToChat(client, "%t %t", "shop_tag", "shop_missingcredits", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 179 | return; 180 | } 181 | 182 | // now we take his money & push the forward 183 | MyJailShop_SetCredits(client,(MyJailShop_GetCredits(client) - gc_iItemPrice.IntValue)); 184 | Forward_OnPlayerBuyItem(client, name); 185 | 186 | // here he get the item with native 187 | g_bItem[client] = true; 188 | 189 | // announce it 190 | CPrintToChat(client, "%t %t", "shop_tag", "shop_parachute"); 191 | CPrintToChat(client, "%t %t", "shop_tag", "shop_costs", MyJailShop_GetCredits(client), gc_iItemPrice.IntValue); 192 | 193 | // log it 194 | ConVar c_bLogging = FindConVar("sm_jailshop_log"); 195 | if (c_bLogging.BoolValue) 196 | { 197 | LogToFileEx(g_sPurchaseLogFile, "Player %L bought: parachute", client); 198 | } 199 | } 200 | 201 | 202 | // Forward MyJailShop_OnPlayerBuyItem 203 | void Forward_OnPlayerBuyItem(int client, char[] item) 204 | { 205 | Call_StartForward(gF_hOnPlayerBuyItem); 206 | Call_PushCell(client); 207 | Call_PushString(item); 208 | Call_Finish(); 209 | } 210 | 211 | // Reset item on Player Death 212 | public void Event_PlayerDeath(Handle event, const char [] name, bool dontBroadcast) 213 | { 214 | int client = GetClientOfUserId(GetEventInt(event, "userid")); 215 | 216 | if (g_bItem[client]) 217 | { 218 | MyJailShop_OnResetPlayer(client); 219 | } 220 | } 221 | 222 | // Reset item on call 223 | public void MyJailShop_OnResetPlayer(int client) 224 | { 225 | DisableParachute(client); 226 | EnableWeaponFire(client); 227 | g_bItem[client] = false; 228 | } 229 | 230 | public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) 231 | { 232 | gF_hOnPlayerBuyItem = CreateGlobalForward("MyJailShop_OnPlayerBuyItem", ET_Ignore, Param_Cell, Param_String); 233 | 234 | return APLRes_Success; 235 | } 236 | 237 | public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2]) 238 | { 239 | if (!g_bItem[client]) 240 | return Plugin_Continue; 241 | 242 | // Check abort reasons 243 | if(g_bParachute[client]) 244 | { 245 | // Abort by released button 246 | if(!(buttons & IN_USE) || !IsPlayerAlive(client)) 247 | { 248 | DisableParachute(client); 249 | return Plugin_Continue; 250 | } 251 | 252 | // Abort by up speed 253 | float fVel[3]; 254 | GetEntDataVector(client, g_iVelocity, fVel); 255 | 256 | if(fVel[2] >= 0.0) 257 | { 258 | DisableParachute(client); 259 | return Plugin_Continue; 260 | } 261 | 262 | // Abort by on ground flag 263 | if(GetEntityFlags(client) & FL_ONGROUND) 264 | { 265 | DisableParachute(client); 266 | EnableWeaponFire(client); 267 | return Plugin_Continue; 268 | } 269 | 270 | // decrease fallspeed 271 | float fOldSpeed = fVel[2]; 272 | 273 | // Player is falling to fast, lets slow him to max gc_fSpeed 274 | if(fVel[2] < gc_fSpeed.FloatValue * (-1.0)) 275 | { 276 | fVel[2] = gc_fSpeed.FloatValue * (-1.0); 277 | } 278 | 279 | // fallspeed changed 280 | if(fOldSpeed != fVel[2]) 281 | TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, fVel); 282 | 283 | if(!gc_bWeapon.BoolValue) 284 | { 285 | EnableWeaponFire(client, false); 286 | } 287 | } 288 | // Should we start the parashute? 289 | else if(g_bItem[client]) 290 | { 291 | // Reject by released button 292 | if(!(buttons & IN_USE)) 293 | return Plugin_Continue; 294 | 295 | // Reject by on ground flag 296 | if(GetEntityFlags(client) & FL_ONGROUND) 297 | return Plugin_Continue; 298 | 299 | // Reject by up speed 300 | float fVel[3]; 301 | GetEntDataVector(client, g_iVelocity, fVel); 302 | 303 | if(fVel[2] >= 0.0) 304 | return Plugin_Continue; 305 | 306 | // Open parachute 307 | int iEntity = CreateEntityByName("prop_dynamic_override"); 308 | DispatchKeyValue(iEntity, "model", g_sItemModel); 309 | DispatchSpawn(iEntity); 310 | 311 | SetEntityMoveType(iEntity, MOVETYPE_NOCLIP); 312 | 313 | // Teleport to player 314 | float fPos[3]; 315 | float fAng[3]; 316 | GetClientAbsOrigin(client, fPos); 317 | GetClientAbsAngles(client, fAng); 318 | fAng[0] = 0.0; 319 | TeleportEntity(iEntity, fPos, fAng, NULL_VECTOR); 320 | 321 | // Parent to player 322 | char sClient[16]; 323 | Format(sClient, 16, "client%d", client); 324 | DispatchKeyValue(client, "targetname", sClient); 325 | SetVariantString(sClient); 326 | AcceptEntityInput(iEntity, "SetParent", iEntity, iEntity, 0); 327 | 328 | g_iParaEntRef[client] = EntIndexToEntRef(iEntity); 329 | g_bParachute[client] = true; 330 | } 331 | 332 | return Plugin_Continue; 333 | } 334 | 335 | void DisableParachute(int client) 336 | { 337 | int iEntity = EntRefToEntIndex(g_iParaEntRef[client]); 338 | if(iEntity != INVALID_ENT_REFERENCE) 339 | { 340 | AcceptEntityInput(iEntity, "ClearParent"); 341 | AcceptEntityInput(iEntity, "kill"); 342 | } 343 | 344 | g_bParachute[client] = false; 345 | g_iParaEntRef[client] = INVALID_ENT_REFERENCE; 346 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### Change Log 2 | 3 | **[1.5.0]** - DEV 4 | 5 | *Added* 6 | * new shop item as extra plugin: Buy a Freeday for the next round - requires MyJB warden 7 | * new plugin - myjailshop_freeday.smx 8 | * new cvar - sm_jailshop_freeday_price - 0 disable, price of the 'Freeday' shop item 9 | * new cvar - sm_jailshop_freeday_flag - Set flag for admin/vip must have to get accesso to Freeday. No flag = is avaible for all players! 10 | * new shop item as extra plugin: Buy a tactical shield - requires https://github.com/Keplyx/TacticalShield/ 11 | * new plugin - myjailshop_tacticalshield.smx 12 | * new cvar - sm_jailshop_shield_price - 0 disable, price of the 'Freeday' shop item 13 | * new cvar - sm_jailshop_shield_flag - Set flag for admin/vip must have to get accesso to Freeday. No flag = is avaible for all players! 14 | * new cvar - sm_jailshop_shield_access - 0 - guards only, 1 - guards & prisoner, 2 - prisoner only 15 | * new cvar - sm_jailshop_shield_pistol - Give player this pistol with one magazin if he havn't already a pistol, leave blank '' for no pistol with shield 16 | * new feature as extra plugin: Show credits in HUD 17 | * new plugin - myjailshop_hud.smx 18 | * new cvar - sm_jailshop_hud_enable - 0 - disabled, 1 - enable this MyJailShop Module 19 | * new cvar - sm_jailshop_hud_alive - 0 - show hud only to alive player, 1 - show hud to dead & alive player 20 | * new cvar - sm_jailshop_hud_x - x coordinate, from 0 to 1. -1.0 is the center 21 | * new cvar - sm_jailshop_hud_y - y coordinate, from 0 to 1. -1.0 is the center 22 | * new cvar - sm_jailshop_hud_red - Color of sm_hud_type '1' (set R, G and B values to 255 to disable) (Rgb): x - red value 23 | * new cvar - sm_jailshop_hud_green - Color of sm_hud_type '1' (set R, G and B values to 255 to disable) (rGb): x - green value 24 | * new cvar - sm_jailshop_hud_blue - Color of sm_hud_type '1' (set R, G and B values to 255 to disable) (rgB): x - blue value 25 | * new cvar - sm_jailshop_hud_alpha - Alpha value of sm_hud_type '1' (set value to 255 to disable for transparency) 26 | * new shop item as extra plugin: Buy a ice grenade and form player in icecubes 27 | * new plugin - myjailshop_icegrenade.smx 28 | * new cvar - sm_jailshop_icegrenade_price - Price of the IceGrenade perk 29 | * new cvar - sm_jailshop_icegrenade_flag - Set flag for admin/vip must have to get access to IceGrenade. No flag = is available for all players! 30 | * new cvar - sm_jailshop_icegrenade_access - 0 - guards only, 1 - guards & prisoner, 2 - prisoner only 31 | * new cvar - sm_jailshop_icegrenade_radius - Radius to freeze? 32 | * new cvar - sm_jailshop_icegrenade_affect - 0 - freeze only guards in radius , 1 - freeze guards & prisoner in radius 33 | * new cvar - sm_jailshop_icegrenade_time - How many seconds the IceGrenade freeze? 34 | * new cvar - sm_jailshop_icegrenade_model - path to the ice model 35 | * new shop item as extra plugin: Buy an parachute 36 | * new plugin - myjailshop_parachute.smx 37 | * new cvar - sm_jailshop_parachute_price - Price of a parachute 38 | * new cvar - sm_jailshop_parachute_flag - Set flag for admin/vip must have to get access to shield. No flag = is available for all players! 39 | * new cvar - sm_jailshop_parachute_access - 0 - guards only, 1 - guards & prisoner, 2 - prisoner only 40 | * new cvar - sm_jailshop_parachute_shooting - 0 - disabled / 1 - enable shooting while fly with parachute 41 | * new cvar - sm_jailshop_parachute_fallspeed - max fall speed 42 | * new cvar - sm_jailshop_parachute_model - path to the parachute model 43 | 44 | 45 | *Changed* 46 | * Allow admin commands from server console 47 | * More resource-saving menu 48 | 49 | *Fixed* 50 | * Allow OneHit knife with any knife - Thx @hexah 51 | * Restrict player commands from server console 52 | * Natives Get/SetCredits 53 | * Prohibit Random TP when there is no other terror 54 | * Minor issues/improvements 55 | 56 | 57 | 58 | **[1.4.0]** - API for custom shop items & some examples 59 | 60 | *Added* 61 | * new item: Random Teleport - teleport to an random prisoner. thx hexer10! 62 | * new cvar - sm_jailshop_randomtp - 0 disable, price of the 'Random teleport' shop item 63 | * new cvar - sm_jailshop_randomtp_flag - Set flag for admin/vip must have to get accesso to RandomTP. No flag = is avaible for all players! 64 | * new shop item as extra plugin: Jetpack - (yes, make your own custom items! without editing MyJailShop.sp - see Developer stuff) 65 | * new plugin - myjailshop_jetpack.smx 66 | * new cvar - sm_jailshop_jetpack_price - Price of the Jetpack perk 67 | * new cvar - sm_jailshop_jetpack_access - 0 - guards only, 1 - guards & prisoner, 2 - prisoner only 68 | * new cvar - sm_jailshop_jetpack_flags - Set flag for admin/vip must have to get access to Jetpack. No flag = is available for all players! 69 | * new cvar - sm_jailshop_jetpack_reloadtime - Time in seconds to reload JetPack. 0 = One time use, no reload 70 | * new cvar - sm_jailshop_jetpack_boost - The amount of boost to apply to JetPack. 71 | * new cvar - sm_jailshop_jetpack_angle - The angle of boost to apply to JetPack. 72 | * new cvar - sm_jailshop_jetpack_max - Time in seconds of using JetPacks. 73 | * new shop item as extra plugin: Jihad 74 | * new plugin - myjailshop_jihad.smx 75 | * new cvar - sm_jailshop_jihad_price - Price of the Jihad bomb 76 | * new cvar - sm_jailshop_jihad_flags - Set flag for admin/vip must have to get access to jihad. No flag = is available for all players! 77 | * new cvar - sm_jailshop_standstill - 0 - disabled, 1 - standstill(cant move) on Activate bomb 78 | * new cvar - sm_jailshop_bomb_radius - Radius for bomb damage 79 | * new shop item as extra plugin: ViewDoor - open a door by viewing on it. 80 | * new plugin - myjailshop_door.smx 81 | * new cvar - sm_jailshop_door_price - Price of the ViewDoor perk 82 | * new cvar - sm_jailshop_door_flags - Set flag for admin/vip must have to get access to view door. No flag = is available for all players! 83 | * new shop item as extra plugin: Blackout - darken the map for some time. 84 | * new plugin - myjailshop_blackout.smx 85 | * new cvar - sm_jailshop_blackout_price - Price of the Blackout perk 86 | * new cvar - sm_jailshop_blackout_flags - Set flag for admin/vip must have to get access to blackout. No flag = is available for all players! 87 | * new cvar - sm_jailshop_blackout_time - How many seconds the blackout should be? 88 | 89 | 90 | 91 | *Changed* 92 | * Throwing knife no more team damage. 93 | * Gravity: new way for Ladderfix 94 | * NoClip: autoslay player when stuck. 95 | * new cvar - sm_jailshop_noclip_stuck - 0 - disabled / 1 - kill player when stuck after noclip 96 | 97 | 98 | 99 | *Developer stuff* 100 | * new API to add custom item to shop! take a look to template plugins code of jetpack, jihad, doors & blackout 101 | * new forward - MyJailShop_OnShopMenu(int client, Menu menu) - Called after the shop menu is built, but before it's displayed. 102 | * new forward - MyJailShop_OnShopMenuHandler(Menu menu, MenuAction action, int client, int itemNum) - Called once a shop menu item has been selected 103 | * new forward - MyJailShop_OnResetPlayer(int client) - Called when a client should remove his items 104 | * new native - bool MyJailShop_IsBuyTime() - Is buytime? - can player buy item or is shopping restricted 105 | 106 | 107 | 108 | **[1.3.0]** - Sale, VIP Items & teamgames support 109 | 110 | *Added* 111 | * Sale - Discount all items with x percent on a sale - sale end on mapchange 112 | * new command - sm_sale - Toggle Sale - discount all items 113 | * new cvar - sm_jailshop_sale_multi - How many percent discount on a sale! 114 | * new cvar - sm_jailshop_**ITEMNAME**_flag - Set flag for admin/vip must have to get access to a item. No flag = is available for all players! 115 | * remove item perks (not the guns/nades) on TeamGames game start. 116 | 117 | 118 | 119 | **[1.2.1]** - fix 120 | 121 | *Fixed* 122 | * bug on using original warden not MyJailbreaks warden 123 | 124 | 125 | 126 | **[1.2.0]** - 3rd party credits, MyJailbreaks paperclips support & fixes 127 | 128 | *Added* 129 | * new item: new item paperclips if MyJailBreaks Warden & Handcuffs available 130 | * new cvar - sm_jailshop_paperclip_price - 0 - disabled, price of the 'PaperClips' shop item (only if myjb is available) 131 | * new cvar - sm_jailshop_paperclip_amount - Amount of paperclips a player get (only if myjb is available) 132 | * Support for 3rd party store/shop plugins credit system (use their credits instead myjs credits) 133 | * new cvar - sm_jailshop_credits_system - 1 - MyJailShop Credits, 0 - Zephrus store or 'SM Store' or FrozDark shop (need extra support plugin) 134 | * new plugin - myjailshop-zephyrus-store.smx - Support plugin for Zephyrus store plugin 135 | * new plugin - myjailshop-sm-store.smx - Support plugin for 'sm store' plugin 136 | * new plugin - myjailshop-frozdark-shop.smx - Support plugin for FrozDarks shop plugin 137 | * new cvar - sm_jailshop_tag - Allow "MyJailShop" to be added to the server tags? So player will find servers with MyJailShop faster. it dont touch you sv_tags 138 | * new cvar - sm_jailshop_log - Allow MyJailShop to log purchases and gifts in logs/MyJailShop 139 | * new cvar - sm_jailshop_buy_lr - 0 - disabled, 1 - Restrict shopping on last request 140 | * new cvar - sm_jailshop_remove_lr - 0 - disabled, 1 - Remove the bought perks on a last request. (bought weapons stay) 141 | * RU transaltion - Thx include1! 142 | * IT transaltion - Thx Hexer10! 143 | * new builds system - sourcecode on github / binarys at http://shanapu.de/MyJailShop 144 | 145 | 146 | 147 | *Changed* 148 | * Moved 'Be a Bird'-item to end of menu 149 | * Already buyed items are greyed out 150 | * When using MyJB, icons will be disabled on invisible, bird & fakeguard 151 | * MyJailbreak: remove players icon above heads on 'fakeguard' & 'be a bird'-items 152 | 153 | 154 | 155 | *Fixed* 156 | * Ammobug when a player already got a prim/sec weapon and buy deagle or awp 157 | * new cvar - sm_jailshop_removeweapon - 0 - disabled, 1 - When a player already got a prim/sec weapon and buy deagle or awp the current weapon disappear 158 | * Bug color in give/gift chat messages 159 | * Bug to get more bullets on deagle & awp Thx Jezis 160 | * Show chat message "You bought..." only to client. 161 | * Possibility for player to !jailgift credits to themself 162 | * Show wrong costs on Taser Thx Dkmuniz 163 | * minor fixes & small typos 164 | 165 | 166 | 167 | *Developer stuff* 168 | * Natives: Changed all native names by adding MyJailShop_* in front to avoid conflicts with 3rd party plugins 169 | * Forwards: Changed all forward names by adding MyJailShop_* in front to avoid conflicts with 3rd party plugins 170 | 171 | 172 | **[1.1.0]** - skipped 173 | 174 | **[1.0.0]** - initial release 175 | 176 | ### Versioning 177 | for a better understanding: 178 | ``` 179 | 0.7.2 180 | │ │ └───patch level - fix within major/minior release 181 | │ └─────minor release - feature/structure added/removed/changed 182 | └───────major release - stable/release 183 | ``` 184 | --------------------------------------------------------------------------------