{"id":19952417,"url":"https://github.com/dosmike/tf2-pvp-optin","last_synced_at":"2026-03-06T06:04:16.879Z","repository":{"id":40443515,"uuid":"435468657","full_name":"DosMike/TF2-PvP-OptIn","owner":"DosMike","description":"A different approach to friendly servers, disabling PvP by default. Written for LazyPurple Sillies.","archived":false,"fork":false,"pushed_at":"2024-06-13T14:47:50.000Z","size":1842,"stargazers_count":5,"open_issues_count":6,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-29T05:57:43.231Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"SourcePawn","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DosMike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-06T11:22:15.000Z","updated_at":"2025-06-05T13:47:43.000Z","dependencies_parsed_at":"2024-06-13T17:29:28.689Z","dependency_job_id":"6fd5ed59-721c-4efd-a810-4bc013d16246","html_url":"https://github.com/DosMike/TF2-PvP-OptIn","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/DosMike/TF2-PvP-OptIn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FTF2-PvP-OptIn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FTF2-PvP-OptIn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FTF2-PvP-OptIn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FTF2-PvP-OptIn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DosMike","download_url":"https://codeload.github.com/DosMike/TF2-PvP-OptIn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DosMike%2FTF2-PvP-OptIn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30164532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T04:43:31.446Z","status":"ssl_error","status_checked_at":"2026-03-06T04:40:30.133Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T01:12:59.054Z","updated_at":"2026-03-06T06:04:16.845Z","avatar_url":"https://github.com/DosMike.png","language":"SourcePawn","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PvP Opt In\r\nBy default no pvp and pass through enemy team players.\r\n\r\nThis plugin was written as alternative to /friendly plugins as players usually forgot to enable it or were unhappy with how collision groups mess up certain things like elevators. So hopefully by putting all that on it's head, there wont ever be the need to report for RDM again!\r\n\r\n### Features:\r\n\r\n- Global PvP toggle\r\n- Pair PvP via invites, player can disable invites\r\n- Walk through enemies base on pvp state\r\n- Color players based on pvp state\r\n- Sentries and bots ignore non-pvp players\r\n- Fully translatable\r\n- Blocks various conditions between non-pvp players\r\n- Prevent players pushing eachother with e.g. loose cannon outside of pvp\r\n- Bosses and Skeleton ignore players that are not in PvP (see ConVars)\r\n- Generates a config at cfg/sourcemod/plugin.pvpoptin.cfg\r\n- Banning players from PvP\r\n- Protection agains spawn killing (for maps without locker room)\r\n\r\n*Note on Supressing AI Targeting:* Due to how the targeting for sentries and some bosses is implemented,\r\nsupressing a player or entity from being targeted results in the sentry or boss not seeing any enemy and idling or\r\nentering a false positive state.\r\n\r\n### ConVars:\r\n\r\n**`pvp_joinoverride \"0\"`**   \r\nDefine global PvP State when player joins.   \r\n0 = Load player choice, 1 = Force out of PvP, -1 = Force enable PvP\r\n\r\n**`pvp_nocollide \"1\"`**   \r\nCan be used to disable player collision between enemies.   \r\n0 = Don't change, 1 = with global pvp disabled, 2 = never collied\r\n\r\n**`pvp_gamestates \"all\"`**   \r\nThe game states when this plugin should be active or all if it should always run. Following states are possible: all, waiting, pregame, running, overtime, suddendeath, gameover\r\n\r\n**`pvp_requestmenus \"1\"`**   \r\nWhen players request pair PvP: 0 = requeste will have to use /pvp requester, 1 = requestee will receive a menu, 2 = will force VGUI menus\r\n\r\n**`pvp_buildings_vs_zombies \"2\"`**   \r\nControl sentry \u003c-\u003e skeleton targeting.   \r\nPossible values: -1 = Fully ignore, even manual damage, 0 = Never target, 1 = Global PvP only, 2 = This is PvE so Always\r\n\r\n**`pvp_buildings_vs_bosses \"2\"`**   \r\nControl sentry \u003c-\u003e boss targeting.   \r\nPossible values: -1 = Fully ignore, even manual damage, 0 = Never target, 1 = Global PvP only, 2 = This is PvE so Always\r\n\r\n**`pvp_players_vs_zombies \"1\"`**   \r\nControl player \u003c-\u003e skeleton targeting.   \r\nPossible values: -1 = Fully ignore, even manual damage, 0 = Never target, 1 = Global PvP only, 2 = This is PvE so Always\r\n\r\n**`pvp_players_vs_bosses \"1\"`**   \r\nControl player \u003c-\u003e boss targeting.   \r\nPossible values: -1 = Fully ignore, even manual damage, 0 = Never target, 1 = Global PvP only, 2 = This is PvE so Always\r\n\r\n**`pvp_playertaint_enable \"1\"`**   \r\nCan be used to disable player tainting based on pvp state\r\n\r\n**`pvp_playertaint_bluoff \"255 255 225\"`**   \r\nColor for players on BLU with global PvP disabled.\r\n\r\n**`pvp_playertaint_bluon \"255 125 125\"`**   \r\nColor for players on BLU with global PvP enabled.\r\n\r\n**`pvp_playertaint_redoff \"255 255 225\"`**   \r\nColor for players on RED with global PvP disabled.\r\n\r\n**`pvp_playertaint_redon \"125 125 255\"`**   \r\nColor for players on RED with global PvP enabled.\r\n\r\nFor all colors for format is `R G B A` from 0 to 255 or web color `#RRGGBBAA`. Alpha is optional.\r\n\r\n**`pvp_playerparticle_enable \"1\"`**   \r\nPlay a particle on players that can be PvPed (`mark_for_death`). Playes for both global and pair PvP.\r\n\r\nThere is a really cool pvp inicator particle system in the `clientmod/` directory, but due to how TF2 is not loading \r\ncustom particle systems from the server, I can't use it. In case you want to take a look, I added some instructions on\r\nhow to use the particle. Thanks to FancyNight and sigmarune for making that custom particle system :)\r\n\r\n**`pvp_spawnkill_protection \"15 5 35 100 60\"`**   \r\nSet up spawn protection. Set to an empty value to disable.\r\nParameters in order are: Minimum Penalty, Protection Time [s], Maximum Penalty, Threashold, Ban Time [m]\r\n\r\n![image](./spawnProtectionParams.png)\r\n\r\n**`pvp_toggle_action \"0\"`\r\nDecides what to do when a player toggles global PvP. Set this convar to the sum of flags.\r\nFlags: 1 - Respawn when turning on, 2 - Kill when turning on, 4 - Respawn when turning off, 8 - Kill when turning off.\r\nIf you set 1 or 2, the cooldown for leaving will not apply until the player was tagged by shooting or getting shot.\r\n\r\n### Commands:\r\n\r\n**`/pvp`**   \r\nToggle global PvP on or off\r\n\r\n**`/pvp player`**   \r\nInvite to, accept and end pair PvP with another player.\r\nIf the player was not found, get a menu.\r\n\r\n**`/pvpinvite [player]`**\r\nForces the pick player menu if no argument is given, haves like /pvp otherwise\r\n\r\n**`/stoppvp`**   \r\nEnd pair PvP with all players.\r\nIf no pair PvP running, toggle ignore state.\r\n\r\n**`/forcepvp \u003ctarget|'map'\u003e \u003c0|1\u003e`**   \r\nOverride the targets global pvp choice. If you use 'map' it will apply to all players joining the server. Non persistent (will reset on map change). Requires admin flag Slay.\r\n\r\n**`/mirror \u003ctarget\u003e \u003c0|1\u003e`**   \r\nForce mirror damage on someone. Mirror damage only affects players that are not PvPing, and is only for fun.\r\n\r\n**`/mirrorme`**   \r\nMirror your damage agains non-PvP players.\r\n\r\n**`/fakepvprequest \u003crequester\u003e \u003crequestee\u003e`**   \r\nSend a pair PvP request from requester to requestee.\r\n\r\n**`/banpvp \u003c#userid|name\u003e \u003cminutes\u003e [reason]`**   \r\nBan a player from PvP. Time has to be positive integer. (1440 is a day)\r\nIf you omit minutes and reason, it will tell you whether the player is already banned.\r\nNote: If you can't type their name, check `status` in console and use the #userid in the first column.\r\n\r\n**`/unbanpvp \u003c#userid|name\u003e`**   \r\nUnban a player from PvP.\r\nNote: If you can't type their name, check `status` in console and use the #userid in the first column.\r\n\r\n**New Target Selectors:**\r\n- `@pvp` Select all players with global PvP enabled\r\n- `@!pvp` Select all players with global PvP enabled\r\n\r\nThere's also a settings menu to toggle global PvP and pair PvP.\r\n\r\n### Dependencies:\r\n\r\nInstall the following required plugins:\r\n- [CollisionHook](https://github.com/Adrianilloo/Collisionhook/releases)\r\n- [TF Utils](https://github.com/nosoop/SM-TFUtils/releases)\r\n- [NativeVotes](https://github.com/sapphonie/sourcemod-nativevotes-updated) (Optional)\r\n\r\nThe CollisionHook branch I linked is prebuilt, but the **gamedata might be outdate**.\r\nCheck [this file](https://github.com/Adrianilloo/Collisionhook/blob/master/extra/collisionhook.txt), it should be up to date.\r\n\r\nCompiling the plugin requires [MoreColors](https://raw.githubusercontent.com/DoctorMcKay/sourcemod-plugins/master/scripting/include/morecolors.inc)\r\n\r\nNote: uses two functions from [SMLib's transitional syntax branch](https://github.com/bcserv/smlib/tree/transitional_syntax) (in utils.sp)\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdosmike%2Ftf2-pvp-optin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdosmike%2Ftf2-pvp-optin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdosmike%2Ftf2-pvp-optin/lists"}