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

[TF2] Fake Item Messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Plugin ID:
2557
Plugin Version:
1.5.0
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    36 
    Plugin Description:
    Prints fake item-found chat messages.
    Old 09-11-2011 , 22:00   [TF2] Fake Item Messages
    Reply With Quote #1

    [TF2] Fake Item Messages
    Version 1.5.0



    Description:
    Allows admins to print fake item found messages to chat.

    For example...


    Now supports custom text!


    Commands:
    • sm_fakeitem <client> <item index> [quality] [method]
      • <Client> = Client or userid of the target player
      • <Item Index> = The desired item's definition index from items_game.txt or in a better format here
      • [Quality] = Normal / Genuine / olive / Vintage / orange / Unusual / Unique / Community / Valve / Selfmade / Customized Haunted.
        Numbers will also work.
      • [Method] = Found / Craft / Trade / Buy / Uncrate / Gift / Earned / Refund / Wrapped. Numbers 0-10 also work.

        Example: "sm_fakeitem @me 99 vintage buy" would print DarthNinja has purchased: Vintage Tyrants Helm

    • sm_fakeitem2 <client> <method> <item text>
      • <Client> = Client or userid of the target player
      • <Method> = Found / Craft / Trade / Buy / Uncrate / Gift / Earned / Refund / Wrapped / Any custom text you want.
      • <Item Text> = Anything you care to think up, must be wrapped in quotes.

        Example: sm_fakeitem2 @me gift "A Banana" would print DarthNinja has received a gift: A Banana
        sm_fakeitem2 @me crate "A Fennec" would print DarthNinja has unboxed: A Fennec

        The item name will use the color of the last item found, or black if none have been found.
    Cvars:
    • sm_fakeitem_version
      • Plugin version

    Install Instructions:
    1. Place ItemMessages.smx into your addons/sourcemod/plugins/ folder.

    Developers:
    This plugin fires the item_found event. If you are hooking the event for stats tracking, you will get fake entries.
    To prevent this, I've added an extra field to the event, you can use the following to detect fake items vs real items:
    PHP Code:

    public OnPluginStart()
    {
        
    HookEvent("item_found"OnItemFound);
    }

    public 
    Action:OnItemFound(Handle:event, const String:name[], bool:dontBroadcast)
    {
        if (
    GetEventBool(event"isfake"))
        {
            
    //Item is fake, maybe you'd want to use return here.
            
    return;
        }
        
    //Item isn't fake



    ToDo:
    • Add support for custom names (PlayerX has found: A Pumpkin) - Done!
    • Menus for each option (this will be a huge pain)

    Version History:
    • V1.1.0
      • Initial Release
    • V1.1.1
      • Added Uncrate alias for Unbox
      • Removed unneeded includes
      • Fixed a typo in "Customized"
      • Now loads Common Phrases
    • V1.2.0
      • Added Strange item quality option that I'd forgotten.
      • You can now type help or list in place of a quality or method to get a listing.
      • Changed targeting so it's no longer possible to target bots. (It doesn't work and causes errors with other plugins).
    • V1.3.0
      • Added support for "Haunted"
    • V1.5.0
      • Custom item name/method text support!

    Total downloads as prior to last update: 625








    Attached Files
    File Type: sp Get Plugin or Get Source (ItemMessages.sp - 9572 views - 7.6 KB)
    __________________

    Last edited by DarthNinja; 01-08-2012 at 10:02.
    DarthNinja is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 09-11-2011 , 22:02   Re: [TF2] Fake Item Messages
    Reply With Quote #2

    -Reserved-
    __________________
    DarthNinja is offline
    byteframe
    Member
    Join Date: Jul 2011
    Location: Pitcairn Island
    Old 09-11-2011 , 23:26   Re: [TF2] Fake Item Messages
    Reply With Quote #3

    Thank you very much.
    byteframe is offline
    Snaggle
    AlliedModders Donor
    Join Date: Jul 2010
    Location: England
    Old 09-12-2011 , 00:19   Re: [TF2] Fake Item Messages
    Reply With Quote #4

    Thank you so much for doing this!
    Snaggle is offline
    coeocjf
    Member
    Join Date: Apr 2011
    Old 09-12-2011 , 02:01   Re: [TF2] Fake Item Messages
    Reply With Quote #5

    support only english?
    coeocjf is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 09-12-2011 , 03:09   Re: [TF2] Fake Item Messages
    Reply With Quote #6

    Quote:
    Originally Posted by coeocjf View Post
    support only english?
    I'm not sure what you're referring to
    __________________
    DarthNinja is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 09-12-2011 , 05:58   Re: [TF2] Fake Item Messages
    Reply With Quote #7

    Little update released, fixes a few things I just noticed.
    __________________
    DarthNinja is offline
    Minoost
    SourceMod Donor
    Join Date: Aug 2011
    Old 09-12-2011 , 10:41   Re: [TF2] Fake Item Messages
    Reply With Quote #8

    wow... just i can say 'awesome'
    Minoost is offline
    BrianGriffin
    Senior Member
    Join Date: Oct 2008
    Old 09-12-2011 , 15:16   Re: [TF2] Fake Item Messages
    Reply With Quote #9

    Great way to display item drops in a rpg mod ;)
    BrianGriffin is offline
    byteframe
    Member
    Join Date: Jul 2011
    Location: Pitcairn Island
    Old 09-12-2011 , 20:39   Re: [TF2] Fake Item Messages
    Reply With Quote #10

    Might it be within the purview of this plugin to also fake achievement messages? Like http://forums.alliedmods.net/showthread.php?p=883207 ?
    byteframe 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 06:01.


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