Raised This Month: $12 Target: $400
 3% 

[TF2] Unlock Replacer


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Wazz
SourceMod Donor
Join Date: Mar 2009
Plugin ID:
912
Plugin Version:
2.6.0.4
Plugin Category:
All
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Replaces selected unlockable weapons with their original
    Old 05-30-2009 , 10:17   [TF2] Unlock Replacer
    Reply With Quote #1

    Please note: This plugin now uses SDKHooks instead of Dukehacks!

    Version:
    2.6.0.5
    Requires: SDKHooks (https://forums.alliedmods.net/showthread.php?t=106748)

    What does it do?
    This plugin allows admins to block and unblock unlockable weapons. This can be done through console commands or the admin menu (server commands).
    By default this plugin changes nothing until you start using the commands listed below.

    Available Commands
    sm_unlock_block - Blocks an unlock. Format as sm_unlock_block <weapon>
    sm_unlock_unblock
    - Unblocks an unlock. Format as sm_unlock_unblock <weapon>
    sm_unlock_exception_add - Creates a new exception rule. Format as sm_unlock_exception_add <weapon name> <target>
    sm_unlock_exception_remove - Removes an existing exception rule. Format as sm_unlock_exception_remove <weapon name> <target>
    sm_unlock_exception_list - Lists the current exceptions for an unlock. Format as sm_unlock_exception_list <weapon name>
    sm_unlock_list - Prints a list of unlocks that are currently blocked in console
    sm_unlock_alias - Prints a full list of names that can be used for identifing unlocks in console

    Weapon Names
    This is a list of weapon names the plugin currently recognises:
    • Ambassador
    • Axetinguisher
    • Backburner
    • Bonk
    • Blutsauger
    • Cloak and Dagger
    • Dead Ringer
    • Flaregun
    • Force-A-Nature
    • Huntsman
    • Jarate
    • Killing Gloves of Boxing
    • Kritzkrieg
    • Natascha
    • Sandman
    • Sandvich
    • Ubersaw
    • Razorback
    • Eyelander
    • Chargin' Targe
    • Scottish Resistance
    • Equalizer
    • Buff Banner
    • Direct Hit
    • Gunboats
    • Pain Train
    • Dalokohs Bar
    • Homewrecker
    • all (for all weapons)

    Valid Targets (for exception rules)
    This is a list of targets the plugin currently recognises:
    • STEAM_<id>
    • scout
    • sniper
    • soldier
    • demoman
    • medic
    • heavy
    • pyro
    • spy
    • all (for all targets, only valid when removing existing exception rules)
    Make sure you type them correctly and use all lower case letters when entering them into a console command.

    Known caveats
    1. Blocking a spy's watch while he has it active can cause it to glitch and the watch will remain in view until the player dies.

    Installation
    Place the smx file in your plugins folder.
    Place the txt files in your gamedata folder.

    Changelog:
    Code:
    20/04/2010
    - 2.6.0.5 released.
    - Added support for 3 new weapons
    04/03/2010
    - 2.6.0.4 released.
    - Fixed invalid client index error.
    04/03/2010
    - 2.6.0.3 released.
    - Fixed array index OOB error.
    25/02/2010
    - 2.6.0.2 released.
    - Ubercharge value is remembered when a player has their Kritzkreig replaced from visiting a resupply cabinet.
    27/12/2009
    - 2.6.0.1 released.
    - Fixed retrieval of network properties thanks to Busy.Orange.
    27/12/2009
    - 2.6.0.0 released.
    - Added Gunboats support - Now uses SDKHooks instead of Dukehacks
    21/12/2009
    - 2.5.0.2 released.
    - Fixed wrong weapons being given when blocking demoman unlocks
    21/12/2009
    - Updated gamedata and added new weapon support
    01/09/2009
    - 2.5.0.1 released.
    - Fixed incorrect item definition index with the bonesaw causing the medigun to be blocked instead.
    31/08/2009
    - 2.5.0.0 released (Redownload the gamedata file with this update.)
    - Changed the way unlock replacer identifies weapons and therefore: - Added support for each spy watch - Fixed Razorback so that it doesnt remove sniper's hats as well - Fixed typo in Razorback
    29/07/2009
    - 2.0.2.7 released (Redownload the gamedata file with this update.)
    - Using more of SourceMods gamedata instead of it's own.
    28/07/2009
    - 2.0.2.5 released
    - Fixed a problem with the sniper rifle after blocking the huntsman - Changed "Force of Nature" to "Force-A-Nature" to match its official name
    26/07/2009
    - 2.0.2.0 released
    - Razerback can now be blocked - No longer dependant on weapon levels (which are bugged thanks to valve). Using weapon quality instead.
    25/07/2009
    - 2.0.1.5 released
    - Fixed ammo when weapons are replaced - Fixed Sandvich not getting replaced
    24/07/2009
    - 2.0.1.3 released
    - Fixed error in windows offsets
    - 2.0.1.0 released
    - Fixed typo in Natascha
    - Fixed 'all' indentifer not working with sm_unlock_block and sm_unlock_unblock
    - 2.0.0.0 released
    ...Yaargh
    Attached Files
    File Type: txt unlock.games.txt (232 Bytes, 2385 views)
    File Type: sp Get Plugin or Get Source (unlockreplacer.sp - 1608 views - 28.5 KB)
    File Type: smx unlockreplacer.smx (14.2 KB, 1596 views)

    Last edited by Wazz; 04-20-2010 at 10:24. Reason: Update
    Wazz is offline
    noodleboy347
    AlliedModders Donor
    Join Date: Mar 2009
    Old 05-30-2009 , 18:25   Re: [TF2] Unlock Replacer
    Reply With Quote #2

    Yes, it doesn't work on 1.2, it just crashed my server.
    noodleboy347 is offline
    Wofiel
    Member
    Join Date: May 2009
    Old 06-01-2009 , 11:11   Re: [TF2] Unlock Replacer
    Reply With Quote #3

    There was a patch today, you might want to update your gamedata file. (I believe that's the problem, anyway)
    Wofiel is offline
    flubber
    Senior Member
    Join Date: Oct 2007
    Old 06-03-2009 , 06:10   Re: [TF2] Unlock Replacer
    Reply With Quote #4

    What about making it blocking any weapons even the original one? I like sniper with bows, would love to make a special bows evening with 24 snipers but no rifle.
    flubber is offline
    Wazz
    SourceMod Donor
    Join Date: Mar 2009
    Old 06-04-2009 , 10:53   Re: [TF2] Unlock Replacer
    Reply With Quote #5

    Updated to work with SM 1.2! I will look into your suggestion Flubber.
    Wazz is offline
    EHG
    Senior Member
    Join Date: May 2009
    Location: 127.0.0.1
    Old 06-09-2009 , 02:22   Re: [TF2] Unlock Replacer
    Reply With Quote #6

    Nice plugin.
    Can you add another variable to select class?
    For example:
    sm_unlock_block <class> <weapon>
    sm_unlock_unblock <class> <weapon>

    This way I can edit the items.ctx file and allow usage of unlock weapons for other classes and be able to block them again without the need to restore the items.ctx and restart server.
    EHG is offline
    Wazz
    SourceMod Donor
    Join Date: Mar 2009
    Old 06-09-2009 , 06:00   Re: [TF2] Unlock Replacer
    Reply With Quote #7

    Not sure what you mean there EHG. You can create several cfg files with different setups and execute using sm_unlock_exec. The changes will take effect immediately.
    Wazz is offline
    EHG
    Senior Member
    Join Date: May 2009
    Location: 127.0.0.1
    Old 06-09-2009 , 07:37   Re: [TF2] Unlock Replacer
    Reply With Quote #8

    For example I have made it possible for the scout to equip any unlockable weapon. This is made possible by editing the servers items.ctx.
    Unfortunetly I cannot control this. What i want to do with this plugin is block all unlocks except the ones that belong to the selected class.

    Edit:
    I wrote that in a hurry this morning, allow me to explain more clearly.
    I want you to add the option to block weapons for a single class like scout or pyro.
    Since my server allows any class to use any of the unlocked weapons this would be useful.
    For example with the following command i would be able to block the hunstman from the scout.
    sm_unlock_block scout Hunstman

    Do you understand?

    Last edited by EHG; 06-09-2009 at 16:51.
    EHG is offline
    NearNihil
    Junior Member
    Join Date: Jun 2009
    Old 06-09-2009 , 08:25   Re: [TF2] Unlock Replacer
    Reply With Quote #9

    Is it possible to remove the plugin from the admin menu/set a flag for the admins that can change it?
    NearNihil is offline
    Patilus
    Member
    Join Date: Jun 2009
    Location: France
    Old 06-09-2009 , 16:08   Re: [TF2] Unlock Replacer
    Reply With Quote #10

    Hello !

    I have a problem with this plugin.

    First, when I made a "sm plugins list" I get this:
    Quote:
    "Unlock Replacer" (0.9.0.0) by Wazz
    This is not the correct version (the download link is always up to date?)

    After that, the weapons are not blocked, I can play with any weapon unlock without any problem.

    This is my versions :
    Quote:
    SourceMod Version Information:
    SourceMod Version: 1.2.1
    SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.2.1)
    SourcePawn API: v1 = 4, v2 = 3
    Compiled on: May 30 2009 18:195
    Build ID: 2708:69195a250d70
    http://www.sourcemod.net/
    And this is my logs :
    Quote:
    L 06/09/2009 - 21:124: [SM] Native "SDKCall" reported: Invalid Handle 0 (error 4)
    L 06/09/2009 - 21:124: [SM] Displaying call stack trace for plugin "unlockreplacer.smx":
    L 06/09/2009 - 21:124: [SM] [0] Line 113, D:\Program Files (x86)\Steam\steamapps\redb1te\team fortress 2\tf\addons\sourcemod\scripting\unlockreplace r.sp::WeaponCheck()
    Thank you and sorry for my bad English

    Patilus is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 17:31.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode